SAMPLE PROJECT WALKTHROUGH

The Signal Desk Scripts Workshop

Download the editable project, then choose Open Existing in the App. Save your current work before opening another project.

Download editable projectPlay Example (new tab)All Sample Projects

Scripts Workshop: Typed Calls, Calibration & Accepted Delivery

Open the complete example

The Signal Desk Scripts Workshop is a safe three-room game. It connects two typed reusable scripts to real player actions, a gated route, one physical dispatch, a native delivery Recipe and a three-stage Quest. Completion awards 100 points and 5 archive tokens once. There are no enemies, weapons, ammunition, healing items, hazards or time limits.

Download the editable .tagm from Feature Workshops in Sample Projects on the website, save current work and open it to inspect the scripts and their real callers.

Inspect what is actually connected

Open Gameplay → Scripts · advanced → In This Game. Inspect verify_setting and release_dispatch, then the callers in the red dial, blue dial, test dial and console events. The same helper receives different input values; the event does not paste its arithmetic into each dial.

verify_setting declares required numeric inputs entered and expected, an optional text label, number local difference, and Boolean result. The red dial passes 2 and 2; blue passes 3 and 3; the test dial deliberately passes 1 and 2. The caller captures the Boolean in a private accepted local. Only a successful real dial changes its channel's persistent state.

local accepted = false
run_script: verify_setting with: [entered = 2, expected = 2, label = "red channel"] into: accepted
if accepted == true
  set red_ready = true
endif

The reusable body is:

local difference = entered - expected
if difference == 0
  print label + ": setting accepted."
  return true
endif
print label + ": setting rejected; no puzzle state changed."
return false

The console requires both persistent channel states. Its release_dispatch call takes the actual sealed_dispatch object ID through a typed object input, reveals that existing hidden item, and returns whether this was the first release. The console opens the real north exit only on successful release. Repeating the call neither moves a carried dispatch back to the archive nor creates a second item.

The early stop in an already-calibrated dial ends that event body even inside its if. It does not reset the world or stop later player commands. The helper's return returns to the caller. Inspect these boundaries in the main Test area’s script debugger.

Room inventory and actual route graph

Compare the room connections and event handlers in the editable project with this route graph. The north exit remains gated until the console accepts both calibrated channels.

Room Actual exits and gates Entities and actions
reception — Archive Reception East → signal_room Archivist accepts the carried dispatch through accept_dispatch; TALK explains the goal.
signal_room — Signal Desk West → reception; North → archive only when archive_open is true Instructions; red, blue and test dials; console. None is takeable. READ, USE and repeat/failure responses are real event bodies.
archive — Dispatch Archive South → signal room One takeable/droppable sealed dispatch, initially hidden. Console release makes it visible; taking alone gives no points.
flowchart LR
  R["Reception"] -->|East| S["Signal Desk"]
  S -->|West| R
  S -->|"North: console opens route"| A["Dispatch Archive"]
  A -->|South| S

All points and currency belong to Quest completion after the accepted delivery. An item merely visible, revealed or carried is insufficient. The Recipe transfers it to the archivist and sets the completion proof; the native Quest checks prerequisites and awards once.

Three complete routes

Full explanation and rejected call:

talk archivist
east
read instructions
use test dial
use red dial
use blue dial
use console
north
take sealed dispatch
south
west
give sealed dispatch to archivist

Direct calibration:

east
use red dial
use blue dial
use console
north
take sealed dispatch
south
west
give sealed dispatch to archivist

Reverse order with repeat guards:

east
use blue dial
use blue dial
use red dial
use red dial
use console
use console
north
take sealed dispatch
south
west
give sealed dispatch to archivist

Expected route checkpoints: the full explanation route takes 12 active turns, the direct route 9, and reverse order with repeat guards 12. Every route ends at reception with the completed signal_dispatch Quest, 100 points, 5 tokens and no dispatch in the player's inventory. These are demonstrated complete routes, not claims of an optimal turn count or maximum score beyond this game's fixed completion reward. Health and lives are not active systems in this workshop.

Failure, repetition and persistence

Start a new game for each independent check:

  1. Go east, try north, then USE CONSOLE before calibration. The route stays closed and the dispatch stays hidden.
  2. USE TEST DIAL. It prints rejected, returns false, leaves both real channels unchanged and awards nothing.
  3. USE RED DIAL twice, then USE CONSOLE. The red channel remains calibrated; missing blue still prevents release.
  4. Calibrate blue, use the console, go north and take the dispatch. Return south and use the console again. The dispatch stays carried and only one physical dispatch exists.
  5. Return west and give it to the archivist. Check actual transfer, all Quest stages, the ending and once-only score/currency.
  6. Before final delivery, SAVE. Complete another step, then UNDO; LOAD restores the saved world, Quest and item state. Save before handing over, complete it, then UNDO and make the accepted handover again. The restored transaction can earn its reward once in the restored timeline.

Aliases such as use blue control, use signal console, get parcel and give parcel to clerk target the same entities. Directions e, n, s and w use the normal parser.

Adapt this into your own game

In Script Builder, duplicate verify_setting with a new stable ID, then change its contract and body through a reviewed draft. Attach a caller to a different real object. Inspect Where used and the proposed changed paths before applying a rename, extraction, replacement or removal. Keep the existing dispatch example intact while learning.

Try these variations separately:

Test an isolated helper with explicit arguments, then replay its actual attached command and exported HTML. A passing call is only one part of a working puzzle.

See Scripts guide, Shared Script Reuse, TAML Reference and Content Packs.

Download editable projectPlay Example (new tab)All Sample Projects