Skip to reading
The GUI Designer

Update the objective, then close

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

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

Code example
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.

Source table from Update the objective, then close, page 28
OrderActionResult
1Set Variable: objectiveThe shared instruction changes.
2Hide GUI: workshop_menuThe 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.

Page 28 of 57Permalink
Go to page