38. Call a script from an event
The Run Script action opens a script picker by name and ID. Its stored action type is RunVisualScript for compatibility, but the picker supports GDScript, PCA Script, Lua, BASIC and Visual records.
{
"type":"RunVisualScript",
"scriptId":"cinematic_helpers"
}A normal Run Script event calls the script’s entry function. Use it for a small helper that changes a group of settings, stages a complicated pose or starts a background camera-follow task.
With ordinary fixed-time cues, a script may continue while other events start. When a helper reacts to a cutscene-finished event, filter by the intended cutscene and clean up its work. In a managed sequence, hooks can also perform short setup or cleanup.
| Good helper job | Keep clear |
|---|---|
| Prepare / restore a group of temporary settings | Who owns the original values. |
| Control an advanced staged behavior | When it starts and stops. |
| Perform a one-time reward or game-state change | Its guard and replay behavior. |
Do not use the outer introduction wrapper as a Run Script event inside the same introduction. It would start that cutscene again. The wrapper belongs to the scene, trigger, GUI or startup route that launches it.
0.86.4.3 / Preview, cue timing and hooks > Page 74
Cutscene Designer | 0.86.4.3
