Komaqtion
You can change this now in User CP.
- Reaction score
- 469
Hi!
I just thought I'd submit a small and simple snippet which lets you configure how long Special Effects will last...
I know there are many of these already out there, which are probably better and has more features than mine, but I thought I'd submit mine anyways...
There might still be someone out there who likes simplicity
This system requires: JassHelper, which can be found in JASS Newgen Pack, and Key Timers 2...
And here's the code
You simply use the function called "TimedEffect", which takes an effect, and also the duration of which the effect will last
I just thought I'd submit a small and simple snippet which lets you configure how long Special Effects will last...
I know there are many of these already out there, which are probably better and has more features than mine, but I thought I'd submit mine anyways...
There might still be someone out there who likes simplicity
This system requires: JassHelper, which can be found in JASS Newgen Pack, and Key Timers 2...
And here's the code
JASS:
library TE requires KT
private struct SFX
effect sfx
method onDestroy takes nothing returns nothing
call DestroyEffect(.sfx)
endmethod
endstruct
private function Destroy takes nothing returns boolean
call SFX(KT_GetData()).destroy()
return true
endfunction
function TimedEffect takes effect e, real duration returns nothing
local SFX d = SFX.create()
set d.sfx = e
call KT_Add(function Destroy,d,duration)
endfunction
endlibrary
You simply use the function called "TimedEffect", which takes an effect, and also the duration of which the effect will last