Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Springs/Homing Attack in 360* Loop engine. (MMF 1.5)


TRD

Recommended Posts

Haha, this is probably a simple problem but I need help nonetheless.

I was wondering how do I implement springs in Damizean's 360* Loop engine?

Do I have to mess around with the values or the "YY" function?

(Also I wanted to put diagonal springs in there too.)

Thanks in advance!

PS: You know while I'm at it, does anyone know how to implement the Homing attack in Damizean's engine?

Link to comment
Share on other sites

That blue square is landing sensor. I use it just for change sonic animation to landing when he is close to the floor (just like in advance game series)

And red circle is homing attack sensor. Yeah I know that It is not very professional but... it is the only I could invent.

Blue circle is homing attack impact.

Group friends is sonic sprites in my game.

But the rest is usual for Damzien engine.

P.S. What about diagonal springs, they are mixed horizontal and vertical springs, thats all.

Link to comment
Share on other sites

I see nothing in that homing code that will actually move the mask over to the enemy, but instead just activation code.

Also, come on TRD, springs are easy. You only need to change the Y or X speed values upon hitting one, play a spring sound, change the spring animation, and be sure to tell Sonic that he's not on the ground nor spinning ( if it's a spring that sends you into the air ). Also, it would be good if you changed Sonic's animation to a bouncing animation, but that's up to you.

Edit: *points to sig* Don't be afraid of a little engine porting. =P

Link to comment
Share on other sites

I see nothing in that homing code that will actually move the mask over to the enemy, but instead just activation code.

Yes I know. I couldn't post all of the homing attack code because the picture woulbe too long.

P.S. I know that there is some way to make proper homing attack using sinuses and cosinuses but I have no idea how to do this.

Link to comment
Share on other sites

*Tried it*

*Embaressment*

Thanks larkss, I know it was simple, trust me I wouldn't of made a help topic on it if I didn't truely need the help. ;)

Rep point to you.

EDIT: Also I will try out that homing attack in your tutorial, I'll give credit if I use it.

Link to comment
Share on other sites

Here are my springs and homing attack

I'd be happy to upload it as MMF application despite jpeg pictures but, you know, I'm using MMF2

[ATTACH]147[/ATTACH]

[ATTACH]146[/ATTACH]

I need this too, i have most of these object, but not the V, A and some others. Could ou just upload it as .cca or something? Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Ok, I tried to make homing attack with help of math but suddenly appeared a unsolvable problem: MMF2 DOESN'T KNOW WHAT IS ARCSIN AND ARCCOS. It says that my expression contains syntax error!

Here is my expression which I tried to use to find angle between Sonic and enemy:

Arccos((Sqr((X( "Active 12" )-X( "Sensor - Mask" ))*(X( "Active 12" )-X( "Sensor - Mask" ))+(Y( "Active 12" )-Y( "Sensor - Mask" ))*(Y( "Active 12" )-Y( "Sensor - Mask" ))))/(X( "Active 12" )-X( "Sensor - Mask" )))

MMF2 says that it is a valid expression if I remove arccos but if I add it, It says about syntax error. Can anyone help me?

Edit: Read help file of MMF2. And it says that MMF2 DOES understand arccos and arcsin. I don't know what's the problem. Tried to use arccosine, arc cosine and arc-cosine in the expression but it didn't help.

Link to comment
Share on other sites

No it shouldn't. You'll ask why? Because As far enemy is from Sonic as faster sonic will move. But I want to have stable speed for homing attack.

Edit: Solved this problem. Now my homing attack is PERFECT. If anyone nedds it, just say.

Link to comment
Share on other sites

Then limit the values :P XSpeed = Min(Max(EnemyX-SonicX, -4), 4), for example

You are very pofessional, Damzien but you are not right again. If I would use it, Sonic would just miss the enemy if he is very far or very close to it.

Link to comment
Share on other sites

  • 7 years later...

Edit: Solved this problem. Now my homing attack is PERFECT. If anyone nedds it, just say.

Seems like I'll need it... I'm working on a game of my own and I want to implement homing attack into it, as well as light dash and other stuff. But so far, the homing attack is the only thing I haven't figured out just yet.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...