how do I do that?
also why is this trigger not working propperly?
that counter is not working at all it just shows 0.00
globals
real array count
real array goal
hashtable hash
endglobals
function stuff takes nothing returns boolean
local integer i = GetHandleId(GetTriggeringTrigger())
set count [i] = count [i] + 0.01
call BJDebugMsg(I2S(i))
call BJDebugMsg(R2S(count [i]))
if i >= goal [i] then
call EnableTrigger(LoadTriggerHandle(hash, i, 1))
call DestroyTrigger(GetTriggeringTrigger())
endif
return false
endfunction
function wait takes integer WT, trigger t returns nothing
local trigger trig = CreateTrigger()
set goal[GetHandleId(trig)] = WT
call TriggerAddAction(trig, function stuff)
call TriggerRegisterTimerEvent( trig, 0.01, true)
call DisableTrigger(t)
call SaveTriggerHandle(hash, GetHandleId(trig), 1, t)
endfunction