mouse_button

Returns the currently pressed mouse button.

Syntax:

mouse_button;


Returns: Real


Description

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.


Example:

if mouse_button = mb_left
   {
   x -= 1;
   }

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


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