User Tools

Site Tools


ja:add_item_to_container

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
ja:add_item_to_container [2020/06/07 17:13] justinja:add_item_to_container [2020/06/07 17:20] justin
Line 4: Line 4:
 ---- ----
  
-Adds one or more of the specified [[item]] to an [[item_container|item container]]. The ID of the [[item]] is case-sensitive and should match the ID assigned to it in the [[item_editor|Item Editor]] (e.g. "ITEM_0001"). The [[item|item(s)]] will be placed into the first open slot(s) of the [[item_container|container]].+Adds one or more of the specified [[item|item]] to an [[item_container|item container]]. The ID of the [[item|item]] is case-sensitive and should match the ID assigned to it in the [[item_editor|Item Editor]] (e.g. "ITEM_0001"). The [[item|item(s)]] will be placed into the first open slot(s) of the [[item_container|container]].
  
 ====Signature:==== ====Signature:====
Line 12: Line 12:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|entity|Container [[entity]] to which the [[item]] will be added.|[[Entity]]|Yes| +|entity|Container [[entity|entity]] to which the [[item|item]] will be added.|[[entity|Entity]]|Yes| 
-|item_id|ID of the [[item]] (as assigned in the [[Item Editor]]).|[[String]]|Yes| +|item_id|ID of the [[item|item]] (as assigned in the [[item_editor|Item Editor]]).|[[string|String]]|Yes| 
-|count|How many of the [[item]] to add (defaults to 1).|[[Number]]|No|+|count|How many of the [[item|item]] to add (defaults to 1).|[[number|Number]]|No|
  
 ====Example:==== ====Example:====
Line 20: Line 20:
 add_item_to_container(self, "ITEM_0001", 1) add_item_to_container(self, "ITEM_0001", 1)
 </code> </code>
-//Results:// One of ITEM_0001 is placed into the [[item_container|container]] [[entity]] from which the [[script]] was triggered.+//Results:// One of ITEM_0001 is placed into the [[item_container|container]] [[entity|entity]] from which the [[script|script]] was triggered.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-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]].+Use the **Add Item Container** function to place a new [[item|item]] into a chest or onto a table after the player has performed an action to build, generate, or "craft" the [[item|item]].
 </WRAP> </WRAP>
  
Line 31: Line 31:
 <WRAP half column> <WRAP half column>
 ====Editor Node:==== ====Editor Node:====
-{{:add_item_to_container_node.png?nolink|}}+{{:ja:add_item_to_container_node.png?nolink|}}
 </WRAP> </WRAP>
  
ja/add_item_to_container.txt · Last modified: 2020/06/07 17:32 by justin