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

トリガー

トリガーは 35 個あり、どれでもイベントを開始できます。その多くは、スクリプトでは ctx.on(...)、パッチではイベントノードでも受け取れます。Key はそこでは on-keydown と on-keyup、Press on the object は on-mousedown、on-mouseup、on-click として届きます。詳しくは ctx API をご覧ください。

分岐を持つトリガーもあります。分岐は結果ごとに 1 つあり、それぞれに専用のステップのリストがあります。そのため、1 つのイベントですべての結果に対応できます。イベントを参照してください。

エディターでの名前カテゴリ分岐ID(スクリプトとパッチ用)
Game controlscontrolidle, move, jump, runon-game-control
UI actionexternal—on-divkit-action
Signalexternal—on-signal
Variable changeexternal—on-variable-change
Hover outinput—on-blur
Clickinput—on-click
Double clickinput—on-double-click
Draginput—on-drag
Hoverinputenter, exiton-hover
Keyinputdown, upon-key
Long pressinput—on-long-press
Press on the objectinputclick, down, upon-mouse
Pinchinput—on-pinch
Pointer lockinput—on-pointer-lock
Cursor moveinput—on-pointer-move
Rotateinput—on-rotate
Scrollinput—on-scroll
Launchlifecycle—on-launch
Pauselifecycle—on-pause
Resizelifecycle—on-resize
Resumelifecycle—on-resume
Visibilitylifecycleshow, hideon-visibility
Collisionphysics—on-collide
Distanceproximityenter, exiton-distance
State activestate—on-state-active
State inactivestate—on-state-inactive
Every N secondstime—on-interval
Delaytime—on-timeout
Detecttracking—on-detect
Tracking losttracking—on-lost
Placedtracking—on-placed
VPS errortracking—on-vps-error
VPS localizedtracking—on-vps-localized
VPS localization failedtracking—on-vps-not-localized
VPS readytracking—on-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

設定型初期値選択肢またはラベル
idstring—Action 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 · 使えるアンカー surface

設定はありません。

Hover​

ID: on-hover

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

設定はありません。

Key​

ID: on-key

カテゴリ input · 分岐 down, up

設定型初期値選択肢またはラベル
codestring—Code
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 · 使えるアンカー surface

設定はありません。

Pointer lock​

ID: on-pointer-lock

カテゴリ input

設定はありません。

Cursor move​

ID: on-pointer-move

カテゴリ input

設定はありません。

Rotate​

ID: on-rotate

カテゴリ input · スコープ entity · 使えるアンカー 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 inactive​

ID: on-state-inactive

カテゴリ state · ステートごとに発生

設定はありません。

Every N seconds​

ID: on-interval

カテゴリ time

設定型初期値選択肢またはラベル
secondsnumber1Every
repeatnumber0Repeat

Delay​

ID: on-timeout

カテゴリ time

設定型初期値選択肢またはラベル
secondsnumber1After

Detect​

ID: on-detect

カテゴリ tracking · 使えるアンカー image, qr, face, body, surface

設定はありません。

Tracking lost​

ID: on-lost

カテゴリ tracking · 使えるアンカー image, qr, face, body, surface

設定はありません。

Placed​

ID: on-placed

カテゴリ tracking · 使えるアンカー surface

設定はありません。

VPS error​

ID: on-vps-error

カテゴリ tracking · 使えるアンカー surface

設定はありません。

VPS localized​

ID: on-vps-localized

カテゴリ tracking · 使えるアンカー surface

設定はありません。

VPS localization failed​

ID: on-vps-not-localized

カテゴリ tracking · 使えるアンカー surface

設定はありません。

VPS ready​

ID: on-vps-ready

カテゴリ tracking · 使えるアンカー surface

設定はありません。