User Tools

Site Tools


ja:add_item_to_container

This is an old revision of the document!


FIXME このページはまだ完全には、翻訳されません。翻訳の完了を支援して下さい。
(翻訳が完了したらこの段落を削除して下さい)

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(s) will be placed into the first open slot(s) of the container.

Signature:

add_item_to_container(entity, item_id, count)
ArgumentDescriptionTypeRequired
entityContainer entity to which the item will be added.EntityYes
item_idID of the item (as assigned in the Item Editor).StringYes
countHow many of the item to add (defaults to 1).NumberNo

Example:

add_item_to_container(self, "ITEM_0001", 1)

Results: One of ITEM_0001 is placed into the container entity from which the script was triggered.

Use the Add Item Container function to place a new item into a chest or onto a table after the player has performed an action to build, generate, or “craft” the item.


Editor Node:

Visual Demo:

ja/add_item_to_container.1591575175.txt.gz · Last modified: 2020/06/07 17:12 by justin