Legacy GM [GAVE UP]im having a path problem.

anima

Member
I'm trying to make an enemy stop following a path and follow another enemy for, 2 seconds or 5 and go back to follow the path and go back in the exact position of the path he was,but i always got the enemy just doing nothing,passing through
walls and etc.
here is the code
GML:
if confuso=1{
   path_end()
   if global.inimigos>1{
   mp_potential_step(obj_inimigo.x,obj_inimigo.y,7,obj_solido)
   }else if path_index!=path0{mp_potential_step(startx,starty,7,obj_solido)
   if abs(x-startx) && abs(y-starty){path_start(path0,7,path_action_stop,0)}
   }
}
ah and i use game maker studio1.4,and the game is a plataformer
 
Last edited:

TheouAegis

Member
If you want to pick up where you left off in the path, you need to save the path_position, save x to xstart, and y to ystart, THEN call path_end(). When you resume the path, set path_position back.
 
Top