— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
Adds one or more of the specified item to an item container. The ID of the item is case-sensitive and should match the ID assigned to it in the Item Editor (e.g. “ITEM_0001”). The item will be placed into the first open slot of the player's inventory.
add_item_to_container(entity_id, item_id, count)
Argument | Description | Type | Required |
---|---|---|---|
entity_id | Entity ID of the container to add the item to. | String | Yes |
item_id | ID of the item (as assigned in the Item Editor). | String | Yes |
count | Number of the item to add (defaults to 1). | Number | No |
add_item_to_container("wooden_chest", "ITEM_0001", 2)
Results: Two of ITEM_0001 are placed into the “wooden_chest” container entity.
Use the Add Item Container function to …