Gameplay: Room changes, 2D controls and environmental state
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.
ChangeScene()#
Change Scene
Move the active player into another scene using a spawn and optional destination position/camera/transition settings.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Destination Scene sceneId | Choose a scene ID. | - |
| Spawn (optional) spawnId | Choose an arrival spawn in the destination scene. May be blank. | Blank |
| XYZ when no spawn position | Destination/placement coordinates as [X, Y, Z]. | [0.0, 0.0, 0.0] |
Timing. Awaits the room-change routine.
await ChangeScene({"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.
sceneId is accepted by the runtime even though some shared forms omit that field. Native GDScript can supply it directly as shown. Use this room-change route instead of replacing the top-level Godot SceneTree scene.
