RemoveItemTarget

< [[::Category:Functions|Category:Functions]]

A function added by the JIP NVSE Plugin.

Description

Similar to the vanilla RemoveItem - removes quantity of the specified item from the calling reference's inventory. However, instead of being destroyed, the items are moved to the specified target container/actor.

Syntax

reference.RemoveItemTarget item/list:ref target:ref quantity:int clearOwnership:0/1

Example

SourceRef.RemoveItemTarget Camera TargetRef

This will move all Camera items from SourceRef to TargetRef.

SourceRef.RemoveItemTarget NVHoldoutWeapons TargetRef 4 1

This will move 4 of each item in the list NVHoldoutWeapons from SourceRef to TargetRef. Ownership will be cleared off all moved items.

Notes

  • All stats/attributes (health, script, mods, ownership, etc.) of removed items are preserved.
  • If quantity is not specified or is <= 0, all instances of the item are removed.
  • The function accepts a FormList as parameter (in place of an item) and also supports sub-lists.

See Also