Simple inventories
Manage inventory items.
Authors and contributors to this experimental extension: 4ian, infokubarcade, heyitsdwubbs, D8H.
Manage inventory items with limited or unlimited item capacity.
Tip
Learn how to install new extensions by following a step-by-step guide.
Actions
Add an item
Add an item in an inventory.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::AddItem.
Save an inventory in a scene variable
Save all the items of the inventory in a scene variable, so that it can be restored later.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🗄️ Scene variable): Scene variable
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::CopyInventoryToVariable.
Load an inventory from a scene variable
Load the content of the inventory from a scene variable.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🗄️ Scene variable): Scene variable
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::CopyToVariableToInventory.
Remove an item
Remove an item from an inventory.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::RemoveItem.
Equip an item
Mark an item as being equipped. If the item count is 0, it won't be marked as equipped.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
- Parameter 3 (❓ Yes or No): Equip
Technical note: parameters 0, 4 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::SetIsItemEquipped.
Limit item capacity
Allow a limited amount of an object to be in an inventory. Item capacity is unlimited by default.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
- Parameter 3 (❓ Yes or No): Limit the item capacity
Technical note: parameters 0, 4 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::SetIsLimitedItemCapacity.
Item capacity
Change the maximum number of the specified item that can be added in the inventory. By default, the number allowed for each item is unlimited.
See parameters & details
- Parameter 1: 🟰 Operator
- Parameter 2 (🔢 Number): Value
- Parameter 3 (🔤 Name (String)): Inventory name
- Parameter 4 (🔤 Name (String)): Item name
Technical note: parameters 0, 5 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::SetItemCapacity.
Item count
Change the number of an item in an inventory.
See parameters & details
- Parameter 1: 🟰 Operator
- Parameter 2 (🔢 Number): Value
- Parameter 3 (🔤 Name (String)): Inventory name
- Parameter 4 (🔤 Name (String)): Item name
Technical note: parameters 0, 5 are internal parameters handled by GDevelop.
Technical note: this action internal type (in GDevelop JSON) is
Inventories::SetItemCount.
Conditions
Has an item
Check if at least one of the specified items is in the inventory.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::HasItem.
Item full
Check if an item has reached its maximum number allowed in the inventory.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::IsItemCapacityReached.
Item equipped
Check if an item is equipped.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::IsItemEquipped.
Limited item capacity
Check if a limited amount of an object is allowed by the inventory. Item capacity is unlimited by default.
See parameters & details
- Parameter 1 (🔤 Name (String)): Inventory name
- Parameter 2 (🔤 Name (String)): Item name
Technical note: parameters 0, 3 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::IsLimitedItemCapacity.
Item capacity
Compare the maximum number of the specified item that can be added in the inventory. By default, the number allowed for each item is unlimited.
See parameters & details
- Parameter 1: 🟰 Relational operator
- Parameter 2 (🔢 Number): Value to compare
- Parameter 3 (🔤 Name (String)): Inventory name
- Parameter 4 (🔤 Name (String)): Item name
Technical note: parameters 0, 5 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::ItemCapacity.
Item count
Compare the number of an item in an inventory.
See parameters & details
- Parameter 1: 🟰 Relational operator
- Parameter 2 (🔢 Number): Value to compare
- Parameter 3 (🔤 Name (String)): Inventory name
- Parameter 4 (🔤 Name (String)): Item name
Technical note: parameters 0, 5 are internal parameters handled by GDevelop.
Technical note: this condition internal type (in GDevelop JSON) is
Inventories::ItemCount.
Expressions
| Expression | Description | |
|---|---|---|
Inventories::ItemCapacity(string, string) |
Return the maximum number of the specified item that can be added in the inventory. By default, the number allowed for each item is unlimited. | |
| 🔤 Name (String) | Inventory name | |
| 🔤 Name (String) | Item name | |
Inventories::ItemCount(string, string) |
Return the number of an item in an inventory. | |
| 🔤 Name (String) | Inventory name | |
| 🔤 Name (String) | Item name |
This page is an auto-generated reference page about the Simple inventories extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.