Difference between revisions of "RemoveItem"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(get rid of those annoying messages!)
imported>DragoonWraith
(adding a link to Preventing Messages)
Line 29: Line 29:


==See Also==
==See Also==
[[AddItem]]
*[[AddItem]]
 
*[[GetItemCount]]
[[GetItemCount]]
*[[RemoveAllItems]]
 
*[[Preventing messages]]
[[RemoveAllItems]]




[[Category: Functions]]
[[Category: Functions]]
[[Category: Object Functions]]
[[Category: Object Functions]]

Revision as of 05:28, 11 May 2007

Removes count number of the specified item from the calling object's inventory.


Syntax:

RemoveItem ObjectID, count


Examples:

RemoveItem Gold001 50
Ref MyItem
Short count

set MyItem to ArenaAkaviriLongSword
set count to 1
player.removeitem MyItem Count


Notes

  • If ObjectID is a leveled list, the leveled item generated from the leveled list will be removed.
  • By default, using this function on the player will display a message informing the player that the item in question has been removed. In many situations, this is very annoying, but you can use a blank Message call to prevent it from happening, like so:
Message ""
player.RemoveItem "item ID" 1

See Also