Difference between revisions of "RemoveAllItems"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>Dok Enkephalin
Line 9: Line 9:


==Notes==
==Notes==
* Quest items are not removed when this function is called on the player.
* Quest items are not removed when this function is called on the player
* This function causes worn or wielded quest items will become unequipped. Any enchantment on wearable quest items will remain attached to the player permanently, and the quest item will become unwearable.
* This function does not remove items flagged as "unplayable".
* This function does not remove items flagged as "unplayable".
* Sometimes the OnDrop and OnAdd of the moved items are not triggered when this function is called until the player opens the target container. For some scripted items using OnDrop and OnAdd, it may cause unexpected results.
* Sometimes the OnDrop and OnAdd of the moved items are not triggered when this function is called until the player opens the target container. For some scripted items using OnDrop and OnAdd, it may cause unexpected results.

Revision as of 22:15, 11 September 2007

Syntax:

RemoveAllItems TargetContainerID (optional), RetainOwnershipFlag (optional) 

Example:

RemoveAllItems 
RemoveAllItems TreasureChest 
RemoveAllItems FriendlyJailer, 1 

Removes all items from the caller's inventory. If TargetContainerID is specified, the objects are moved to the target container, otherwise they are destroyed. If RetainOwnershipFlag = 1, the items' original ownership is retained; otherwise, the ownership is cleared.

Notes

  • Quest items are not removed when this function is called on the player
  • This function causes worn or wielded quest items will become unequipped. Any enchantment on wearable quest items will remain attached to the player permanently, and the quest item will become unwearable.
  • This function does not remove items flagged as "unplayable".
  • Sometimes the OnDrop and OnAdd of the moved items are not triggered when this function is called until the player opens the target container. For some scripted items using OnDrop and OnAdd, it may cause unexpected results.

See Also