mouse_check_button_released

Returns whether a given mouse button has just been released.

Syntax:

mouse_check_button_released(numb);


Argument Description
numb Which mouse button constant to check for.


Returns: Boolean


Description

This function will return true if the mouse button being checked has been released or false if it has not. This function will only be triggered once for any mouse button when it is released and to trigger it again the button will need to have been pressed and released again.


Example:

if mouse_check_button_released(mb_right)
   {
   speed = point_distance(x, y, mouse_x, mouse_y) / 10;
   }

The above code will check to see if the right mouse button has been released and if it has it will set the speed of the instance to a tenth of the distance between the current x/y position and the mouse x/y position.


Back: Mouse Input
Next: mouse_clear
© Copyright YoYo Games Ltd. 2018 All Rights Reserved