Warcraft III resources & community, 2003–2006 · archived

Wait for functions and not triggers??

2 posts
#1

Wait for functions and not triggers??

how can you create a wait time inside a function so it doesn't affect the trigger which called the function??

for example

function example takes nothing returns nothing

call MyFunction1()
call TriggerSleepAction (3.00)
call MyFunction2()

endfunction



and, in another trigger:

function Trigger_Actions takes nothing returns nothing
integer A=0
loop
   exitwhen (A>=4)
   call example
   set A=A+1
endloop
endfunction


I want the trigger actions to call 4 MyFunction1, wait 3 seconds and call 4 Myfunction2. I could do it the simple way, but every function example contains a timer wich must be independantly activated.

Please if anyone knows a function that replaces the TriggerSleepAction and will only affect the function, let me know!

Thanks in advance[/jass]
#2
call Example with a timer xD

(or just call MyFunction2 with a 1-shot 3sec timer xD)