メインコンテンツまでスキップ

トリガー リファレンス

trigger は 35 個。同じ名前が三か所で使えます — event の trigger、patch のイベントノード、スクリプト内の ctx.on(...) です。

分岐を持つ trigger は結果ごとに step のリストを保持するので、一つの event ですべてに応えられます — イベントを参照。

エディタ上の名前カテゴリ分岐Id(スクリプト・patch)
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

パラメータ

Game controls

Id: on-game-control

カテゴリ control · 分岐 idle, move, jump, run

パラメータ既定値選択肢 / ラベル
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

カテゴリ external

パラメータ既定値選択肢 / ラベル
idstringAction id

Signal

Id: on-signal

カテゴリ external

パラメータ既定値選択肢 / ラベル
signalstring""Signal

Variable change

Id: on-variable-change

カテゴリ external

パラメータ既定値選択肢 / ラベル
variablestring""Variable

Hover out

Id: on-blur

カテゴリ input

パラメータはありません。

Click

Id: on-click

カテゴリ input

パラメータ既定値選択肢 / ラベル
buttonselect"any"any, left, right, middle

Double click

Id: on-double-click

カテゴリ input · スコープ entity

パラメータ既定値選択肢 / ラベル
buttonselect"any"any, left, right, middle

Drag

Id: on-drag

カテゴリ input · スコープ entity · anchor 上のみ surface

パラメータはありません。

Hover

Id: on-hover

カテゴリ input · 分岐 enter, exit · スコープ entity

パラメータはありません。

Key

Id: on-key

カテゴリ input · 分岐 down, up

パラメータ既定値選択肢 / ラベル
codestringCode
codesarray[]Keys
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives
ignoreRepeatbooleanfalseIgnore auto-repeat

Long press

Id: on-long-press

カテゴリ input · スコープ entity

パラメータ既定値選択肢 / ラベル
buttonselect"any"any, left, right, middle

Press on the object

Id: on-mouse

カテゴリ input · 分岐 click, down, up · スコープ entity

パラメータ既定値選択肢 / ラベル
buttonselect"any"any, left, right, middle
ctrlbooleanfalse
altbooleanfalse
shiftbooleanfalse
metabooleanfalse
doublebooleanfalseDouble press
bindstring""Project bind
altsarray[]Alternatives

Pinch

Id: on-pinch

カテゴリ input · スコープ entity · anchor 上のみ surface

パラメータはありません。

Pointer lock

Id: on-pointer-lock

カテゴリ input

パラメータはありません。

Cursor move

Id: on-pointer-move

カテゴリ input

パラメータはありません。

Rotate

Id: on-rotate

カテゴリ input · スコープ entity · anchor 上のみ surface

パラメータはありません。

Scroll

Id: on-scroll

カテゴリ input

パラメータ既定値選択肢 / ラベル
directionselect"any"any, up, down

Launch

Id: on-launch

カテゴリ lifecycle

パラメータはありません。

Pause

Id: on-pause

カテゴリ lifecycle

パラメータはありません。

Resize

Id: on-resize

カテゴリ lifecycle

パラメータはありません。

Resume

Id: on-resume

カテゴリ lifecycle

パラメータはありません。

Visibility

Id: on-visibility

カテゴリ lifecycle · 分岐 show, hide

パラメータはありません。

Collision

Id: on-collide

カテゴリ physics

パラメータはありません。

Distance

Id: on-distance

カテゴリ proximity · 分岐 enter, exit

パラメータ既定値選択肢 / ラベル
targetentitynullOther object
distancenumber1Distance
fireOnStartbooleanfalseCheck at start

State active

Id: on-state-active

カテゴリ state · state ごとに発火

パラメータはありません。

State inactive

Id: on-state-inactive

カテゴリ state · state ごとに発火

パラメータはありません。

Every N seconds

Id: on-interval

カテゴリ time

パラメータ既定値選択肢 / ラベル
secondsnumber1Every
repeatnumber0Repeat

Delay

Id: on-timeout

カテゴリ time

パラメータ既定値選択肢 / ラベル
secondsnumber1After

Detect

Id: on-detect

カテゴリ tracking · anchor 上のみ image, qr, face, surface

パラメータはありません。

Tracking lost

Id: on-lost

カテゴリ tracking · anchor 上のみ image, qr, face, surface

パラメータはありません。

Placed

Id: on-placed

カテゴリ tracking · anchor 上のみ surface

パラメータはありません。

VPS error

Id: on-vps-error

カテゴリ tracking · anchor 上のみ surface

パラメータはありません。

VPS localized

Id: on-vps-localized

カテゴリ tracking · anchor 上のみ surface

パラメータはありません。

VPS localization failed

Id: on-vps-not-localized

カテゴリ tracking · anchor 上のみ surface

パラメータはありません。

VPS ready

Id: on-vps-ready

カテゴリ tracking · anchor 上のみ surface

パラメータはありません。