HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Snap of Fury

05-29-2006, 06:50 PM#1
ShadowDestroyer
This spell is a bit confusing. I wish to make a spell that ends all your cooldowns. But, the amount of cooldown ended makes you take more damage for that period of time.

Example:
Use Snap of Fury.
Ends the 5 second cooldown left on my other spell or spells.
I take more damage for 5 seconds.

How would I design this?
05-29-2006, 07:12 PM#2
Rising_Dusk
There is no way to detect the cooldown remaining on spells using simple means.
You would have to detect the casting of X spell and then start a repeating timer that would count the seconds.
Then, deal damage based on the value that timer made it to before you cast the refresh spell.
Now at the end or if the spells cooldown finishes, destroy the timer and such to prevent leaks.

At least, that's how I would go about doing it.
05-29-2006, 07:35 PM#3
blu_da_noob
If you knew the cooldown time of every spell on the hero explicitly , it could be done.