Skip to content

mouse_button

drewmccluskey edited this page Feb 12, 2019 · 3 revisions

mouse_button

Read only variable used to check if a mouse button is currently pressed down

Syntax:

mouse_button;

Returns: constant (Left, Right, Middle, mb_none, mb_x1, mb_x2)

Description:

This read-only variable can be used to check if during a step a button is being pressed down by checking the variable by a constant.

Example:

if (mouse_button == Left))
{
    var shoot = 1;
}

This code will set var shoot to 1 if the left mouse button is currently held down.

Back to Mouse

Clone this wiki locally