Skip to content

mouse_check_button

CryoEagle edited this page Jan 3, 2019 · 4 revisions

mouse_check_button

Returns if mouse is being pressed and held down

Syntax:

mouse_check_button(button)
Argument Description
MouseButtons button The mouse button to being checked if is held down

Returns: bool

Description:

This function will check if mouse button is being held down, it will return true or false. It's usefull when you are making shooting game and much more.

Example:

if (mouse_check_button(MouseButtons.mb_left))
{
    score++;
}

This code will allow you to add score when you held down left mouse button, when you press that button code will run every frame.

Back to Mouse

Clone this wiki locally