Update the objective, then close
Add an Update objective button to Workshop Menu. Its Click event will replace the instruction and then hide the menu. This is a complete small example of a GUI changing gameplay state.
1. Choose Action List for the button's Click event and open Additional Event Actions.
2. Add Set Variable, choose Current Objective(objective), and set its text to Find the missing
winding key.3. Add Hide GUI after it, targeting Workshop Menu(workshop_menu).
4. Save, play, open the menu and press Update objective.
5. Check that the menu closes and the HUD objective changes.
Figure 24. The sequence is stored on the button event. The second action follows the state change.
| Order | Action | Result |
|---|---|---|
| 1 | Set Variable: objective | The shared instruction changes. |
| 2 | Hide GUI: workshop_menu | The menu disappears using its close transition. |
Changing objective and displaying objective are separate jobs. The action writes the variable; the HUD label's $$objective token shows it. This is why the same value can be used by more than one GUI or script.
Use plain text in a dedicated text field. In a general JSON-style value field, put Strings in quotes and leave numbers and Booleans unquoted.
