mouse_button

This read-only variable returns the mouse button that is currently being pressed (currently, as in, this step) and can return any of the special mouse constants except mb_any.

 

Syntax:

mouse_button

 

Returns:

Mouse Button Constant (except mb_any)

 

Example:

if (mouse_button == mb_left)
{
    x -= 1;
}

This code moves the current instance left if the left mouse button is down.