Difference between revisions of "OnUnequip"
Jump to navigation
Jump to search
imported>Ecaponi |
imported>Dev akm (→Notes: OnEquip link) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
'''Syntax:''' | '''Syntax:''' | ||
begin OnUnequip ActorID | begin OnUnequip ''ActorID'' | ||
'''Example:''' | '''Example:''' | ||
begin OnUnequip | begin OnUnequip | ||
Line 7: | Line 7: | ||
This block will be run once when the scripted object is unequipped by the specified Actor. If no parameter is used, the block will be run whenever the object is unequipped by any actor. | This block will be run once when the scripted object is unequipped by the specified Actor. If no parameter is used, the block will be run whenever the object is unequipped by any actor. | ||
==Notes== | |||
* This block '''''will not''''' run when you attempt to equip a broken item (weapon or armor). However, the OnEquip block will run. This can cause problems if the item script relies on the OnUnequip block to reverse an effect of the OnEquip. Since the item never actually gets equipped, you'll have to get it repaired and then equip/unequip it to fire the OnUnequip block. | |||
[[Category: | ==See Also== | ||
* [[OnEquip]] | |||
[[Category: Blocktypes]] |
Latest revision as of 14:45, 14 August 2009
Syntax:
begin OnUnequip ActorID
Example:
begin OnUnequip begin OnUnequip player
This block will be run once when the scripted object is unequipped by the specified Actor. If no parameter is used, the block will be run whenever the object is unequipped by any actor.
Notes[edit | edit source]
- This block will not run when you attempt to equip a broken item (weapon or armor). However, the OnEquip block will run. This can cause problems if the item script relies on the OnUnequip block to reverse an effect of the OnEquip. Since the item never actually gets equipped, you'll have to get it repaired and then equip/unequip it to fire the OnUnequip block.