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

[GM7] Problem Fixing Lightspeed Dash


Recommended Posts

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 NearestRing

if (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)
}
}
else
exit;
[/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

  • Recently Browsing   0 members

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