EVENT_RIGHTCLICK

ENABLE_RIGHTCLICK

Clicked on with the right mouse button.

Remarks:

Mouse events will only be triggered if the entity is within a distance given by the predefined mouse_range variable (default 1000 quants) from the camera position.

Example:

function mouse_event() 
{
  if (event_type == EVENT_RIGHTCLICK) 
  {
    snd_play(ping,100,0);
  }
}

action sound_on_rightclick()
{
  my.ENABLE_RIGHTCLICK = ON; 
  my.emask |= ENABLE_RIGHTCLICK;
  my.event = mouse_event;
}

See also:

event, EVENT_TOUCH, on_mouse_right, on_click