you need 3 localvariables or globalvariables, 3 numbers lets name them targetx and targety for position of mouse, and 1 boolean, that will toggle the movement, lets call it move
and then we create the bellow pseudo code.
on left click - set targetx to mouse.x
- set targety to mouse.y
- set move to 1
if move =1 player set angle towards position targetx targety
- move forward 5 pixels
///////////////////////////////// now we add the condition to stop the movement /////////////////////////////
compare two variables expression from system and we add the distance formula distance(x1,y1,x2,y2)
distance(player.x,player.y,targetx,target.y) =< 20 - set move to 0
and that is it.
[/code:1gdfjq0f]
and here is the capx [url=https://drive.google.com/open?id=0B0lqVR-ryWBQbXJldGFSLTJYVjg]move to point[/url]
you may want to adjust things inside for optimisation like trigger once on distance =< 20 and change the global variables to localvariables on the player so you save events