Power Hedgehog Posted November 8, 2008 Report Share Posted November 8, 2008 I am trying to implement the Lightspeed dash move into my game, and was wondering what I was doing wrong. Here's the code I have: SHIFT KEY EVENT: if ( distance_to_object(objRing) < 10){action = action_lightdash;}[/CODE][b]STEP EVENT:[/b][CODE]//====================Lightdash===========================//if (distance_to_object(objRing)>10){exit;}var NearestRingif (action == action_lightdash){if (instance_exists(objRing)){ground = false;NearestRing = instance_nearest(x,y,objRing);x_speed = (NearestRing.x - x)*0.2;y_speed = (NearestRing.y - y)*0.2;angle = point_direction(x,y,NearestRing.x,NearestRing.y)}}elseexit;[/CODE]My code works, but only to an extent. The character will follow a few rings, then slow down, and fall to the ground. If anyone knows how to fix this, help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts