[Help] CooldownScript

Post » Sun Nov 18, 2012 1:51 pm

Scriptname _vlr_cooldownscript extends ActiveMagicEffect  SPELL Property _VLR_NightmareRune  AutoINT Property time Autoevent OnEffectStart(Actor akTarget, Actor akCaster)akcaster.removespell(_VLR_NightmareRune)  debug.notification("Nightmare Rune is now on cooldown")Utility.Wait(120)  akcaster.addspell(_VLR_NightmareRune)debug.notification("Nightmare Rune is ready")endEvent

Eh, I got it everything works fine. Just gonna leave the script no taht it works here, maaybe its useful to somebody...
User avatar
Maria Garcia
 
Posts: 3358
Joined: Sat Jul 01, 2006 6:59 am

Post » Sun Nov 18, 2012 12:58 pm

Scriptname _vlr_cooldownscript extends ActiveMagicEffect  SPELL Property _VLR_NightmareRune  AutoINT Property time Autoevent OnEffectStart(Actor akTarget, Actor akCaster)akcaster.removespell(_VLR_NightmareRune)  debug.notification("Nightmare Rune is now on cooldown")Utility.Wait(120)  akcaster.addspell(_VLR_NightmareRune)debug.notification("Nightmare Rune is ready")endEvent

Eh, I got it everything works fine. Just gonna leave the script no taht it works here, maaybe its useful to somebody...

Next time search the boards. Several of us (myself included) have made cooldown scripts a long time ago. Your script actually lacks a crucial element, which is to unequip the spell as soon as you remove it. Works fine for the player, but NPC AI will screw up horribly if they have a spell equipped that they no longer have.
Just an FYI
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm


Return to V - Skyrim