MOUSE_RIGHT_DOWN()

MOUSE_RIGHT_DOWN(N)

RETURNS 1 IF MOUSE RIGHT BUTTON IS PRESSED ON THE SYSTEM OBJECT NUMBER N, 0 OTHERWISE

  • Type: Function
  • Parameter: 1
  • Group: Mouse

ACTION

The function MOUSE_RIGHT_DOWN(N) returns 1 if mouse right button is pressed on the system object number N, 0 otherwise.

SYNTAX: Result=MOUSE_RIGHT_DOWN(N)

  • N = system object number (integer or real). Must be greater than or equal to 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The function MOUSE_RIGHT_DOWN() is used to know if right button of mouse is pressed on a system object, in 2D and 3D games.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If the object number N is of type : MAIN_MENU, SUB_MENU, SOUND, OPEN_DIALOG, SAVE_DIALOG, DLIST, TIMER, MAIN_MENU_POP,
  • OPEN_DIALOG_PIC, SAVE_DIALOG_PIC, SERIAL.

EXAMPLE

picture 1

rem print X and Y positions of the mouse when the right button is pressed on picture1

if mouse_right_down(1)=1

print mouse_x_right_down(1)

print mouse_y_right_down(1)

end_if

SEE ALSO

MOUSE_X_POSITION()

MOUSE_Y_POSITION()

MOUSE_RIGHT_UP()

MOUSE_LEFT_UP()

MOUSE_LEFT_DOWN()

MOUSE_X_RIGHT_UP()

MOUSE_X_RIGHT_DOWN()

MOUSE_Y_RIGHT_UP()

MOUSE_Y_RIGHT_DOWN()

MOUSE_X_LEFT_UP()

MOUSE_X_LEFT_DOWN()

MOUSE_Y_LEFT_UP()

MOUSE_Y_LEFT_DOWN()