Skip to reading
The Cutscene Designer

38. Call a script from an event

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page

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.

Code example
{
  "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.

Source table from 38. Call a script from an event, page 42
Good helper jobKeep clear
Prepare / restore a group of temporary settingsWho owns the original values.
Control an advanced staged behaviorWhen it starts and stops.
Perform a one-time reward or game-state changeIts 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

Page 42 of 78Permalink
Go to page