Gameplay: GUIs, element state and data-driven widgets
On this page
GUI targets have two levels: the interface ID and an element ID inside it. Use the interface-level commands for the whole window and element-level commands for one button, label or widget. Visual Designer preview is not the place to test event execution.
ShowGUI()#
Show Gui
Show an authored interface.
| Option key / field | Meaning and input | Default |
|---|---|---|
| GUI guiId | Choose an authored GUI ID. | Blank |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await ShowGUI({"guiId": "hud"})In use. Show a note-reading panel after the player examines a document. Check its runtime activation, layer and blocking settings. Showing it is different from enabling a disabled interface.
HideGUI()#
Hide Gui
Hide an authored interface.
| Option key / field | Meaning and input | Default |
|---|---|---|
| GUI guiId | Choose an authored GUI ID. | Blank |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await HideGUI({"guiId": "hud"})In use. Hide the note panel on its Close button. It does not erase its definition or necessarily clear the story variables behind it. If another activation rule immediately shows it again, fix that rule rather than adding repeated Hide calls.
