-
-
Notifications
You must be signed in to change notification settings - Fork 19
mouse_clear
CryoEagle edited this page Jan 3, 2019
·
2 revisions
This will delete state of current used mouse buttons
mouse_clear(button)
Argument | Description |
---|---|
mouse_clear button |
Which button to check if is in current state |
Returns: bool
This function will clear the state of any mouse buttons currently being used, so when you are using mouse_check_button(button);
and held your selected button
and then use mouse_clear(button);
for that button, mouse_check_button(button); should return false
, for returning true again must be button
released and then used again.
if (keyboard_check(Keys.R))
{
mouse_clear(MouseButtons.mb_right);
}
if (mouse_check_button(MouseButtons.mb_right))
{
Position.X += 5;
}
This code will move your object to right when you held down right mouse button but when you press R on keyboard the moving object should stop.
Back to Mouse