User Tools

Site Tools


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
add_item_to_container [2020/06/07 17:19] justinadd_item_to_container [2023/01/02 21:08] (current) justin
Line 13: Line 13:
 |item_id|ID of the [[item|item]] (as assigned in the [[item_editor|Item Editor]]).|[[string|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|item]] to add (defaults to 1).|[[number|Number]]|No| |count|How many of the [[item|item]] to add (defaults to 1).|[[number|Number]]|No|
 +
 +^Return Value^Description^Type^
 +|Number Added|Returns the actual number of [[item|items]] that were added to the [[item container]]. This could be less than the count supplied to the function, for example if the [[item container]] becomes full.|[[Number]]|
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-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|entity]] from which the [[script|script]] was triggered. //Results:// One of ITEM_0001 is placed into the [[item_container|container]] [[entity|entity]] from which the [[script|script]] was triggered.
add_item_to_container.1591575582.txt.gz · Last modified: 2020/06/07 17:19 by justin