Aller au contenu principal

Référence des déclencheurs

35 déclencheurs. Les mêmes noms fonctionnent à trois endroits : le déclencheur d’un événement, le nœud d’événement d’un patch, et ctx.on(...) dans un script.

Un déclencheur avec des branches garde une liste d’étapes par issue, si bien qu’un seul événement répond à toutes — voir Événements.

Dans l'éditeurCatégorieBranchesId (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

Paramètres

Game controls

Id: on-game-control

Catégorie control · branches idle, move, jump, run

ParamètreTypeDéfautOptions / libellé
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

Catégorie external

ParamètreTypeDéfautOptions / libellé
idstringAction id

Signal

Id: on-signal

Catégorie external

ParamètreTypeDéfautOptions / libellé
signalstring""Signal

Variable change

Id: on-variable-change

Catégorie external

ParamètreTypeDéfautOptions / libellé
variablestring""Variable

Hover out

Id: on-blur

Catégorie input

Aucun paramètre.

Click

Id: on-click

Catégorie input

ParamètreTypeDéfautOptions / libellé
buttonselect"any"any, left, right, middle

Double click

Id: on-double-click

Catégorie input · portée entity

ParamètreTypeDéfautOptions / libellé
buttonselect"any"any, left, right, middle

Drag

Id: on-drag

Catégorie input · portée entity · seulement sur les ancres surface

Aucun paramètre.

Hover

Id: on-hover

Catégorie input · branches enter, exit · portée entity

Aucun paramètre.

Key

Id: on-key

Catégorie input · branches down, up

ParamètreTypeDéfautOptions / libellé
codestringCode
codesarray[]Keys
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives
ignoreRepeatbooleanfalseIgnore auto-repeat

Long press

Id: on-long-press

Catégorie input · portée entity

ParamètreTypeDéfautOptions / libellé
buttonselect"any"any, left, right, middle

Press on the object

Id: on-mouse

Catégorie input · branches click, down, up · portée entity

ParamètreTypeDéfautOptions / libellé
buttonselect"any"any, left, right, middle
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives

Pinch

Id: on-pinch

Catégorie input · portée entity · seulement sur les ancres surface

Aucun paramètre.

Pointer lock

Id: on-pointer-lock

Catégorie input

Aucun paramètre.

Cursor move

Id: on-pointer-move

Catégorie input

Aucun paramètre.

Rotate

Id: on-rotate

Catégorie input · portée entity · seulement sur les ancres surface

Aucun paramètre.

Scroll

Id: on-scroll

Catégorie input

ParamètreTypeDéfautOptions / libellé
directionselect"any"any, up, down

Launch

Id: on-launch

Catégorie lifecycle

Aucun paramètre.

Pause

Id: on-pause

Catégorie lifecycle

Aucun paramètre.

Resize

Id: on-resize

Catégorie lifecycle

Aucun paramètre.

Resume

Id: on-resume

Catégorie lifecycle

Aucun paramètre.

Visibility

Id: on-visibility

Catégorie lifecycle · branches show, hide

Aucun paramètre.

Collision

Id: on-collide

Catégorie physics

Aucun paramètre.

Distance

Id: on-distance

Catégorie proximity · branches enter, exit

ParamètreTypeDéfautOptions / libellé
targetentitynullOther object
distancenumber1Distance
fireOnStartbooleanfalseCheck at start

State active

Id: on-state-active

Catégorie state · se déclenche par state

Aucun paramètre.

State inactive

Id: on-state-inactive

Catégorie state · se déclenche par state

Aucun paramètre.

Every N seconds

Id: on-interval

Catégorie time

ParamètreTypeDéfautOptions / libellé
secondsnumber1Every
repeatnumber0Repeat

Delay

Id: on-timeout

Catégorie time

ParamètreTypeDéfautOptions / libellé
secondsnumber1After

Detect

Id: on-detect

Catégorie tracking · seulement sur les ancres image, qr, face, surface

Aucun paramètre.

Tracking lost

Id: on-lost

Catégorie tracking · seulement sur les ancres image, qr, face, surface

Aucun paramètre.

Placed

Id: on-placed

Catégorie tracking · seulement sur les ancres surface

Aucun paramètre.

VPS error

Id: on-vps-error

Catégorie tracking · seulement sur les ancres surface

Aucun paramètre.

VPS localized

Id: on-vps-localized

Catégorie tracking · seulement sur les ancres surface

Aucun paramètre.

VPS localization failed

Id: on-vps-not-localized

Catégorie tracking · seulement sur les ancres surface

Aucun paramètre.

VPS ready

Id: on-vps-ready

Catégorie tracking · seulement sur les ancres surface

Aucun paramètre.