Hi Badmood,
thanks for the advice. Actually I'm trying to draw a path with the mouse spawning dots on a regular distance. Then, a sprite follows the path
Ah, I didn't catch that. Maybe:
Pick most recent waypoint (or player if no waypoints)
-Compare two values If distance(mouse.x, mouse.y, waypoint.x, waypoint.y) > [distance you would like them]
--spawn waypoint at mouse.x mouse.y
Sorry, I can't look at your capx right now so not sure if that is the behavior you are looking for. If it is, to pick the most recent waypoint you may need an instance variable or boolean—although I think there is an expression to pick the last created instance but I'm not familiar.