This read-only variable returns the mouse button that is currently being pressed (currently, as in, this step) and can return any of the special mouse constants except mb_any.
mouse_button
Mouse Button Constant (except mb_any)
if (mouse_button == mb_left)
{
x -= 1;
}
This code moves the current instance left if the left mouse button is down.