Move sprite along fixed path

I would like to make an sprite (enemy) move along a fixed path in gdevelop5.
What’s the best way to do this?
Example:
vraag

Make sprite objects as waypoints.
Then give each of them a variable id. Start with 1

Then you use pathfinding behaviour for your sprite

At the beginning of the scene hide them.

Then when sprite is in collusion with waypoint set a variable (way) of the sprite to the variable id of waypoint. As subevent if variable way of sprite = the id of last waypoint, set variable way of sprite to 0 (to make the sprite go from last waypoint to the first)
Then another event,
If variable id of waypoint = sprite.variable (way) +1 move sprite to waypoint.x () waypoint.y ()

1 Like

can you please give example of this
i dont understand
thank you

nevermind, i get it, thank you