Skip to reading
PCA Script Programming

Gameplay: GUIs, element state and data-driven widgets

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 PDF page
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.

show_gui()#

Show Gui | Action ID: ShowGUI

Show an authored interface.

Source table from Gameplay: GUIs, element state and data-driven widgets, page 169
Option key / fieldMeaning and accepted inputDefault
GUI guiIdChoose an authored GUI ID.Blank

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
show_gui({"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.

hide_gui()#

Hide Gui | Action ID: HideGUI

Hide an authored interface.

Source table from Gameplay: GUIs, element state and data-driven widgets, page 169
Option key / fieldMeaning and accepted inputDefault
GUI guiIdChoose an authored GUI ID.Blank

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
hide_gui({"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.

Page 169 of 357Permalink
Go to page