21. Finish and test The Last Signal
On this page
21. Finish and test The Last Signal
Add the two scripts#
Create GDScript menu and hint. The complete short sources are in the script listings. menu opens the pause menu. hint reads the progress flags and chooses one helpful message. Neither script needs to be copied onto every object; the HUD calls each by ID.
menu#
func run(_context: Dictionary = {}) -> Variant:
Runtime.system_menu.show_pause()
return truehint#
func run(_context: Dictionary = {}) -> Variant:
var hint: String = "Press the green transmit switch."
if not Runtime.variables.get("cell_taken",false): hint = "Pick up the amber cube on the workbench."
elif not Runtime.variables.get("powered",false): hint = "Use the power cell from Inventory on the
blue relay."
elif not Runtime.variables.get("aligned",false): hint = "Use the blue relay to change rooms, then
click the receiver dish."
await ShowMessage({"text":hint,"duration":4.0})
return trueCheck your work. Start a fresh game. Open and close Inventory and Journal, use Hint at each puzzle stage, and finish the game. The ending should appear once the receiver is aligned and the switch is used.
Use this playthrough before adding your own art. It tests both the happy path and the guards that stop repeated rewards.
| Test | Expected result |
|---|---|
| Click the unpowered relay | A message asks for a power cell; no room change. |
| Take the amber cell | The pickup hides; Inventory gains one Power cell; score becomes 20. |
| Use cell on relay | Inventory loses the cell; powered becomes true; score becomes 45. |
| Use relay | The game enters roof at entry. |
| Use transmit before dish | A reminder appears; no completion. |
| Use dish | It stops searching; aligned becomes true; score becomes 70. |
| Use dish again | An already-aligned message; no extra score. |
| Use transmit | Quest completes, chime plays, ending appears, score becomes 100. |
