Skip to reading
First Light, Part 4: The Message in the Machine

Let Pip open the shutter once

Edition 0.86.3.4

Part 4 of the First Light course. Build a two-character rescue using shared variables, attach-point alignment, sparks, a camera close-up, separate journals and a timed lift reserve.

Download PDFView PDF page

12 / SCRIPT 4 OF 5

1. Script ID: release_lift. Name it Release Lift. Use your actual cutscene ID in the StartCutscene line if the editor assigned a different one.

Code example
func run():
Code example
    if ActivePlayer() != "new_character":
Code example
        return
    match int(Runtime.variables.get("lift_stage", 0)):
Code example
        1, 2:
            await ShowMessage({"text": "Pip: Fit the loose copper pin first."})
Code example
        3:
Code example
            if Runtime.variables.get("lift_seconds", 0) <= 0:
                await ShowMessage({"text": "No reserve. Tab to Kit and recharge."})
Code example
                return
            await SetVariable({"name": "lift_stage", "value": 4})
            await SetVariable({"name": "lift_seconds", "value": 0})
            await CallScript("relay_sync")
            await StartCutscene({"cutsceneId": "lift_rescue"})
Code example
        4:
            await ShowMessage({"text": "The gate is open. Nell is safe."})

2. Wire the cabinet. Select Relay Room › Scene Objects › Relay Cabinet › Verb Actions. Set Default Verb › Use. Under Use Verb — Step 1 select Run Visual Script › Release Lift. Apply and save. Once the pin is fitted, the player should click the exposed teal cabinet face beside it.

Why open the gate before the movie? Stage 4 is the actual rescue. Relay Sync opens the shutter and shows Nell. The movie then gives the camera a brief shake, moves the camera toward Nell and shows her reply. Even if the player presses Escape, the game already knows she is free.

An empty reserve leaves the game at stage 3. Pip gets a hint, Kit can recharge, and the player keeps the fitted link. Clicking again after a successful rescue only reports that Nell is safe.

Page 13 of 16Permalink
Go to page

Continue your 3D adventure

  1. Part 1First Light, Part 1: Your First 3D Adventure
  2. Part 2First Light, Part 2: Three Knocks
  3. Part 3First Light, Part 3: Behind the Wall
  4. Part 4First Light, Part 4: The Message in the Machine
  5. Part 5First Light, Part 5: The Clockmaker’s Secret
  6. Part 6First Light, Part 6: The Final Hour