RemoveAllItems - ObjectReference

From the Fallout4 CreationKit Wiki
Revision as of 12:36, 30 September 2013 by imported>RobinHood70 (Undo revision 28038 by Cwalton (talk))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ObjectReference Script

Removes all items from this object's inventory, optionally transferring them to another object.

Syntax

Function RemoveAllItems(ObjectReference akTransferTo = None, bool abKeepOwnership = false) native

Parameters

  • akTransferTo: The object to transfer the items we removed to.
    • Default: None
  • abKeepOwnership: Should the item's ownership be kept when moved to the other object?
    • Default: False

Return Value

None.

Examples

; Remove all items from the chest
ChestProperty.RemoveAllItems()


; Remove all items from the player's inventory, but keep ownership information
Game.GetPlayer().RemoveAllItems(abKeepOwnership = true)

See Also