Script Listener Actions
Overview
Script hooks execute action arrays through a single validated path.
Supported hooks:
onRunonStateChange
Supported actions:
set-inputfire-triggerset-object-propertyseek-timelineplay-state-machineset-script-input
Validation Contract
Action payloads are validated before execution.
- Non-finite numbers are rejected.
set-object-propertyvalidates by target property type.- Invalid actions are reported in diagnostics and stop the current action chain.
Binding Behavior
Hooks run automatically when a script is bound to a target and the runtime event matches.
globalbindings always match.stateMachinebindings match by state machine ID.
Use:
bindScript(scriptId, binding)unbindScript(scriptId, bindingId)
Diagnostics
Read latest hook execution diagnostics via:
getScriptDiagnostics(scriptId)
Each result includes:
- action payload
okmessageexecutedAtMs
Related
- Script overview: /help/animation/script-overview
- Script inputs: /help/animation/script-inputs
- Script testing: /help/animation/script-testing