-
-
Notifications
You must be signed in to change notification settings - Fork 18
mouse_check_button_pressed
drewmccluskey edited this page Feb 12, 2019
·
4 revisions
Returns if mouse is being currently pressed
mouse_check_button_pressed(button)
Argument | Description |
---|---|
MouseButtons button |
The mouse button checked if it is being pressed |
Returns: bool
This function is like mouse_check_button()
but this will run code only once when you press the mouse button and not all the steps after that the button is still held down.
if (mouse_check_button_pressed(MouseButtons.mb_left))
{
instance_create(Position, typeof(oBullet), "Object layer 1");
}
This code will run when you press your left mouse button and will create a bullet object.
Back to Mouse