Skip to reading
PCA Script Programming

set_trigger_enabled()

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

Enable / Disable Trigger | Action ID: SetTriggerEnabled

Enable or disable a trigger's runtime event behavior.

Source table from set_trigger_enabled(), page 119
Option key / fieldMeaning and accepted inputDefault
Room sceneIdChoose a scene ID.Blank
Trigger entityIdChoose a trigger in the selected scene.Blank
Enabled enabledExplicit on/off state for the feature or response.true

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

Code example
set_trigger_enabled({"sceneId": "lab", "entityId": "archive_door", "enabled": true})

In use. Turn off a doorway trigger during an opening cutscene, then turn it on when play begins. Existing overlaps and the player starting inside the volume need to be tested; do not treat the toggle as a guaranteed fresh Enter event.

spawn_object()#

Spawn Scene Object | Action ID: SpawnObject

Spawn or restore an already authored scene object definition.

Source table from set_trigger_enabled(), page 119
Option key / fieldMeaning and accepted inputDefault
Room sceneIdChoose a scene ID.Blank
Scene Object entityIdChoose an entity in the selected scene.Blank

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

Code example
spawn_object({"sceneId": "lab", "entityId": "archive_door"})

In use. Restore a temporary prop that was despawned. The chosen object must have an authored definition the runtime can find. Use Create Primitive or Add Asset To Scene to create a new record instead.

Page 119 of 357Permalink
Go to page