setStateHook
setStateHook(
def,name,hook,action,arg?,params?):FsmDefinition
Defined in: ai/fsm/fsmGraph.ts:89
Point a state hook at an action, with its input in either form: the canonical
string (arg) or the action’s declared parameters. A bare name stays a bare
string in the data — the shorthand most hooks use — and clearing the name
clears the hook.
Parameters
Section titled “Parameters”string
"onEnter" | "onUpdate" | "onExit"
action
Section titled “action”string
string
params?
Section titled “params?”Record<string, AiParamValue>