• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM [SOLVED] How do I make an object follow a path?

Dr_Nomz

Member
Basically all I want the object to do is follow the lines clearly laid out in the path editor, then stop moving. But it doesn't seem to do that, just moves a bit than stops.

Code:
Code:
///STEP
if gohome=1{
  path_start(p_Blue_Home1,5,path_action_stop,true);
}
This should just make the object go from where it currently is and follow the path at that speed until it reaches the end, then it just stops. But it's not doing that. What should I do to make it work?
 
Last edited:

Dr_Nomz

Member
Updated to show that it's being done in GMS 1.4, though it may still be a GML thing.

EDIT: Just changed the "true" value to "false" and it sent the object moving, but it kept moving past where it was supposed to stop and it didn't even move to the second point in the path. So it's like it's not even following the path at all.

Is it because it's in the step event? Because it seems like I need to trigger it once and then... wait...

EDIT2: lmao I just figured it out on my own. xD Problem was it kept triggering it every step, but for some reason it bugged out because of that.

I just had "gohome" set to back to 0 after it was triggered and that worked. So nevermind I guess.
 
Last edited:

Toque

Member
Updated to show that it's being done in GMS 1.4, though it may still be a GML thing.

EDIT: Just changed the "true" value to "false" and it sent the object moving, but it kept moving past where it was supposed to stop and it didn't even move to the second point in the path. So it's like it's not even following the path at all.

Is it because it's in the step event? Because it seems like I need to trigger it once and then... wait...

EDIT2: lmao I just figured it out on my own. xD Problem was it kept triggering it every step, but for some reason it bugged out because of that.

I just had "gohome" set to back to 0 after it was triggered and that worked. So nevermind I guess.

There are path tutorials on you tube that helped me. Just google it.
 
Top