14. Put live values in your GUI
A variable becomes much easier to test when you can see it in the game. A normal GUI label can display a current value by using two dollar signs followed by its ID.
1. Open GUI Designer and choose a GUI that is shown during gameplay.
2. Add or select a Label element.
3. Open Text & Content in its properties. In Text, enter Score: $$score.
4. Make the label wide enough for the result. Repeat for Objective: $$objective if you want an objective line.
5. Save the project, start a gameplay preview and run an action that changes the score or objective.
Figure 19. The label’s Text field contains variable tokens. This example combines a Boolean and two counters.
| Label text | Example result during play |
|---|---|
| Score: $$score | Score: 10.0 |
| Clock wound: $$clock_wound | Clock wound: true |
| Objective: $$objective | Objective: The clock is running. |
| Clues: $$clues | Clues: ["clock diagram", "winding socket"] |
The usual variable actions notify the interface when state changes, so these labels can refresh. The same $$ tokens can be used in a Show Message text. A message shows the value when it is produced; a gameplay label can keep reflecting later changes.
GUI Designer can show the token while you are authoring. Check resolved values in a running game preview. Use the exact ID after $$; parser tokens such as {command} have a different purpose. If an unknown $$ token remains visible, check that the variable exists and the spelling matches.
