Skip to reading
GDScript Programming & Godot

Record proxy methods: the complete authored surface

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
On this page

These methods are implemented on PCAScriptRecordProxy. Use a receiver of the appropriate kind: inventory/movement/speech methods need a character or suitable actor; Get/Set/Exists apply more generally. setup and underscore-prefixed binding helpers are engine plumbing, not normal authored calls.

Get()#

Code example
Get(property_path: String, default_value: Variant = null)

Read a property path with a fallback. A Dictionary value is returned as data, unlike nested dot access that creates a child proxy.

Set()#

Code example
Set(property_path: String, value: Variant)

Write a property path; returns whether the runtime accepted the route. Live application depends on the field.

Exists()#

Code example
Exists()

Check whether the referenced runtime record exists.

ToDictionary()#

Code example
ToDictionary()

Deep-copy the whole underlying record. On a child proxy this still describes the record, not only that child path.

AddInventory()#

Code example
AddInventory(inventory_id: String, amount: int = 1)

Add an item amount through this character’s inventory route.

RemoveInventory()#

Code example
RemoveInventory(inventory_id: String, amount: int = 1)

Remove an item amount through this character’s inventory route.

Page 226 of 378Permalink
Go to page