Skip to reading
PCA Script Programming

add_character_to_scene()

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

Add Character To Scene | Action ID: AddCharacterToScene

Create a scene instance from an existing Character Designer definition.

Source table from add_character_to_scene(), page 112
Option key / fieldMeaning and accepted inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
New ID idText.Blank
Name nameText.Blank
XYZ positionDestination/placement coordinates as [X, Y, Z].[0.0, 0.0, 0.0]
Enabled enabledExplicit on/off state for the feature or response.true
Visible visibleExplicit visible/hidden state.true
Animation (optional) animationText.Blank

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

Code example
add_character_to_scene({"characterId": "player", "id": "", "name": "powered"})

In use. Add Elias at [2,0,-1] with a unique scene entity ID. Choose the character definition as the source; the scene instance's ID identifies the copy you create. Repeating this action without an existence check can create unwanted duplicates.

Page 112 of 357Permalink
Go to page