トリガー
トリガーは 35 個あり、どれでもイベントを開始できます。その多くは、スクリプトでは ctx.on(...)、パッチではイベントノードでも受け取れます。Key はそこでは on-keydown と on-keyup、Press on the object は on-mousedown、on-mouseup、on-click として届きます。詳しくは ctx API をご覧ください。
分岐を持つトリガーもあります。分岐は結果ごとに 1 つあり、それぞれに専用のステップのリストがあります。そのため、1 つのイベントですべての結果に対応できます。イベントを参照してください。
| エディターでの名前 | カテゴリ | 分岐 | ID(スクリプトとパッチ用) |
|---|---|---|---|
| Game controls | control | idle, move, jump, run | on-game-control |
| UI action | external | — | on-divkit-action |
| Signal | external | — | on-signal |
| Variable change | external | — | on-variable-change |
| Hover out | input | — | on-blur |
| Click | input | — | on-click |
| Double click | input | — | on-double-click |
| Drag | input | — | on-drag |
| Hover | input | enter, exit | on-hover |
| Key | input | down, up | on-key |
| Long press | input | — | on-long-press |
| Press on the object | input | click, down, up | on-mouse |
| Pinch | input | — | on-pinch |
| Pointer lock | input | — | on-pointer-lock |
| Cursor move | input | — | on-pointer-move |
| Rotate | input | — | on-rotate |
| Scroll | input | — | on-scroll |
| Launch | lifecycle | — | on-launch |
| Pause | lifecycle | — | on-pause |
| Resize | lifecycle | — | on-resize |
| Resume | lifecycle | — | on-resume |
| Visibility | lifecycle | show, hide | on-visibility |
| Collision | physics | — | on-collide |
| Distance | proximity | enter, exit | on-distance |
| State active | state | — | on-state-active |
| State inactive | state | — | on-state-inactive |
| Every N seconds | time | — | on-interval |
| Delay | time | — | on-timeout |
| Detect | tracking | — | on-detect |
| Tracking lost | tracking | — | on-lost |
| Placed | tracking | — | on-placed |
| VPS error | tracking | — | on-vps-error |
| VPS localized | tracking | — | on-vps-localized |
| VPS localization failed | tracking | — | on-vps-not-localized |
| VPS ready | tracking | — | on-vps-ready |
設定
Game controls
ID: on-game-control
カテゴリ control · 分岐 idle, move, jump, run
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
mode | select | "walk" | walk, fly, top_down |
turnToMove | boolean | true | Auto-orient |
towards | select | "camera" | camera, axis |
cameraRelative | boolean | true | Camera relative |
speed | number | 3 | Pos. Speed |
runMultiplier | number | 2 | Run Factor |
turnSpeed | number | 720 | Rot. Speed |
posDelayIn | number | 0 | Pos. Delay |
posDelayOut | number | 0 | |
rotDelayIn | number | 0 | Rot. Delay |
rotDelayOut | number | 0 | |
scheme | select | "both" | wasd, arrows, both |
rotateBy | select | "mouse" | mouse, keys, both |
touch | boolean | true | Touch controls |
touchRotateBy | select | "drag" | drag, joystick |
stickCorner | select | "bottom_left" | top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center, bottom_right |
jumpCorner | select | "bottom_right" | top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center, bottom_right |
touchOffsetX | number | 30 | Offset |
touchOffsetY | number | 30 | |
buttonSize | number | 120 | Button Size |
touchVisibility | select | "show" | show, hide |
colliderShape | select | "capsule" | capsule, sphere |
colliderRadius | number | 0.5 | Size |
colliderHeight | number | 1.8 | |
colliderX | number | 0 | Position |
colliderY | number | 0.9 | |
colliderZ | number | 0 | |
mass | number | 1 | Mass |
colliderHelper | select | "hide" | show, hide |
jumpHeight | number | 0 | Jump |
airControl | number | 0.3 | Air Control |
resetY | number | 0 | Rst Y-offset |
clickToMove | boolean | false | Click To Move |
followCamera | entity | null | Camera |
orientTo | select | "normal" | normal, angle |
camPosDelay | number | 0.12 | Pos. Delay |
camRotDelay | number | 0.08 | Rot. Delay |
upDown | select | "yes" | yes, no, limit |
upDownMin | number | 0 | Limit |
upDownMax | number | 89 | |
leftRight | select | "yes" | yes, no, limit |
leftRightMin | number | -90 | Limit |
leftRightMax | number | 90 |
UI action
ID: on-divkit-action
カテゴリ external
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
id | string | — | Action id |
Signal
ID: on-signal
カテゴリ external
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
signal | string | "" | Signal |
Variable change
ID: on-variable-change
カテゴリ external
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
variable | string | "" | Variable |
Hover out
ID: on-blur
カテゴリ input
設定はありません。
Click
ID: on-click
カテゴリ input
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
button | select | "any" | any, left, right, middle |
Double click
ID: on-double-click
カテゴリ input · スコープ entity
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
button | select | "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
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
code | string | — | Code |
codes | array | [] | Keys |
ctrl | boolean | false | |
alt | boolean | false | |
shift | boolean | false | |
meta | boolean | false | |
double | boolean | false | Double press |
bind | string | "" | Project bind |
alts | array | [] | Alternatives |
ignoreRepeat | boolean | false | Ignore auto-repeat |
Long press
ID: on-long-press
カテゴリ input · スコープ entity
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
button | select | "any" | any, left, right, middle |
Press on the object
ID: on-mouse
カテゴリ input · 分岐 click, down, up · スコープ entity
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
button | select | "any" | any, left, right, middle |
ctrl | boolean | false | |
alt | boolean | false | |
shift | boolean | false | |
meta | boolean | false | |
double | boolean | false | Double press |
bind | string | "" | Project bind |
alts | array | [] | 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
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
direction | select | "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
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
target | entity | null | Other object |
distance | number | 1 | Distance |
fireOnStart | boolean | false | Check at start |
State active
ID: on-state-active
カテゴリ state · ステートごとに発生
設定はありません。
State inactive
ID: on-state-inactive
カテゴリ state · ステートごとに発生
設定はありません。
Every N seconds
ID: on-interval
カテゴリ time
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
seconds | number | 1 | Every |
repeat | number | 0 | Repeat |
Delay
ID: on-timeout
カテゴリ time
| 設定 | 型 | 初期値 | 選択肢またはラベル |
|---|---|---|---|
seconds | number | 1 | After |
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
設定はありません。