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

Put the working lantern in Pip’s hand

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

10 / ATTACHED LIGHT

1. Place the carried lantern. In Service Corridor place a second instance of the Lantern asset. Give it ID hand_lamp and uniform scale 0.32. In Attach Points add handle at 0, 0.64, 0 and wick at 0, 0.25, 0. Use object space and blank bone names on the prop. If your asset has a different shape, place handle on the actual loop and wick where the flame sits.

2. Make the two parts of the glow. Add a Point Light with ID lamp_light. Use amber #FFB56E, Intensity 1.4, range 2.4. Add Particles with ID wick_glow. Choose Fire, then set Amount 4, Lifetime 0.35, Particle Size 0.025, emission extents 0.01, 0.01, 0.01 and low velocity 0.12–0.22. Apply. Place both at any convenient spot. The script moves them when Pip enters.

3. Fill in light_passage. This is a PCA Script function named run. Each time the room calls it, it mounts the model, places the light and flame on the wick, then enables the mouse beam. An empty source point on the light uses its center.

light_passage / PCA SCRIPT

Code example
function run()
Code example
    let lamp = attach_points({"entityId":"hand_lamp","point":"handle","targetId":"new_character","targetPoint":"take"})
Code example
    let bulb = attach_points({"entityId":"lamp_light","point":"","targetId":"hand_lamp","targetPoint":"wick"})
Code example
    let glow = attach_particle_effect({"entityId":"wick_glow","targetId":"hand_lamp","targetPoint":"wick"})
Code example
    let beam = set_flashlight_mode({"enabled":true,"strength":3,"radius":140,"shape":"circle"})
Code example
end

4. Run it every visit. Select the Service Corridor room itself. Under Room Events › When Enters Room — Step 1 choose Run Visual Script › Light Passage. Apply. In these listings, let calls the named command and gives the result a local name. The attachment itself is what makes the prop move. If the lamp floats near the floor, check that take belongs to Pip’s reusable character and handle belongs to the carried lantern instance.

Look at the wick and the floor. The point light warms surfaces near Pip as she walks. The little Fire emitter makes the wick visible. The next page sets up the searchlight you move with the mouse.

Select the light itself and open Light Settings. The highlighted fields set the color, brightness and reach of the patch on the floor.

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