Difference between revisions of "UnequipItem - Actor"
Jump to navigation
Jump to search
imported>Terra Nova m (→Notes: Added confirmation that this works for Ammo objects(DwarvenArrow, EbonyArrow, etc)) |
imported>Chesko |
||
Line 32: | Line 32: | ||
== Notes == | == Notes == | ||
* It is possible for this function to deplete the enchantment charges on weapons in the player's inventory under certain conditions. Please see the discussion tab. | |||
* 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. | * 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. | ||
* abPreventEquip works for the Ammo objects. Enemy archers are left there holding their bow, unable to do anything. However as noted above, this does not work for Weapon objects. | * abPreventEquip works for the Ammo objects. Enemy archers are left there holding their bow, unable to do anything. However as noted above, this does not work for Weapon objects. |
Revision as of 15:07, 31 March 2013
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
- It is possible for this function to deplete the enchantment charges on weapons in the player's inventory under certain conditions. Please see the discussion tab.
- 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.
- abPreventEquip works for the Ammo objects. Enemy archers are left there holding their bow, unable to do anything. However as noted above, this does not work for Weapon objects.