Difference between revisions of "OnActivate"
→Notes: A bit better wording, but could be better
imported>Haama (→Notes: These notes don't really fit here, and are on the Activate page) |
imported>Haama (→Notes: A bit better wording, but could be better) |
||
Line 13: | Line 13: | ||
*Locked doors, containers and books are activated a second time automatically when you open the lock or take the book. To find out when a door was unlocked, for example, you can wait for '''[[GetLocked]] == 0''' in the OnActivate-block. | *Locked doors, containers and books are activated a second time automatically when you open the lock or take the book. To find out when a door was unlocked, for example, you can wait for '''[[GetLocked]] == 0''' in the OnActivate-block. | ||
*Selecting an item in inventory will ''equip'' it | *Selecting an item in inventory will, if anything, ''equip'' it, meaning the [[onEquip]] block will run instead of the '''onActivate''' block. | ||
**However, you can make an item run it's own onActivate block in the inventory menu (MenuMode 1008, MenuMode, onEquip, etc.) with '''''Activate player, 1'''''. | **However, you can make an item run it's own onActivate block in the inventory menu (MenuMode 1008, MenuMode, onEquip, etc.) with '''''Activate player, 1'''''. | ||