Oh didn't notice that one, I'm using Vexorian's functions in my map 
Thanks though, will definitely check it out
Thanks though, will definitely check it out
//Name: Add Special Effect Timed
//Note: Uses H2I and Handle Variables functions, available at
//http://www.wc3sear.ch/index.php?p=JASS
//Add to a unit:
//call AddSFXTimer(modelName, targetWidget, attachPointName, null, destroyafter)
//or to a point:
//call AddSFXTimer(modelName, null, null, where, destroyafter)
function H2SFX takes handle h returns effect
return h
endfunction
function AddSFXDestroy takes nothing returns nothing
call DestroyEffect(H2SFX(GetHandleHandle(GetExpiredTimer(),"sfx")))
endfunction
function AddSFXTimer takes string modelName, widget targetWidget, string attachPointName, location where, real destroyafter returns effect
local timer t = CreateTimer()
local trigger trig = CreateTrigger()
if targetWidget == null then
call SetHandleHandle(t,"sfx",AddSpecialEffectLoc(modelName, where))
else
call SetHandleHandle(t,"sfx",AddSpecialEffectTarget(modelName, targetWidget, attachPointName))
endif
call TimerStart( t, destroyafter, false, null )
call TriggerRegisterTimerExpireEvent(trig, t)
call TriggerAddAction(trig,function AddSFXDestroy)
set trig = null
return H2SFX(GetHandleHandle(t,"sfx"))
endfunction