GML Mouse following when clicked

Ache

Member
How would you make an object go to the last place that you click? I know how to make an object just follow the mouse, but I want a way to make it only go to the last place you click. If anyone knows a way to do this, help would be appreciated.
 

Slyddar

Member
Just use 2 global variables (or a global variable array) for the x and y position, and set the variables value to the mouse_x and mouse_y when you click pressed. You can then set the instances position to the global x and y values.
 
Top