Skip to reading
PCA Script Programming

move_npc_to_room()

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

Move NPC to a Different Room | Action ID: MoveNPCToRoom

Change an NPC's room assignment and arrival position or spawn.

Source table from move_npc_to_room(), page 106
Option key / fieldMeaning and accepted inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Room sceneIdChoose a scene ID.Blank
Spawn (optional) spawnIdChoose an arrival spawn in the destination scene. May be blank.Blank
XYZ when no spawn positionDestination/placement coordinates as [X, Y, Z].[0.0, 0.0, 0.0]

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

Code example
move_npc_to_room({"characterId": "player", "sceneId": "lab", "spawnId": ""})

In use. Send Elias to the archive after the puzzle. This is a world-state change rather than visible walking between rooms. Confirm that the destination has the intended spawn and that a scene does not already contain a conflicting copy of the NPC.

Page 106 of 357Permalink
Go to page