Difference between revisions of "EquipItem"

78 bytes added ,  15:54, 19 February 2011
Forcing actors into drinking the potions
imported>Bruneauinfo
imported>ZuTheSkunk
(Forcing actors into drinking the potions)
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.
<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 can be used to force actors into drinking the potions.</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:
<pre>addItem someItem 1
<pre>addItem someItem 1
Anonymous user