Magican Posted March 11, 2009 Report Share Posted March 11, 2009 Hello guys, i want know how i make Homming Attack in the Sonic Worlds ALPHA (MMF 2 Sonic Base Engine here: http://www.sonicfangameshq.com/forum/showthread.php?t=3894&highlight=Sonic+Worlds), who knows, please help =P Thanks for the attention. ________ Uggs Link to comment Share on other sites More sharing options...
Rael0505 Posted March 11, 2009 Report Share Posted March 11, 2009 Hey man, I moved your thread to the Sonic Worlds forum. If you need any help with Sonic Worlds, this is the place to post. Link to comment Share on other sites More sharing options...
LarkSS Posted March 11, 2009 Report Share Posted March 11, 2009 Check out how to move Sonic toward a specific point. Try having him home attack toward a single enemy, and when you got that down, you'll only need to check the distances of multiple enemies to select the nearest one ( may want to only start the homing attack if the distance is less than a certain amount too so you don't try to attack something that's far away ). I'll hint at Pythagorean's theorem to achieve this. ;> If you have any troubles, you may consider consulting Azu for I've helped him implement this into Worlds recently. Link to comment Share on other sites More sharing options...
Asuma Posted March 11, 2009 Report Share Posted March 11, 2009 Yeah, it's not as hard as I though once I looked at the events. Link to comment Share on other sites More sharing options...
luksamuk Posted March 15, 2009 Report Share Posted March 15, 2009 Check out how to move Sonic toward a specific point. As I am the most curious one in the world, I tried to make it work. And as I am lazy, I've used an active object as homming sensor to check the enemies near to Sonic. But the problems are: 1- On the Theorem, try not to foret about Sonic's direction. If you're using MMF2, create a new value called "Direction", which one turns 1 if you're faced right and -1 if you're faced left. So, the equation becomes: TrajectoryLength=(SquareRo ot((DeltaX*DeltaX)+(Delta Y*DeltaY)))*Direction[/CODE]Simple, eh? Let's get to the next 'negative' point.2 - Ok... instead of mathematic comparisions, I was using an active homming sensor, as you know, because it makes you spend less time (I know that it's not the best way and actives charge the memmory, btw). BUT...I dunno if Lark and Azu have noticed it, but this kind of homming doesn't works properly when you're under an enemy (yes, Sonic gets out of the focus and goes floating to nowhere. So, I had to make my homming sensor smaller on the top and ground to make it work properly. Yea, I know, it make it less powerful. But as BlazeHedgehog said once, Homming Attack is too much powerful for 2D games.I still prefer using the old method, that the mask and the anim are at (0,0) from a bouncing-ball-moved active. Link to comment Share on other sites More sharing options...
LarkSS Posted March 16, 2009 Report Share Posted March 16, 2009 Uh, you know that you shouldn't need to consider direction because you're getting the difference between the two points, not the distance, right? Anywho, if any of you is still having problems: [Help] Programming Homing properties. Last post. Link to comment Share on other sites More sharing options...
luksamuk Posted March 17, 2009 Report Share Posted March 17, 2009 Ah well Lark, I had to consider the Direction (at least on DeltaX). And I still dunno what to do. (Homming isn't working anymore with DeltaY, I think.) Link to comment Share on other sites More sharing options...
alexlp2k8 Posted April 4, 2009 Report Share Posted April 4, 2009 Why no one puts a working download link of the code aplied to the Sonic Worlds/Alpha or newer engine? Link to comment Share on other sites More sharing options...
Rawr Posted April 4, 2009 Report Share Posted April 4, 2009 Because we'd learn how to actually do it ourselves if someone taught us rather than just having a code stuck in there for us. Thats how I've asked my questions so I could actually learn how things work. The only thing is that mine was getting Knuckles into Worlds, and it'd probably take a while to do anyway. Link to comment Share on other sites More sharing options...
Recommended Posts