Skip to reading
First Light, Part 5: The Clockmaker’s Secret

Keep the question fair

Edition 0.86.3.4

Part 5 of the First Light course. Add timed choices, object handoffs, an attached lantern, a pointer flashlight, a 3D inspection GUI, alternative puzzle solutions and speech presentation.

Download PDFView illustrations

06 / CONDITIONS AND TIMING

1. Give ask its three options. Select the Choice node. Use Add Choice Option until it has three outputs. Set Time limit to 8 seconds and When time expires to end. Enable each option and Always Allow Repeat. On a timeout Nell waits and Pip can start the conversation again.

2. Name and wire the options. Type What did he leave you?, Read the letter again. and Give her a moment. in order. Drag their output dots to pass, repeat and quiet respectively. Save. Select the whole nell_questions record in the database, then open its Inspector’s Raw JSON (Advanced) tab.

Find the option whose text says “What did he leave you?” Insert the first line below just before its "text" field, including the comma. Insert the second line the same way in the “Read the letter again.” option. Leave the third option alone.

Code example
"condition": {"variable":"letter_read", "equals":false},
Code example
"condition": {"variable":"letter_read", "equals":true},

Click Validate and Apply JSON (Advanced) and save. Each condition lives inside its own option’s braces. The false one appears before the handoff, the true one afterward.

Before Pip receives the letter, she can ask what was left or give Nell a moment. Let the timer expire once, then talk to her again.

3. Fill in give_letter. The Action node calls this PCA Script. It checks the shared flag before asking a GDScript to animate the handoff. Later conversations show the reminder instead.

give_letter / PCA SCRIPT

Code example
global letter_read = false
Code example
if not letter_read
    call script pass_letter
end
Page 7 of 20Permalink
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