Skip to reading
GDScript Programming & Godot

DespawnObject()

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

Despawn Scene Object

Remove a live object instance through the runtime scene-life route.

Source table from DespawnObject(), page 129
Option key / fieldMeaning and inputDefault
Room sceneIdChoose a scene ID.Blank
Scene Object entityIdChoose an entity in the selected scene.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await DespawnObject({"sceneId": "lab", "entityId": "archive_door"})

In use. Remove a temporary projection when its sequence ends. Keep an ID or authored definition if it will be restored. Despawning a visible item does not automatically remove a matching inventory item.

Page 129 of 378Permalink
Go to page