Difference between revisions of "UnequipItem - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>DreamKing
(Added notes section, and noted that abPreventEquip seems not to work as described.)
Line 30: Line 30:
Sally.UnequipItem(DressProperty, true)
Sally.UnequipItem(DressProperty, true)
</source>
</source>
== Notes ==
* abPreventEquip does not seem to work as described when used on NPCs. They seem fully capable of re-equipping items unequipped with this flag set to true. More testing is needed.


== See Also ==
== See Also ==

Revision as of 10:49, 4 March 2012

Member of: Actor Script

Forces this actor to unequip the specified item, preventing equipping if requested. Updated to remove the item from the left hand weapon slot too.

Syntax

Function UnequipItem(Form akItem, bool abPreventEquip = false, bool abSilent = false) native

Parameters

  • akItem: The item the actor should unequip.
  • abPreventEquip: If true, prevents the actor (or player) from equipping the item.
    • Default: False
  • abSilent: Should the unequip message be silenced?
    • Default: False

Return Value

None.

Examples

; Force the player to unequip the tutu - but they can equip it
Game.GetPlayer().UnequipItem(TutuProperty)


; Force Sally to unequip the dress - but they can't equip it
Sally.UnequipItem(DressProperty, true)

Notes

  • abPreventEquip does not seem to work as described when used on NPCs. They seem fully capable of re-equipping items unequipped with this flag set to true. More testing is needed.

See Also