BOB_ROX Posted December 17, 2008 Report Share Posted December 17, 2008 Hi I'd like some help with finding a homing attack that is compatible for the Sonic Revival Engine. Link to comment Share on other sites More sharing options...
Shockey Rai Posted December 18, 2008 Report Share Posted December 18, 2008 Offtopic: You can edit the topic title You can do so by double clicking under the topic title before you enter the topic. Link to comment Share on other sites More sharing options...
Chaos Rush Posted December 19, 2008 Report Share Posted December 19, 2008 Hi I'd like some help with finding a homing attack that is compatible for the Sonic Revival Engine. The Sonic Revival engine uses Damizean's old movement engine (before the X-mas engine came out). if ( ground == false && key_action_pressed && action = action_jumping ){ if (instance_exists(objBadnikParent)==true) { var nearestEnemy; nearestEnemy = instance_nearest(x, y, objBadnikParent); if (distance_to_object(nearestEnemy) < 60) { x_speed = (nearestEnemy.x - x)*0.1; y_speed = (nearestEnemy.y - y)*0.1;}}}[/CODE]That's the main code for Homing Attack that I found by searching, anyway. You might have to define an extra variable that activates when Sonic is jumping, and then add something to the first line of code.Also I don't like that some people are still using my old crappy Sonic Revival engine, and I would prefer it if people used a newer, more organized one:http://www.sonicfangameshq.com/forum/showthread.php?t=5083The homing attack code will work just fine with the new engine, simply because both engines use the same build Damizean made. Link to comment Share on other sites More sharing options...
BOB_ROX Posted December 23, 2008 Author Report Share Posted December 23, 2008 So i make another object of it or where about's do I put it?. Link to comment Share on other sites More sharing options...
AzureSonic Posted December 24, 2008 Report Share Posted December 24, 2008 If your using the one that Chaos Rush put up make it go towards objEnemy. Im pretty sure thats what it is called. Link to comment Share on other sites More sharing options...
Sponick Posted December 24, 2008 Report Share Posted December 24, 2008 More or less, is this: in step event of objSonic: if instance_exists(objEnemy){ near=instance_nearest(x,y,objEnemy); if (distance_to_object(near)<300 && keyboard_check_pressed(homing_attack_key) && action=action_jumping) //for example { homing=1; motion_set(point_direction(x,y,near.x,near.y),15); } } In object Handling code, in the enemy handling: if homing=1{ homing=0; motion_set(0,0) } //Make sure this code is applicated to sonic, maybe you want to stop hes motion. And then, make the basic x_speed and y_speed works only when homing=0; If you make this right I think it must work. Good luck! PD ChaosRush, that is not crappy, just incomplete. you should know i'm using that engine right now xDD Link to comment Share on other sites More sharing options...
Recommended Posts