mouse_check_button

Returns whether a given mouse button is currently down.

Syntax:

mouse_check_button(numb);


Argument Description
numb Which mouse button constant to check for.


Returns: Boolean


Description

This function will return true if the mouse button being checked is held down or false if it is not.


Example:

if mouse_check_button(mb_left)
   {
   instance_create(mouse_x, mouse_y, obj_Star);
   }

The above code will check for the left mouse button and every step that it is held down will create an instance of the object indexed in "obj_Star".


Back: Mouse Input
Next: mouse_check_button_pressed
© Copyright YoYo Games Ltd. 2015 All Rights Reserved