function Wait takes nothing returns nothing
call TriggerSleepAction(0)
endfunction
function Callback takes nothing returns nothing
call ExecuteFunc("Wait")
endfunction
function timer takes nothing returns nothing
timer t = get expired timer blablabla.. (it is a 0.01 timer)
call BJDebugMsg("a")
call TriggerSleepAction(1.00)
call BJDebugMsg("b")
endfunction
function waitfunc takes nothing returns nothing
call TriggerSleepAction(1.00)
endfunction
function somefunc takes something returns something
//something
call ExecuteFunc("waitfunc")
//actions that will be executed 1 seconds later.
endfunction
It will most likely stop the thread. (no functions past the wait will execute) I am not sure if this is the case for the way GUI handles timers, but I am pretty sure it applies.
Waits can't be used in timer callbacks. (as well as a group iterations)
It will most likely stop the thread. (no functions past the wait will execute) I am not sure if this is the case for the way GUI handles timers, but I am pretty sure it applies.
He probably writed something like this.
JASS:function waitfunc takes nothing returns nothing call TriggerSleepAction(1.00) endfunction function somefunc takes something returns something //something call ExecuteFunc("waitfunc") //actions that will be executed 1 seconds later. endfunction
function waitfunc takes nothing returns nothing
call TriggerSleepAction(1.00)
//actions that will be executed 1 seconds later.
endfunction
function somefunc takes something returns something
//something
call ExecuteFunc("waitfunc")
endfunction
function WaitedFunc takes nothing returns nothing
local effect e = PassedEffect
call TriggerSleepAction(PassedReal)
call DestroyEffect(e)
set e = null
endfunction
function MainFunction takes something returns something
//...
set PassedEffect = AddSpecialEffectTarget(SomeUnit, "someEffect", "origin")
set PassedReal = 5.00
call ExecuteFunc("WaitedFunc")
//...
endfunction
function WaitedFunc takes effect e, real yourtime returns nothing
call TriggerSleppAction(yourtime)
call DestroyEffect(e)
set e = null
endfunction
function Mainfunction takes nothing reutrns nothing
call WaitedFunc(youreffect, 5.)
endfunction
JASS:function WaitedFunc takes effect e, real yourtime returns nothing call TriggerSleppAction(yourtime) call DestroyEffect(e) set e = null endfunction function Mainfunction takes nothing reutrns nothing call WaitedFunc(youreffect, 5.) endfunction
?????