UnequipItem
From GECK
A function included in the GECK for Fallout 3.
Description
UnequipItem forces an actor to unequip an item.
Syntax
[ActorRefID].UnequipItem ObjectID:baseform NoEquipFlag:int{0, 1} HideEquipMessage:int{0, 1}
Example
Player.UnequipItem HuntingRifle 0 1
Parameters
- If NoEquipFlag = 1, actor (including the player) will be unable to equip the item. Once the item is equipped with the EquipItem function, the item can be equipped and unequipped as normal.
- If HideEquipMessage = 1, the item unequipped message will be hidden from the player.
Notes
- This function does not trigger the OnUnequip script event (where appropriate). Use UnequipItemAlt if that functionality is desired.
- The NoEquipItem flag is effectively ignored by Companions. Calling "UnequipItem <itemname> 1" on a Companion will not prevent them from re-equipping the item if it is the best equipment available.
- If UnequipItem is called on the player while they're viewing their inventory, whether or not the visual "equipped" indicator is updated immediately depends on the HideEquipMessage flag. If it's set to 0, the graphic will update immediately, but if it's set to 1 the graphic won't update until another graphic updates. Running the following code will prevent this bug:
UnequipItem ObjectID 0 1 AddItem ObjectID 1 1 RemoveItem ObjectID 1 1
Alternatively, RefreshItemsList can be used.