mouse_lastbutton

The last pressed mouse button.

Syntax:

mouse_lastbutton;


Returns: Real


Description

This variable returns the last mouse button that was pressed and can return any of the special mouse constants. You may also set this variable to use any of the constants too.


Example:

if mouse_lastbutton = mb_left
   {
   x -= 1;
   }

This moves the current instance left if the last button pressed was the left mouse button.


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