mouse_x

The current x position of the mouse.

Syntax:

mouse_x;


Returns: Real


Description

This read-only variable returns the current x axis position of the mouse within the room.


Example:

x = median(64, mouse_x, room_width - 64);

The above code will maintain the instance at the mouse x position as long as it is within the limits of 64 pixels from either side of the room.


Back: Mouse Input
Next: mouse_y
© Copyright YoYo Games Ltd. 2018 All Rights Reserved