Skip to reading
PCA Script Programming

switch_character()

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

Switch Character | Action ID: SwitchCharacter

Change the currently controlled playable character.

Source table from switch_character(), page 141
Option key / fieldMeaning and accepted inputDefault
Active Player characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank

Timing. Awaits the character-switch routine.

Code example
switch_character({"characterId": "player"})

In use. Switch from Ivo to another character after confirming that character is configured as playable. The new character can have its own room, inventory, HUD and journal settings. It is not a command to swap the visible model on the same actor.

is_current_room()#

Is Current Room | Action ID: IsCurrentRoom

Test the current room through the adventure extension and return the result.

Source table from switch_character(), page 141
Option key / fieldMeaning and accepted inputDefault
Scene sceneIdChoose a scene ID.Blank

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

Code example
is_current_room({"sceneId": "lab"})

In use. Use it from a script that reads the returned Boolean. An ordinary action list does not branch on the result. In visual scripting, choose If Current Room when you want visible True and False paths.

Page 141 of 357Permalink
Go to page