Game Control
Explore the functions and events for game control. Follow an entry for its parameters, examples, and technical constraints.
Reference
75 topic entries
Badges
Kind
integer llGetGameControlMode(key id)Returns a GAME_CONTROL_MODE_* integer indicating the current game-control mode for the avatar specified by id.functionNEW (Added 2026-09-30)list llGetGameControlModeAxes(key id)Returns a list of floats representing the modal axes for the current game-control mode of the avatar specified by id. Element count and index meanings vary by mode; use the GAME_CONTROL_AXIS_* constants as indices.functionNEW (Added 2026-09-30)integer llGetGameControlModeButtons(key id)Returns a bitmask of the modal buttons currently active for the current game-control mode of the avatar specified by id. Bit meanings vary by mode; use the GAME_CONTROL_BUTTON_* constants as masks.functionNEW (Added 2026-09-30)game_control(key id, integer button_levels, list axes)Triggered when a compatible viewer sends game controller input changes for the avatar specified by id. Only triggers for scripts in attachments or seats.eventinteger GAME_CONTROL_AXIS_ADVANCE = 1Forward/backward movement. Modal axis index 1 for AVATAR, MOUSELOOK, and CAPTIVE modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_BOOM = 4Camera up/down movement. Modal axis index 4 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_DOLLY = 1Camera forward/backward movement. Modal axis index 1 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_LEFTX = 0Left stick X axis. Canonical axis index 0.constantinteger GAME_CONTROL_AXIS_LEFTY = 1Left stick Y axis. Canonical axis index 1.constantinteger GAME_CONTROL_AXIS_LEFT_TRIGGER = 4Left trigger. Canonical axis index 4.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_LOOK = 3Looking up/down. Modal axis index 3 for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_PAN = 2Camera pan left/right. Modal axis index 2 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_RIGHTX = 2Right stick X axis. Canonical axis index 2.constantinteger GAME_CONTROL_AXIS_RIGHTY = 3Right stick Y axis. Canonical axis index 3.constantinteger GAME_CONTROL_AXIS_RIGHT_TRIGGER = 5Right trigger. Canonical axis index 5.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_RISE = 4Up/down movement. Modal axis index 4 for AVATAR, MOUSELOOK, and CAPTIVE modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_ROLL = 5Camera roll. Modal axis index 5 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_STRAFE = 0Left/right movement. Modal axis index 0 for AVATAR, MOUSELOOK, and CAPTIVE modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_TILT = 3Camera tilt up/down. Modal axis index 3 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_TRUCK = 0Camera lateral (left/right) movement. Modal axis index 0 for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_TURN = 2Turning left/right. Modal axis index 2 for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_AXIS_ZOOM = 6Camera zoom in/out. Modal axis index 6 for AVATAR, MOUSELOOK, CAPTIVE, and FLYCAM modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_ADVANCE_BACK = 0x1000Move backward. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_ADVANCE_FORWARD = 0x800Move forward. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_CROUCH = 0x2Crouch. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_CURSOR_BUTTON_LEFT = 0x200Left mouse button click. Modal button for MOUSELOOK and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_CURSOR_BUTTON_RIGHT = 0x400Right mouse button click. Modal button for MOUSELOOK and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_DOLLY_BACK = 0x1000Camera dolly backward. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_DOLLY_FORWARD = 0x800Camera dolly forward. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_DPAD_DOWN = 0x1000D-pad down.constantinteger GAME_CONTROL_BUTTON_DPAD_LEFT = 0x2000D-pad left.constantinteger GAME_CONTROL_BUTTON_DPAD_RIGHT = 0x4000D-pad right.constantinteger GAME_CONTROL_BUTTON_DPAD_UP = 0x800D-pad up.constantinteger GAME_CONTROL_BUTTON_EAST = 0x2Right face button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_HOME = 0x20Home/guide button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_JUMP = 0x1Jump. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_LEFTSHOULDER = 0x200Left shoulder/bumper button.constantinteger GAME_CONTROL_BUTTON_LEFTSTICK = 0x80Left analog stick click.constantinteger GAME_CONTROL_BUTTON_MISC1 = 0x8000Miscellaneous button 1.constantinteger GAME_CONTROL_BUTTON_NORTH = 0x8Top face button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_PADDLE1 = 0x10000Paddle button 1.constantinteger GAME_CONTROL_BUTTON_PADDLE2 = 0x20000Paddle button 2.constantinteger GAME_CONTROL_BUTTON_PADDLE3 = 0x40000Paddle button 3.constantinteger GAME_CONTROL_BUTTON_PADDLE4 = 0x80000Paddle button 4.constantinteger GAME_CONTROL_BUTTON_PAN_LEFT = 0x4Camera pan left. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_PAN_RIGHT = 0x2Camera pan right. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_RESET = 0x80Reset camera to default view. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_RIGHTSHOULDER = 0x400Right shoulder/bumper button.constantinteger GAME_CONTROL_BUTTON_RIGHTSTICK = 0x100Right analog stick click.constantinteger GAME_CONTROL_BUTTON_ROLL_CCW = 0x200Roll camera counter-clockwise. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_ROLL_CW = 0x400Roll camera clockwise. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_SELECT = 0x10Select/back button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_SIT = 0x4Toggle sitting. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_SOUTH = 0x1Bottom face button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_START = 0x40Start/menu button.constantinteger GAME_CONTROL_BUTTON_STRAFE_LEFT = 0x2000Strafe left. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_STRAFE_RIGHT = 0x4000Strafe right. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_ALT_ZOOM = 0x10Toggle alt-zoom. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_CURSOR = 0x10Toggle cursor mode. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_FLYCAM = 0x100Toggle flycam mode. Modal button for all modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_FOLLOW = 0x40Toggle camera follow mode. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_MOUSELOOK = 0x40Toggle mouselook mode. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOGGLE_SPEAK = 0x20Toggle voice speak. Modal button for AVATAR, MOUSELOOK, CAPTIVE, and CURSOR modes.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TOUCHPAD = 0x100000Touchpad click.constantinteger GAME_CONTROL_BUTTON_TRUCK_LEFT = 0x2000Camera truck left. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_TRUCK_RIGHT = 0x4000Camera truck right. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_WEST = 0x4Left face button.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_ZOOM_IN = 0x8Zoom camera in. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_BUTTON_ZOOM_OUT = 0x1Zoom camera out. Modal button for FLYCAM mode.constantNEW (Added 2026-09-30)integer GAME_CONTROL_MODE_AVATAR = 0constantNEW (Added 2026-09-30)integer GAME_CONTROL_MODE_CAPTIVE = 3constantNEW (Added 2026-09-30)integer GAME_CONTROL_MODE_CURSOR = 4constantNEW (Added 2026-09-30)integer GAME_CONTROL_MODE_FLYCAM = 2constantNEW (Added 2026-09-30)integer GAME_CONTROL_MODE_MOUSELOOK = 1constantNEW (Added 2026-09-30)integer PERMISSION_GAME_CONTROL = 0x100000constantNEW (Added 2026-09-30)
No matching entries. Try a different term or filter.