RemoveAllItems

From GECK
Jump to: navigation, search

Link to TES4 Construction Set Wiki: RemoveAllItems.

A function included in the GECK for Fallout 3.

Description

Removes all items from the calling reference's inventory, except for the following::

  • Biped forms marked as unplayable (LNIsPlayable),
  • If the calling reference is the player, Quest Items (IsQuestItem).

If a target container is specified, the items are moved to the target container with all equipment items retaining their current health; otherwise the items are destroyed as they would be via RemoveItem.

If the retain ownership flag is set to a non-zero value, the items' original ownership is retained; otherwise the ownership is cleared.

Syntax

[help]
sourceContainer.RemoveAllItems targetContainer:ref retainOwnershipFlag:int hideMessages:int

Example

RemoveAllItems
RemoveAllItems TreasureChestREF

Does nothing, since no source container has been specified.

player.RemoveAllItems

Deletes every item in the player's inventory, with the exceptions of Quest items and Unplayable Biped items. For example, since the Pip-Boy is marked as Unplayable and it is considered to be Armor, it survives this mass removal.

player.RemoveAllItems EnclaveSoldierREF 1

Dumps the player's inventory into EnclaveSoldierREF, with the exceptions of Quest items and Unplayable Biped items. The original ownership for each item is retained.

ContainerREF.RemoveAllItems player 1 0

Removes all items from ContainerREF and transfers them to the Player, except for Unplayable Biped items. Messages for each item are shown, and the original ownership for each transferred item is retained.

ContainerREF.RemoveAllItems player 0 1

Removes all items from ContainerREF and transfers them to the Player, except for Unplayable Biped items. Messages for each item are hidden, and the original ownership is cleared for each transferred item.

Bugs

  • Using RemoveAllItems on the player can cause the game to crash under unknown conditions in Fallout: New Vegas

See Also