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

Fit the copper pin and stop the sparks

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 illustrations

11 / SCRIPT 3 OF 5

1. Script ID: seat_pin. Name it Seat Pin. This click belongs to Pip. It checks that she has seen the socket, lines up the named points, and switches off the sparks only after the attachment succeeds.

Code example
func run():
Code example
    if ActivePlayer() != "new_character" or not IfVariable("lift_stage", 2):
Code example
        return
    var fitted = await AttachPoints({"entityId": "link_pin", "point": "tip",
Code example
        "targetId": "relay_box", "targetPoint": "socket"})
    if not fitted:
Code example
        await ShowMessage({"text": "The pin did not seat. Check both attach points."})
Code example
        return
    await SetVariable({"name": "lift_stage", "value": 3})
Code example
    await SetObjectVisible({"entityId": "arc", "visible": false})
    await ShowMessage({"text": "Pip: Pin seated. Kit, charge the reserve!"})

2. Wire the loose copper piece. Select Relay Room › Scene Objects › Copper Link › Verb Actions. Set Default Verb › Use. Under Use Verb — Step 1, choose Run Visual Script › Seat Pin. Apply and save. Keep the link as a room object. This puzzle uses a click on the loose part, so the player can repair it without opening inventory.

After Pip’s click, the copper pin [1] sits on the teal cabinet. The spot where it lay on the floor is empty, and the arc has stopped.

If “The pin did not seat” appears, reopen both objects. Check that the link owns tip, the cabinet owns socket, and their scene IDs are link_pin and relay_box. The script lets Pip try again after you fix the setup and restart the preview.

Page 12 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