Difference between revisions of "RemoveItem"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
imported>Haama
Line 28: Line 28:
Message " "
Message " "
player.RemoveItem "item ID" 1</pre>
player.RemoveItem "item ID" 1</pre>
This seems to shortcircuit the message display and will prevent any other messages from being queued or displayed for a couple of seconds. There are other methods that don't disrupt other messages that can be found [[Avoiding Message Spam|here]].
This seems to shortcircuit the message display and will prevent any other messages from being queued or displayed for a couple of seconds. [[Avoiding Message Spam|Here]] are some alternative methods that don't disrupt other messages.


==See Also==
==See Also==

Revision as of 07:29, 15 June 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 pair of blank Message calls to prevent it from happening, like so:
Message " "
Message " "
player.RemoveItem "item ID" 1

This seems to shortcircuit the message display and will prevent any other messages from being queued or displayed for a couple of seconds. Here are some alternative methods that don't disrupt other messages.

See Also