Skip to main content

Trigger reference

35 triggers. The same names work in three places: an event's trigger, a patch's event node, and ctx.on(...) in a script.

A trigger with branches keeps one list of steps per outcome, so one event answers all of them — see Events.

In the editorCategoryBranchesId (scripts, patches)
Game controlscontrolidle, move, jump, runon-game-control
UI actionexternalon-divkit-action
Signalexternalon-signal
Variable changeexternalon-variable-change
Hover outinputon-blur
Clickinputon-click
Double clickinputon-double-click
Draginputon-drag
Hoverinputenter, exiton-hover
Keyinputdown, upon-key
Long pressinputon-long-press
Press on the objectinputclick, down, upon-mouse
Pinchinputon-pinch
Pointer lockinputon-pointer-lock
Cursor moveinputon-pointer-move
Rotateinputon-rotate
Scrollinputon-scroll
Launchlifecycleon-launch
Pauselifecycleon-pause
Resizelifecycleon-resize
Resumelifecycleon-resume
Visibilitylifecycleshow, hideon-visibility
Collisionphysicson-collide
Distanceproximityenter, exiton-distance
State activestateon-state-active
State inactivestateon-state-inactive
Every N secondstimeon-interval
Delaytimeon-timeout
Detecttrackingon-detect
Tracking losttrackingon-lost
Placedtrackingon-placed
VPS errortrackingon-vps-error
VPS localizedtrackingon-vps-localized
VPS localization failedtrackingon-vps-not-localized
VPS readytrackingon-vps-ready

Parameters

Game controls

Id: on-game-control

Category control · branches idle, move, jump, run

ParamTypeDefaultOptions / label
modeselect"walk"walk, fly, top_down
turnToMovebooleantrueAuto-orient
towardsselect"camera"camera, axis
cameraRelativebooleantrueCamera relative
speednumber3Pos. Speed
runMultipliernumber2Run Factor
turnSpeednumber720Rot. Speed
posDelayInnumber0Pos. Delay
posDelayOutnumber0
rotDelayInnumber0Rot. Delay
rotDelayOutnumber0
schemeselect"both"wasd, arrows, both
rotateByselect"mouse"mouse, keys, both
touchbooleantrueTouch controls
touchRotateByselect"drag"drag, joystick
stickCornerselect"bottom_left"top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center, bottom_right
jumpCornerselect"bottom_right"top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center, bottom_right
touchOffsetXnumber30Offset
touchOffsetYnumber30
buttonSizenumber120Button Size
touchVisibilityselect"show"show, hide
colliderShapeselect"capsule"capsule, sphere
colliderRadiusnumber0.5Size
colliderHeightnumber1.8
colliderXnumber0Position
colliderYnumber0.9
colliderZnumber0
massnumber1Mass
colliderHelperselect"hide"show, hide
jumpHeightnumber0Jump
airControlnumber0.3Air Control
resetYnumber0Rst Y-offset
clickToMovebooleanfalseClick To Move
followCameraentitynullCamera
orientToselect"normal"normal, angle
camPosDelaynumber0.12Pos. Delay
camRotDelaynumber0.08Rot. Delay
upDownselect"yes"yes, no, limit
upDownMinnumber0Limit
upDownMaxnumber89
leftRightselect"yes"yes, no, limit
leftRightMinnumber-90Limit
leftRightMaxnumber90

UI action

Id: on-divkit-action

Category external

ParamTypeDefaultOptions / label
idstringAction id

Signal

Id: on-signal

Category external

ParamTypeDefaultOptions / label
signalstring""Signal

Variable change

Id: on-variable-change

Category external

ParamTypeDefaultOptions / label
variablestring""Variable

Hover out

Id: on-blur

Category input

No parameters.

Click

Id: on-click

Category input

ParamTypeDefaultOptions / label
buttonselect"any"any, left, right, middle

Double click

Id: on-double-click

Category input · scope entity

ParamTypeDefaultOptions / label
buttonselect"any"any, left, right, middle

Drag

Id: on-drag

Category input · scope entity · only on anchors surface

No parameters.

Hover

Id: on-hover

Category input · branches enter, exit · scope entity

No parameters.

Key

Id: on-key

Category input · branches down, up

ParamTypeDefaultOptions / label
codestringCode
codesarray[]Keys
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives
ignoreRepeatbooleanfalseIgnore auto-repeat

Long press

Id: on-long-press

Category input · scope entity

ParamTypeDefaultOptions / label
buttonselect"any"any, left, right, middle

Press on the object

Id: on-mouse

Category input · branches click, down, up · scope entity

ParamTypeDefaultOptions / label
buttonselect"any"any, left, right, middle
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives

Pinch

Id: on-pinch

Category input · scope entity · only on anchors surface

No parameters.

Pointer lock

Id: on-pointer-lock

Category input

No parameters.

Cursor move

Id: on-pointer-move

Category input

No parameters.

Rotate

Id: on-rotate

Category input · scope entity · only on anchors surface

No parameters.

Scroll

Id: on-scroll

Category input

ParamTypeDefaultOptions / label
directionselect"any"any, up, down

Launch

Id: on-launch

Category lifecycle

No parameters.

Pause

Id: on-pause

Category lifecycle

No parameters.

Resize

Id: on-resize

Category lifecycle

No parameters.

Resume

Id: on-resume

Category lifecycle

No parameters.

Visibility

Id: on-visibility

Category lifecycle · branches show, hide

No parameters.

Collision

Id: on-collide

Category physics

No parameters.

Distance

Id: on-distance

Category proximity · branches enter, exit

ParamTypeDefaultOptions / label
targetentitynullOther object
distancenumber1Distance
fireOnStartbooleanfalseCheck at start

State active

Id: on-state-active

Category state · fires per state

No parameters.

State inactive

Id: on-state-inactive

Category state · fires per state

No parameters.

Every N seconds

Id: on-interval

Category time

ParamTypeDefaultOptions / label
secondsnumber1Every
repeatnumber0Repeat

Delay

Id: on-timeout

Category time

ParamTypeDefaultOptions / label
secondsnumber1After

Detect

Id: on-detect

Category tracking · only on anchors image, qr, face, surface

No parameters.

Tracking lost

Id: on-lost

Category tracking · only on anchors image, qr, face, surface

No parameters.

Placed

Id: on-placed

Category tracking · only on anchors surface

No parameters.

VPS error

Id: on-vps-error

Category tracking · only on anchors surface

No parameters.

VPS localized

Id: on-vps-localized

Category tracking · only on anchors surface

No parameters.

VPS localization failed

Id: on-vps-not-localized

Category tracking · only on anchors surface

No parameters.

VPS ready

Id: on-vps-ready

Category tracking · only on anchors surface

No parameters.