User Tools

Site Tools


remove_item

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
remove_item [2020/02/23 22:10] justinremove_item [2023/04/26 12:19] justin
Line 6: Line 6:
 ====Signature:==== ====Signature:====
 <code python> <code python>
-remove_item(item_id, count)+remove_item(item_id, count, *character)
 </code> </code>
  
Line 12: Line 12:
 |item_name|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes| |item_name|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes|
 |count|How many of the [[item]] to take from the player (defaults to 1).|[[Number]]|No| |count|How many of the [[item]] to take from the player (defaults to 1).|[[Number]]|No|
 +|character|[[Character]] the [[item]] will be taken from (defaults to the main [[player character]]).|[[Entity]]|No|
 +
 +^Return Value^Description^Type^
 +|Number Removed|Returns the actual number of [[item|items]] that were removed from the player's [[inventory]]. This could be less than the count supplied to the function, for example if the player has less than requested.|[[Number]]|
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-remove_item("ITEM_0008", 1)+remove_item("ITEM_0008", 1);
 </code> </code>
 //Results:// One of ITEM_0008 (a gold key) is removed from the player's [[inventory]]. //Results:// One of ITEM_0008 (a gold key) is removed from the player's [[inventory]].
remove_item.txt · Last modified: 2023/04/26 12:22 by justin