# Studio events reference

> Every trigger, condition and action of the Studio's event sheet, with its slots and their types.

Rows read _When_ a trigger, _If_ conditions, _Do_ actions (see
[Events](/studio/events)). Each item's sentence shows its slots in
italics; the id is how project files and MCP agents name it. Items marked
advanced are listed under _Advanced_ in the pickers.

This page is generated from the Studio's vocabulary.

## Triggers

### Match

| Sentence | Id | Slots |
| --- | --- | --- |
| The match starts | `match-start` | none |
| The match stops | `match-stop` | none |
| The match pauses | `match-pause` | none |
| The match resumes | `match-resume` | none |

### Players

| Sentence | Id | Slots |
| --- | --- | --- |
| A player joins the room | `player-join` | none |
| A player leaves the room | `player-leave` | none |
| A player enters the match | `player-enter` | none |
| A player exits the match | `player-exit` | none |
| A player gains _role_ | `role-gain` | role: role (optional) |
| A player loses _role_ | `role-loss` | role: role (optional) |

### Controls

| Sentence | Id | Slots |
| --- | --- | --- |
| A player presses _action_ | `action-press` | action: action (optional) |
| A player releases _action_ | `action-release` | action: action (optional) |
| A player is about to use _action_ | `before-action` | action: action (optional) |
| A player uses _action_ | `action` | action: action (optional) |

### World

| Sentence | Id | Slots |
| --- | --- | --- |
| An object enters _sensor_ | `sensor-enter` | sensor: object (optional) |
| An object leaves _sensor_ | `sensor-leave` | sensor: object (optional) |
| A disc crosses _line_ _direction_ | `crossing` | line: crossing (optional); direction: one of "either", "forward", "backward" (optional) |
| _disc_ lands | `land` | disc: disc or instance (optional) |

### UI

| Sentence | Id | Slots |
| --- | --- | --- |
| A player uses _control_ | `ui-control` | control: ui-node |

### Room

| Sentence | Id | Slots |
| --- | --- | --- |
| The room sends _name_ | `room-event` | name: name |

### Events

| Sentence | Id | Slots |
| --- | --- | --- |
| _event_ is raised | `custom` | event: custom-event |

### Time

| Sentence | Id | Slots |
| --- | --- | --- |
| Every tick | `every-tick` | none |
| After every tick | `after-every-tick` | none |
| Every _n_ ticks | `every-ticks` | n: number |
| Every _n_ seconds | `every-seconds` | n: number |
| _timer_ reaches _seconds_ seconds | `timer-reaches` | timer: timer variable; seconds: number |

### Variables

| Sentence | Id | Slots |
| --- | --- | --- |
| _variable_ changes | `variable-changes` | variable: variable |

## Conditions

### Discs

| Sentence | Id | Slots |
| --- | --- | --- |
| _disc_'s x _cmp_ _n_ | `disc-x` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s y _cmp_ _n_ | `disc-y` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s speed _cmp_ _n_ | `disc-speed` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s velocity x _cmp_ _n_ | `disc-velocity-x` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s velocity y _cmp_ _n_ | `disc-velocity-y` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s radius _cmp_ _n_ | `disc-radius` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s mass _cmp_ _n_ | `disc-mass` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _disc_'s damping _cmp_ _n_ | `disc-damping` | disc: disc or instance; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| _object_ is a sensor | `is-sensor` | object: object |
| Distance between _disc_ and _target_ _cmp_ _n_ | `distance` | disc: disc or instance; target: any; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |

### Collisions

| Sentence | Id | Slots |
| --- | --- | --- |
| _object_ is in group _group_ | `in-group` | object: object; group: collision group |
| _object_ accepts group _group_ | `accepts-group` | object: object; group: collision group |

### Objects

| Sentence | Id | Slots |
| --- | --- | --- |
| _object_ is _other_ | `is-object` | object: object; other: object |
| _object_ is controlled by a player | `controlled` | object: object |
| _object_ is controlled by _player_ | `controlled-by` | object: object; player: player |

### Players

| Sentence | Id | Slots |
| --- | --- | --- |
| _player_ is in the match | `in-match` | player: player |
| _player_ is holding _action_ | `holding` | player: player; action: action |
| _player_ has _role_ | `has-role` | player: player; role: role |
| _player_'s name is _text_ | `player-name` | player: player; text: text |
| Number of players in the room _cmp_ _n_ | `players-in-room` | cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |
| Number of players in the match _cmp_ _n_ | `players-in-match` | cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |

### Match

| Sentence | Id | Slots |
| --- | --- | --- |
| The match is running | `match-running` | none |
| The match is paused | `match-paused` | none |
| The current tick _cmp_ _n_ | `current-tick` | cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |

### Time

| Sentence | Id | Slots |
| --- | --- | --- |
| _timer_ _cmp_ _n_ seconds | `timer-compare` | timer: timer variable; cmp: one of "=", "≠", "<", "≤", ">", "≥"; n: number |

