Simple Line Path?

B

Blueman

Guest
For some reason I can't figure out what I feel should be very easy.

I want to assign an object to a path where it moves in a straight line from it's current position to a new set of coordinates (moveto_x and moveto_y) and stops.

The problem i'm having with my current code is that the object will follow through with the entire path and move back to where it was:

var path = path_add();
path_add_point(path,x,y,100);
path_add_point(path,moveto_x,moveto_y,100);
path_start(path,2,path_action_stop,true);

Evidently I have a serious lack of knowledge about how paths work, please help.

Thanks :)
 
Last edited by a moderator:
Top