Skip to reading
The Variable Designer

Read the selected ID, not its display text

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

Figure 21. The list reads clue_options and writes its selection to last_choice. These are two different variable IDs.

1. Add a Label with text Selected clue: $$last_choice.

2. Start the game preview and select Clock diagram in the list.

3. The label should show Selected clue: diagram. Use get last_choice in the Debug Console to confirm the stored ID.

4. Select Winding socket. The stored ID should become socket.

The list writes the item ID, not the display sentence. That means your condition can compare last_choice with "diagram" even if you later change the displayed wording.

Source table from Read the selected ID, not its display text, page 26
List setupSelection value to expect
Single selectionOne item ID, stored as a String.
Allow Multiple Selection onAn Array of selected item IDs. Use an Array selection variable.
Source is a plain String arrayGenerated item IDs such as item_1 and item_2, rather than the displayed text.

For a puzzle that depends on particular answers, explicit id/text records are easier to maintain than generated item IDs. A single-selection result should not share the same variable as the source Array.

Page 26 of 37Permalink
Go to page