Skip to reading
Text & Sierra-Style Adventures

Appendix A. Install the complete controller

Edition 0.86.3.4

Build a complete text or graphical parser adventure with typed commands, inventory puzzles and press-to-walk controls.

Download PDFView PDF page

The following pages contain the complete Adventure Controller in order. Paste every code block into one GDScript record with ID adventure. Do not paste page headings, line-range captions or the explanatory paragraphs.

Indentation is part of GDScript. Preserve the four spaces shown inside each function or branch. If copying from a PDF changes quotation marks, indentation or a backslash, correct it in the Script Designer before running the game.

Source table from Appendix A. Install the complete controller, page 53
Before PlayRequired setup
ScriptEnabled and Global; event subscription OnSaveLoaded.
Sceneslab and cabin; both have entry spawns.
Inventorybrass_key and fuse, initially not carried.
VariablesAll ta_ variables from lessons 16-17.
GUI IDstext_screen, graph_hud, reply_card.
Control IDsstory_transcript, text_command, graph_command.
Reply LabelText is $$ta_reply.
Graphical inputArrow Keys + Sierra AGI movement; native Space focus off.

RESTORE uses a deferred runtime call because loading replaces script instances. Keep the OnSaveLoaded handler at the end of the script. The variables hold persistent story data; pending_reply, busy and display signatures are temporary control state.

Page 53 of 68Permalink
Go to page