Skip to reading
GDScript Programming & Godot

AddCharacterToScene()

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

Create a scene instance from an existing Character Designer definition.

Source table from AddCharacterToScene(), page 122
Option key / fieldMeaning and 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. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await AddCharacterToScene({"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 122 of 378Permalink
Go to page