can't destroy effect

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Please give the whole function, I can't see anything wrong with your code...
 

Nyph

Occasional News Reader
Reaction score
87
JASS:
function highspikes takes nothing returns nothing
local timer t = GetExpiredTimer()
local timer r = CreateTimer()
local real x = GetHandleReal(t,"x")
local real y = GetHandleReal(t,"y")
local real a = GetHandleReal(t,"a")
local real l = GetHandleReal(t,"l")
local effect spec
local integer i = GetHandleInt(t,"i")
local real d = GetHandleReal(t,"d")
local unit u = GetHandleUnit(t,"u")
if i < 60 then
set x = PolarProjectionX(x,l,a)
set y = PolarProjectionY(y,l,a)
set a = a + 18
set l = l-2.5
set i = i+1
call SetHandleInt(t,"i",i)
call SetHandleReal(t,"l",l)
call SetHandleInt(r,"v",0)
call SetHandleReal(r,"d",d)
call SetHandleReal(r,"x",x)
call SetHandleReal(r,"y",y)
call SetHandleHandle(r,"u",u)
call SetHandleReal(t,"a",a)
set spec = AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",x,y)
call TimerStart(r,0.05,false,function spikedam)
call TimerStart(t,0.05,false,function highspikes)
call PolledWait(2)
call DestroyEffect(spec)
set t = null
set r = null
set u = null
set spec = null
else
call FlushHandleLocals(t)
call DestroyTimer(t)
set t = null
set r = null
set u = null
endif
endfunction

thats the whole function
 

Nyph

Occasional News Reader
Reaction score
87
do i just create another timer to destroy it?
edit: nope the all the functions stopped working now. any ideas why?
editedit: nevermind
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top