Skip to reading
GDScript Programming & Godot

ChangeObjectDescription()

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

Change Object Description

Change an object's descriptive text.

Source table from ChangeObjectDescription(), page 132
Option key / fieldMeaning and inputDefault
Scene sceneIdChoose a scene ID.Blank
Object entityIdChoose an entity in the selected scene.Blank
Description descriptionText.Blank

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

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

In use. After powering the lamp, change its description to "The signal is powered." The next Look response must use that description or the built-in fallback; a hard-coded Look message continues to say whatever you wrote in it.

ChangeInventoryDescription()#

Change Inventory Description

Change an inventory item's description.

Source table from ChangeObjectDescription(), page 132
Option key / fieldMeaning and inputDefault
Inventory Item itemIdChoose an inventory definition ID.Blank
Description descriptionText.Blank

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

Code example
await ChangeInventoryDescription({"itemId": "key", "description": ""})

In use. Update the key's description after discovering which door it opens. Changing description text is separate from changing its icon, name or quantity.

Page 132 of 378Permalink
Go to page