Skip to reading
The Cutscene Designer

39. Call exposed functions with parameters

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 illustrations

For reusable helpers, expose a function through Functions as Nodes in the Script Designer. Define the actual code function name, its display name and parameters in the same order as the code, then choose Use Definitions.

Figure 24. Call Script Function exposes the registered function’s editable parameters in the cutscene event.

Code example
func accent(power: float = 0.35) -> void:
    await ZoomBlur({
        "strength":power, "duration":0.6, "wait":false
    })

Put this function inside a script extending PCAScriptBase. Expose it as Camera Accent with one float parameter named power, default 0.35. Add Call Script Function to the cutscene, select Camera Accent and set its parameter.

Use Definitions saves the callable definition; it does not execute the effect. The event invokes it during playback.

A caller-aware this value needs a real calling object in the captured context. A standalone Test Cutscene has no guaranteed object caller. Use explicit IDs in a reusable cinematic unless the caller is deliberately part of its design.

Page 43 of 78Permalink
Go to page