User Tools

Site Tools


This is an old revision of the document!

Add Item To Container

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, item_id, count)
entityContainer entity to which the item will be added.EntityYes
item_idID of the item (as assigned in the Item Editor).StringYes
countNumber of the item to add (defaults to 1).DecimalNo


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 …

Editor Node:

Visual Demo:

add_item_to_container.1577167497.txt.gz · Last modified: 2019/12/23 22:04 by justin