mouse_x / mouse_y

Example:

x = mouse_x;

y = mouse_y;

 

These will return the x and y coordinates of the mouse pointer at any given time, this is particularly useful if you want to have an object as the mouse pointer, place x = mouse_x and y = mouse_y in the Step Event of the object and it will follow the mouse pointer, even if the actual mouse pointer is invisible.

 

Note: These are read-only variables, you cannot put values into these variables only read their values.

 

Revision #2