Skip to reading
The Cutscene Designer

B1. Complete introduction wrapper

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
Code example
extends PCAScriptBase
Code example
func run() -> void:
    if bool(Runtime.variables.get("intro_seen", false)):
        return
    var actor: Node = Runtime.entity_nodes.get("ada")
    var normal_speed: float = float(actor.get("walk_speed"))
    var scene: Dictionary = Runtime.project.get_cutscene("workshop_intro")
    if bool(scene.get("skippable", true)):
        await ShowGUI({"guiId":"skip_controls"})
    await StartCutscene({"cutsceneId":"workshop_intro"})
    await HideGUI({"guiId":"title_card"})
    await HideGUI({"guiId":"skip_controls"})
    await HideGUI({"guiId":"cinematic_speech"})
    await StopSound({"channel":"intro_bell"})
    Runtime.stop_voice()
    actor.call("stop_moving")
    actor.set("walk_speed", normal_speed)
    await CharacterTeleport({
        "characterId":"ada", "sceneId":"lab",
        "position":[-0.5, 0.0, 1.3]
    })
    await PlayAnimation({"sceneId":"lab",
        "entityId":"ada", "clip":"idle"})
    await PlayAnimation({"sceneId":"lab",
        "entityId":"elias", "clip":"idle"})
    await SetVariable({"name":"intro_seen", "value":true})

Use your own actor IDs and final mark when adapting the example. The guard and cleanup run around the timeline, so an early skip does not bypass them.

Page 69 of 78Permalink
Go to page