I was trying to make a library.
Here she(i.i) is:
This is the PolledWait2 that Vex made.
I tried "call PolledWait2" and "call Library_PolledWait2 but it didn't work.
The library trigger is set to run on MapInit.
I looked on jasshelper but i didn't found nothing.
If i put on same trigger trigger i won't need the library i will jsut have to put inside the scope. this i know.
But i remember seeing some systems taht don't need to be in the same trigger to work(I think the name is ABC).
Whats wrong?
Here she(i.i) is:
JASS:
library Lybrary
public function PolledWait2 takes real duration returns nothing
local real timeRemaining
local real st=TimerGetElapsed( bj_gameStartedTimer)
if st <= 0 then
set bj_gameStartedTimer = CreateTimer()
call TimerStart(bj_gameStartedTimer, 1000000, false, null)
endif
if (duration > 0) then
loop
set timeRemaining = duration - TimerGetElapsed( bj_gameStartedTimer) + st
exitwhen timeRemaining <= 0
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
endlibrary
This is the PolledWait2 that Vex made.
I tried "call PolledWait2" and "call Library_PolledWait2 but it didn't work.
The library trigger is set to run on MapInit.
I looked on jasshelper but i didn't found nothing.
If i put on same trigger trigger i won't need the library i will jsut have to put inside the scope. this i know.
But i remember seeing some systems taht don't need to be in the same trigger to work(I think the name is ABC).
Whats wrong?