4. Questions, variables, conditions and timers
Questions
Questions tab → Add. Write the question and pick a type: Free text (several accepted answers separated by |, e.g. 3|three; case and surrounding spaces are ignored) or Multiple choice (one choice per line, up to 12).
Each answer has its own actions; the Otherwise block handles every other answer.

Ask it with the Ask a question action (e.g. when entering a zone or in a character’s “Talk” command).
Variables
A variable remembers something during the game: tries, score, player choice… Types: number, text, true/false.

Change a variable sets a value (=) or, for numbers, adds (+=) or subtracts (−=).
If… then… else
Compares a variable with a value (=, ≠, <, >, ≤, ≥) and runs the matching branch. Example: after 3 wrong answers, give a hint. The list also offers Player altitude (m), from the phone GPS (set by hand in simulation); allow a ~20 m margin.
And 🎒 Item in the player’s inventory: pick the item (or character), then “is in the inventory” or “is not in the inventory”. Example: when entering the door zone, “If the key is in the inventory then” open the door, “else” show “The door is locked.”

Timers
A timer runs its actions after a duration (countdown) or repeatedly (repeating). Use Start a timer / Stop a timer.


How it maps to Lua
In a real Wherigo player, a message does not pause the script. Wherigo Creator therefore moves the actions following a message into its callback, and resumes a list after a question is answered, so the cartridge behaves outdoors exactly like in the web player.
To go beyond blocks, the Free Lua code action (Adventurer level) runs in the web player too: see tutorial 8.
Going further: conditions, buttons, calculations, functions, events
Multiple conditions and “else if”
In “If… then… else”, the + Condition button adds a condition; the AND / OR list says whether all must be true (AND) or just one (OR). The NOT box inverts a condition. The + Else if… button adds another set of conditions with its own actions, tested when the previous ones are false.
Besides variables, a condition can be about: 🗺️ the player and a zone (inside, near, far), 🎒 an item in the inventory, 📍 an item in a zone, 👁 a visible element, ⚡ an active element, ✅ a completed task, ⛰ altitude. A variable can be compared with a fixed value or with another variable (“✏️ value” list).
Two-button message
Fill in a message’s 2nd button field (for example “Yes” and “No”): two action lists appear, one per button. Actions placed after the message run next, whatever the choice.
Calculations on variables
“Set a variable” offers, for a number: =, +=, −=, ×=, ÷=, modulo (remainder), random number between two values, rounding, length of a text; for a text: =, append ({variables} are replaced), UPPERCASE, lowercase. The value can come from another variable: “= other variable” copies its value.
Functions
The ⚙️ Functions section groups sequences of actions you reuse in several places with the ⚙️ Call a function action (for example “Open the door”). Actions placed after the call wait until the function has finished, messages included. The check warns about a function that ends up calling itself.
New events
- Zone: when moving away (the player leaves the zone’s proximity).
- Item or character: when the player opens it (OnClick event, not supported by some apps or GPS units: do not put an essential step there).
- Task: when the task is completed (once, through the “Task completed” action).
- Timer: when it starts and when it is stopped.
- Start: when a saved game is resumed (for example “Welcome back!”).
Even more: “use with”, screens, zones, media versions
- “Use with…” command: tick this box on an item’s or character’s command (e.g. “Give” on the key); the player then chooses an item or character within reach (any, or only those you tick). In the actions, the 🎯 Command target condition tests what they chose (“If the target is the guard then…”).
- 📱 Show a screen: opens the main screen, the locations list, “You see”, the inventory, the tasks or an element’s details.
- Zone → Advanced settings: when the zone’s items become visible (inside, nearby, always) and the distance from which the zone appears in the list.
- Media → + Other version: the same media in another format for devices that cannot read the first one (FDL sound for Garmin GPS units, BMP image); the player keeps the first version it can read.
- Garmin GPS units handle only 8 active zones at a time (7 with a full battery); the check warns when too many zones are active at the start, and the player’s “🔧 Test” tab shows the number of active zones live.
- “🔧 Test” tab: variables are shown with their live value and can be changed to test a branch; each change appears in the log.
🌐 A cartridge in several languages
If your level allows it (“🌐 Multilingual” right, always granted to administrators), in Information → Cartridge languages, choose the main language, then tick up to 4 extra languages. A 🌐 selector then appears at the top of the editor: choose “English”, for example, and the fields to translate turn yellow (names, descriptions, commands, questions and their choices, messages and buttons, expected answers, ending screen); the main text is shown in grey in each field. Zones, actions, media and settings are shared by all languages.
- At launch, the player chooses their language; it is kept in the save and on resume.
- An untranslated text is shown in the main language; the check counts missing texts for each language.
- Answers are accepted in all languages; for a multiple choice, translate the choices in the same order: the translated choice at the same rank is accepted.
- The cartridge title and description stay in the main language: Wherigo.com handles only one. Write a short summary in each language there if needed.
Work faster: undo, copy-paste, duplicate, search
- ↶ / ↷ at the top of the editor (or Ctrl+Z / Ctrl+Y outside a text field): undoes or redoes the last 100 changes. Uploaded media are not affected.
- ⧉ on an action copies it (with its sub-actions); ⧉ Copy all N copies the whole list. Then 📋 Paste under any action list, even in another cartridge.
- ⧉ in the element list: duplicates a zone, item, character, task, question, timer, table or function (with its actions); a copied zone is shifted by about 30 m.
- 🔍 Search (or Ctrl+F): finds a text, an element and every action using it; a click opens the place and highlights the fields.
- New actions: 🔇 Stop sound, 📝 Write to the log (invisible to the player, shown in the “🔧 Test” tab and the device .gwl log), 🔒 Lock / open an item (or from the start with the item’s “Locked at start” and “Open at start” boxes), with the “Item locked” and “Item open” conditions in “If…”.
Placing a zone around the player, save and quit
- 📍 Place a zone around the player: when the action runs, the chosen zone is redrawn around the player’s position, at the chosen distance, in a fixed direction (0° = north), at random or computed from the position, as a square or a circle. Handy to chain stages anywhere. Then activate or show the zone with the usual actions.
- 🚪 Save and quit: saves the game then closes the cartridge; the player resumes it later. Actions placed after it are not run.