Skip to reading
Adventure Mechanics & Effects

Give the player three stations and one clue

Edition 0.86.3.4

Build authored boxing, camera moves, weather, attachments, inspectable objects, a radio and two-object puzzles using the existing adventure tools and scripts.

Download PDFView illustrations

GUI / TUNE A RADIO

The station radio in GUI Designer. Previous and Next change the frequency. Listen is a separate choice, so passing the right station does not solve the puzzle.

01. Create a GUI with ID radio. Choose Called by Trigger Action / Visual Script. Add a Label with ID frequency and text “680 kHz.” Add four buttons. Use the IDs previous, listen, next and close_radio. Set their visible texts to Previous, Listen, Next and Close. Leave room for a sentence next to the frequency.

02. Make a GDScript record with ID radio_rules. Paste the text from page 28, then Apply / Save Script. On all four buttons set Events Click to run-visual-script and Click Target to radio_rules.

03. In Scene Designer select the radio prop. In its Use verb actions add Run Visual Script, choose radio_rules and save. Use the prop in Test Scene. Opening it calls the script without a button ID, which tells it to open the radio window. A button sends its own ID, which tells the script to tune, listen or close.

04. Press Next twice. You should read 910 kHz, then 1140 kHz. Press Listen at 1140. The line now says “Two short rings.” The script remembers that the player heard it in heard_signal. Close the radio and reopen it. The selected frequency is remembered.

Check it in play. Listen at 680 before trying the correct station. You should get dance music described in text. To add sound, call Play Sound with your own clip in the same Listen branch. Keep the caption so the puzzle remains playable with the sound off.

Page 15 of 29Permalink
Go to page