Skip to reading
PCA Script Programming

Gameplay: Room changes, 2D controls and environmental state

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

Keep room transitions at the end of a local sequence where possible. After changing rooms, an old-room object ID may no longer resolve. Layer and depth commands apply to the 2D/hybrid scene systems, not to arbitrary 3D model transforms.

change_scene()#

Change Scene | Action ID: ChangeScene

Move the active player into another scene using a spawn and optional destination position/camera/transition settings.

Source table from Gameplay: Room changes, 2D controls and environmental state, page 140
Option key / fieldMeaning and accepted inputDefault
Destination Scene sceneIdChoose a scene ID.-
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. Awaits the room-change routine.

Code example
change_scene({"sceneId": "lab", "spawnId": "", "position": [0.0, 0.0, 0.0]})

In use. Choose The Archive and the from_signal spawn. Native room/object event inspectors expose Destination Scene and transition controls. Some shared action forms omit the scene selector; call a visual or text script from those surfaces instead. A spawn is usually clearer than loose coordinates.

PCA dictionaries can supply sceneId directly. Some GUI/shared forms omit the destination scene field; a PCA script using change_scene is a useful bridge from those forms.

Page 140 of 357Permalink
Go to page