### Variables

| Sentence | Id | Slots |
| --- | --- | --- |
| _variable_ _cmp_ _value_ | `variable-compare` | variable: variable; cmp: one of "=", "≠", "<", "≤", ">", "≥"; value: the variable's type |
| _variable_ _is_ _text_ | `variable-text` | variable: variable; is: one of "is", "is not"; text: text |
| _variable_ _state_ | `variable-set` | variable: variable; state: one of "is set", "is empty" |
| _a_ _cmp_ _b_ | `compare` | a: any; cmp: one of "=", "≠", "<", "≤", ">", "≥"; b: any |

### Lists

| Sentence | Id | Slots |
| --- | --- | --- |
| _list_ contains _item_ | `list-contains` | list: any; item: any |
| _list_ is empty | `list-empty` | list: any |

### Advanced

| Sentence | Id | Slots |
| --- | --- | --- |
| _value_ (advanced) | `expression` | value: boolean |

### Logic

| Sentence | Id | Slots |
| --- | --- | --- |
| Any of | `any-of` | none |

## Actions

### Match

| Sentence | Id | Slots |
| --- | --- | --- |
| Start the match | `match-start` | none |
| Stop the match | `match-stop` | none |
| Pause the match | `match-pause` | none |
| Resume the match | `match-resume` | none |
| Finish the match | `match-finish` | none |
| Send chat message _text_ | `send-chat` | text: text; colour: colour (optional); weight: one of "normal", "bold" (optional); style: one of "normal", "italic" (optional); sound: one of "normal", "none", "notification" (optional); to: audience (optional) |
| Send _name_ to the room with _payload_ | `emit` | name: name; payload: JSON payload (optional) |
| Play _sound_ | `play-sound` | sound: asset; at: disc or instance (optional); to: audience (optional); volume: number (optional) |

### Players

| Sentence | Id | Slots |
| --- | --- | --- |
| Put _player_ in the match | `put-in-match` | player: player |
| Put _player_ in the spectators | `put-in-spectators` | player: player |
| Give _player_ control of _disc_ | `give-control` | player: player; disc: disc or instance |
| Release _player_'s disc | `release-control` | player: player |
| Set _player_'s radius to _n_ | `set-player-radius` | player: player; n: number |
| Set _player_'s acceleration to _n_ | `set-player-acceleration` | player: player; n: number |
| Set _player_'s damping to _n_ | `set-player-damping` | player: player; n: number |
| Set _player_'s avatar to _avatar_ | `set-player-avatar` | player: player; avatar: any (optional) |
| Use _schema_ for _player_ | `use-schema` | schema: action-schema; player: player |
| Give _role_ to _player_ | `give-role` | role: role; player: player |
| Take _role_ from _player_ | `take-role` | role: role; player: player |

### Controls

| Sentence | Id | Slots |
| --- | --- | --- |
| Cancel the action | `cancel-action` | none |

### Variables

| Sentence | Id | Slots |
| --- | --- | --- |
| Set _variable_ to _value_ | `set-variable` | variable: variable; value: the variable's type |
| Add _n_ to _variable_ | `add-to-variable` | n: number; variable: variable |
| Store _value_ in _variable_ | `store` | value: the variable's type; variable: variable |

### Time

| Sentence | Id | Slots |
| --- | --- | --- |
| Start _timer_ | `timer-start` | timer: timer variable |
| Stop _timer_ | `timer-stop` | timer: timer variable |
| Reset _timer_ | `timer-reset` | timer: timer variable |

### Events

| Sentence | Id | Slots |
| --- | --- | --- |
| Raise _event_ | `raise` | event: custom-event |

### UI

| Sentence | Id | Slots |
| --- | --- | --- |
| Show _node_ for _who_ | `ui-show` | node: ui-node; who: player (optional) |
| Hide _node_ for _who_ | `ui-hide` | node: ui-node; who: player (optional) |
| Open _node_ for _who_ | `ui-open` | node: ui-node; who: player (optional) |
| Close _node_ for _who_ | `ui-close` | node: ui-node; who: player (optional) |

### Advanced

| Sentence | Id | Slots |
| --- | --- | --- |
| Run script _script_ (advanced) | `run-script` | script: script |

### World

