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 revisionBoth sides next revision
remove_item [2018/03/16 09:47] justinremove_item [2020/02/23 21:13] justin
Line 2: Line 2:
 ---- ----
  
-Removes the specified item from the player's inventory. Only one instance is removed if the player has more than one of the item.+Removes one or more of the specified [[item]] from the player'[[inventory]]The ID of the [[item]] is case-sensitive and should match the name assigned to it in the [[Item Editor]].
  
 ====Signature:==== ====Signature:====
 <code python> <code python>
-remove_item(item_name)+remove_item(item_id, count)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|item_name|Name of the item to remove (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|
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-remove_item("Gold Key")+remove_item("ITEM_0008", 1)
 </code> </code>
-//Results:// gold key is removed from the player's inventory.+//Results:// One of ITEM_0008 (a gold keyis removed from the player'[[inventory]].
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
remove_item.txt · Last modified: 2023/04/26 12:22 by justin