Difference between revisions of "EquipItem"

9 bytes removed ,  06:05, 15 June 2012
m
no edit summary
imported>QQuix
(Added a note on equipping armor on NPCs)
imported>ZuTheSkunk
m
 
Line 10: Line 10:
* This '''''will not''''' run the [[onEquip]] block of a script attached to the item. However, an [[onUnequip]] block '''''will''''' run when the object is unequipped using [[UnequipItem]]. This means that scripted ability spells that are added and removed using these two block types can malfunction if the item is equipped and unequipped via script.
* This '''''will not''''' run the [[onEquip]] block of a script attached to the item. However, an [[onUnequip]] block '''''will''''' run when the object is unequipped using [[UnequipItem]]. This means that scripted ability spells that are added and removed using these two block types can malfunction if the item is equipped and unequipped via script.
*EquipItem will not work if there is already an item in that slot that has been equipped with the NoUnequipFlag set. This can be useful for determining whether or not that flag has been set. Use [[UnequipItem]] or [[UnequipItemNS]] to remove such an item before using EquipItem.
*EquipItem will not work if there is already an item in that slot that has been equipped with the NoUnequipFlag set. This can be useful for determining whether or not that flag has been set. Use [[UnequipItem]] or [[UnequipItemNS]] to remove such an item before using EquipItem.
*This function can be used to force actors into drinking the potions.</li>
*This function can be used to force actors into drinking potions.
*Using this function to equip an armor item on an NPC will not automatically unequip the replaced item, as it does on the player. E.g., if you add and equip 10 types of boots, all will report as equipped (but not added to the Armor Rating). This may or may not be fixed in following frames.  
*Using this function to equip an armor item on an NPC will not automatically unequip the replaced item, as it does on the player. E.g., if you add and equip 10 types of boots, all will report as equipped (but not added to the Armor Rating). This may or may not be fixed in following frames.  
*See [[Message Spam]] to avoid unwanted "Item Equipped" messages.
*See [[Message Spam]] to avoid unwanted "Item Equipped" messages.
Anonymous user