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:

Constant (mb_left, mb_middle, mb_right, my_none)

 

Example:

if mouse_button = mb_left
   {
   x -= 1;
   }

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