RemoveModFromInventoryItem - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Remove a mod from an inventory item in this object's inventory.

Syntax[edit | edit source]

Function RemoveModFromInventoryItem(Form akItem, ObjectMod akMod) native

Parameters[edit | edit source]

  • akItem: a base form of the item we want to modify
  • akMod: a base form of the mod we want to remove from akItem

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; remove Bob's power armor's right arm armor
BobRef.RemoveModFromInventoryItem(PowerArmorObject, PowerArmorRightArmMod)

Notes[edit | edit source]

  • Currently there is a bug if you do this to an actor in combat; they will end up having no weapons drawn and won't attempt to draw any unless forced to do so.
  • Currently this function causes the object to reload its entire 3d if they had the item equipped that you modified. This might look strange if the player is watching. This also causes the above mentioned bug.
  • This function currently won't work if the object it is called on has more than one of the item you request to modify.

See Also[edit | edit source]