Skip to reading
First Light, Part 6: The Final Hour

Give the player four small controls

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

05 / STORY STATE

Add these controls to the gameplay HUD you already use. Recall belongs to the selected character. Hint gives one clue per press. Ledger lets Pip finish the story. Retro look changes the picture. Your existing inventory, journal and character switch still have their own jobs.

1. Create four variables. In Adventure Database › Add › Variable, create the records below. Keep the existing values and starting defaults for lift_stage, letter_read, lamp_ready and secret_route. Keep the older game_completed flag for the earlier cutscene it already protects.

Source table from Give the player four small controls, page 6
IDType / initial valueWhat is remembered
book_closedBoolean / falsePip has entered the final names.
hint_pageNumber / 0Which puzzle the last hint was about.
hint_levelNumber / 0How much help the player has asked for.
soft_pixelsBoolean / falseWhether this save uses the softer N64-style look.

2. Reserve the scripts. Add one BASIC Script named last_words. Add five PCA Script records named recall_now, hint_now, ledger_end, retro_flip and retro_apply. Use these as the IDs, including underscores. Leave their event checkboxes clear. The player’s buttons or room events will call them.

3. Wire the HUD. Open the HUD in GUI Designer. Add buttons Recall, Hint, Ledger and Retro look. Give each Events › Click › run-visual-script, targeting recall_now, hint_now, ledger_end and retro_flip, respectively. A free top strip on the 1280 × 720 canvas can fit four 154 × 56 buttons at X 32, 200, 368 and 536, Y 26. Move the strip if it covers a portrait or puzzle.

If you still use the built-in HUD, make a GUI named helper_bar with called-by-trigger activation, put the four buttons on it and select it under Settings › System GUIs › Main HUD. Add Bag, player switching and Save as described on page 13. Keep the built-in pause menu.

The four new actions sit along the upper edge during play. Leave the center clear so a player can select a small object on the floor.

Page 6 of 17Permalink
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