29. Action and script reference
| You need to… | Use |
|---|---|
| Give or consume an item | GiveInventory / AddInventory / RemoveInventory. |
| Change an amount | ChangeInventoryQuantity. |
| Pass an item between characters | TransferInventory. |
| Check ownership | HasInventory(item_id, character_id, amount). |
| Read a quantity | InventoryCount(item_id, character_id). |
| Open / close a menu | ShowGUI / HideGUI. |
| Enable / disable a control | EnableGUIElement / DisableGUIElement. |
| Read a live GUI value | GetGUIElementProperty(gui, element, property, fallback). |
| Operate through widget rules | SaveGameWidgetCommand. |
| Write / restore a fixed save | SaveGameSlot / LoadGameSlot. |
| Open system Save / Load flow | SaveGame / LoadGame. |
| Choose authored picture for saves | SetSaveSlotImage. |
These are API names. Action-list labels use readable names and can add spaces. Use the action’s displayed form to fill character, GUI, element and slot references; do not paste a whole script into a single ID field.
GDScript records in this book extend script_base.gd. Create a normal script record, apply it and assign that record to the intended event. Do not paste the run function into the raw JSON for a GUI element.
