Hi,
I wanted to make the following modification to the shield 'Spell Breaker': instead of giving a passive bonus (30% chance of spell reflection) it now provides an active bonus: 100% chance of spell absorption provided that the shield is raised just before being hit by an incoming spell.
This is the script I wrote:
ScriptName aatlSpellBreakerTweakScriptfloat timerbegin gamemode if iscontrolpressed 6 player.addspell aatlMaxAbsorbAbility if (timer < 2) set timer to timer + getSecondsPassed else player.removespell aatlMaxAbsorbAbility set timer to 0 endif endifend
The script only works partially:
aatlMaxAbsorbAbility is a spell of type ability that grants the player 100% spell absorption. This ability is correctly added to the player upon pressing the block button. So far, so good.
Unfortunately, the ability doesn't get removed after 2 seconds of being added (which is what I want to achieve with the timer). In fact, when the ability is added, it never gets removed.
Can anybody see what I'm doing wrong?
Thanks in advance!