Difference between revisions of "RemoveAllItems"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Dok Enkephalin
imported>XJDHDR
(→‎Notes: Added info concerning OBSE fixing a bug in this command.)
 
(5 intermediate revisions by 5 users not shown)
Line 5: Line 5:
  RemoveAllItems TreasureChest  
  RemoveAllItems TreasureChest  
  RemoveAllItems FriendlyJailer, 1  
  RemoveAllItems FriendlyJailer, 1  
ActorID.RemoveAllItems


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.  
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.  
Line 10: Line 11:
==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 causes worn or wielded quest items to become unequipped. Any enchantment on wearable quest items will remain attached to the player permanently, and the quest item will become unwearable. The stuck enchantment effects may be removed from the player by using the "''player.dispel EnchantmentID''" command. Alternatively, this bug can be prevented by using [[Oblivion_Script_Extender|OBSE]] v0021 or later.
* 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.
Line 18: Line 19:


[[Category: Functions]]
[[Category: Functions]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category: Functions (CS 1.0)]]
[[Category: Inventory Functions]]
[[Category: Inventory Functions]]
[[Category: Inventory Functions (CS 1.0)]]
[[Category: Inventory Functions (CS 1.0)]]
<!-- Begin Search Terms
Remove
All
Items
End Search Terms -->

Latest revision as of 04:46, 14 October 2012

Syntax:

RemoveAllItems TargetContainerID (optional), RetainOwnershipFlag (optional) 

Example:

RemoveAllItems 
RemoveAllItems TreasureChest 
RemoveAllItems FriendlyJailer, 1 
ActorID.RemoveAllItems 

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[edit | edit source]

  • Quest items are not removed when this function is called on the player
  • This function causes worn or wielded quest items to become unequipped. Any enchantment on wearable quest items will remain attached to the player permanently, and the quest item will become unwearable. The stuck enchantment effects may be removed from the player by using the "player.dispel EnchantmentID" command. Alternatively, this bug can be prevented by using OBSE v0021 or later.
  • 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[edit | edit source]