Difference between revisions of "EquipItem"

8 bytes added ,  15:52, 14 August 2009
imported>Dev akm
(→‎Notes: does not run the onequip block)
imported>Dev akm
Line 8: Line 8:


== Notes ==
== Notes ==
* 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 enchantments 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 enchantments that are added and removed using these two block types can malfunction if the item is equipped and unequipped via script.
<ul><li>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.</li>
<ul><li>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.</li>
<li>This function does not always work when used to equip items which have been added to an inventory using [[addItem]], unless you provide a delay between adding the items and equipping them. For instance:
<li>This function does not always work when used to equip items which have been added to an inventory using [[addItem]], unless you provide a delay between adding the items and equipping them. For instance:
Anonymous user