| Sentence | Id | Slots |
| --- | --- | --- |
| Create a disc at _position_ | `create-disc` | position: point; radius: number (optional); mass: number (optional); damping: number (optional); groups: collision groups (optional); height: number (optional); rising: number (optional); airGravity: number (optional); bounce: number (optional); tall: number (optional); store: variable (optional) |
| Create a wall through _points_ | `create-wall` | points: list of point; ends: one of "open", "closed" (optional); bias: number (optional); tall: number (optional); store: variable (optional) |
| Create a joint between _first_ and _second_ | `create-joint` | first: disc or instance; second: disc or instance; distance: number (optional); store: variable (optional) |
| Create a crossing from _start_ to _end_ | `create-crossing` | start: point; end: point; store: variable (optional) |
| Create an instance of _prefab_ at _position_ | `create-instance` | prefab: prefab; position: point; store: variable (optional) |
| Create a visual | `create-visual` | store: variable (optional) |
| Create a camera at _center_ | `create-camera` | center: point; width: number (optional); height: number (optional); to: audience (optional); store: variable (optional) |
| Set the layer order to _layers_ | `set-layer-order` | layers: list of text |
| Destroy _object_ | `destroy` | object: object |
| Let _audience_ know _object_ | `set-audience` | object: object; audience: audience |
| Set _object_'s distance to _value_ | `set-joint-distance` | object: object; value: number |
| Set _object_'s strength to _value_ | `set-joint-strength` | object: object; value: any |

### Discs

| Sentence | Id | Slots |
| --- | --- | --- |
| Move _disc_ to _position_ | `move-disc` | disc: disc or instance; position: point |
| Set _disc_'s velocity to _velocity_ | `set-velocity` | disc: disc or instance; velocity: point |
| Set _disc_'s gravity to _value_ | `set-disc-gravity` | disc: disc or instance; value: point |
| Set _disc_'s damping to _value_ | `set-disc-damping` | disc: disc or instance; value: number |
| Set _disc_'s mass to _value_ | `set-disc-mass` | disc: disc or instance; value: number |
| Set _disc_'s radius to _value_ | `set-disc-radius` | disc: disc or instance; value: number |
| Set _disc_'s rotation to _value_ | `set-disc-rotation` | disc: disc or instance; value: number |
| Set _disc_'s angular velocity to _value_ | `set-disc-angularVelocity` | disc: disc or instance; value: number |
| Launch _disc_ upward at _speed_ | `launch-disc` | disc: disc or instance; speed: number |
| Set _disc_'s avatar to _avatar_ | `set-disc-avatar` | disc: disc or instance; avatar: any (optional) |
| Paint _disc_ _fill_ | `set-disc-appearance` | disc: disc or instance; fill: colour; stroke: colour (optional); strokeWidth: number (optional); opacity: number (optional) |
| Set _disc_'s layer to _layer_ | `set-disc-layer` | disc: disc or instance; layer: layer |

### Collisions

| Sentence | Id | Slots |
| --- | --- | --- |
| Set _object_'s tall to _value_ | `set-tall` | object: object; value: number (optional) |
| Add _object_ to group _group_ | `add-group` | object: object; group: collision group |
| Remove _object_ from group _group_ | `remove-group` | object: object; group: collision group |
| Set _object_'s accepted groups to _groups_ | `set-accepted` | object: object; groups: collision groups |
| Set _object_'s bounciness to _n_ | `set-bounciness` | object: object; n: number |
| Make _object_ _kind_ | `set-sensor` | object: object; kind: one of "a sensor", "solid" |

### Walls

| Sentence | Id | Slots |
| --- | --- | --- |
| Move _wall_ to _position_ | `place-wall` | wall: wall; position: point |
| Set _wall_'s velocity to _velocity_ | `set-wall-velocity` | wall: wall; velocity: point |
| Slide _wall_ to _position_ over _seconds_ seconds | `move-wall` | wall: wall; position: point; seconds: number |
| Move _wall_ through _points_ over _seconds_ seconds, _then_ | `wall-follow` | wall: wall; points: list of point; seconds: number; then: one of "once", "repeating", "back and forth" |
| Move point _index_ of _wall_ to _position_ | `set-wall-point` | index: number; wall: wall; position: point |
| Curve edge _index_ of _wall_ by _curve_ | `set-wall-curve` | index: number; wall: wall; curve: number |
| Set _wall_'s thickness to _bias_ | `set-wall-bias` | wall: wall; bias: number |

### Visuals

| Sentence | Id | Slots |
| --- | --- | --- |
| Change _object_'s _property_ to _value_ | `change-camera` | object: object; property: one of "center", "width", "height"; value: any |

## Slot types

- JSON payload
- action
- action-schema
- any
- asset
- audience
- boolean
- collision group
- collision groups
- colour
- crossing
- custom-event
- disc or instance
- layer
- list of point
- list of text
- name
- number
- object
- one of "=", "≠", "<", "≤", ">", "≥"
- one of "a sensor", "solid"
- one of "center", "width", "height"
- one of "either", "forward", "backward"
- one of "is set", "is empty"
- one of "is", "is not"
- one of "normal", "bold"
- one of "normal", "italic"
- one of "normal", "none", "notification"
- one of "once", "repeating", "back and forth"
- one of "open", "closed"
- player
- point
- prefab
- role
- script
- text
- the variable's type
- timer variable
- ui-node
- variable
- wall
