Of course! How stupid of me
Thanks a lot UNN
I'm afriad that yes, you are reading into those names a bit too much. They make sense to me, but they're not used to count time or delay it
The function is used a lot and the time I am dealing with here is only just above 0 seconds, so you'll see why I need a function to do it - a script would be too slow.
This functions merely checks if the global variable is set to true or not during that period of time (normally around 0.4 seconds)
editHang on, you're right!
Why the heck am I using a function? I wrote a quick script to do the same thing, but with a time delay (which I couldn't do before in the sqf).
It goes something like this:
_timeDelay = _this select 0
_timeStep = _this select 1
Counter = 0
#Loop
if (Counter <= _timeDelay) then {goto "Loop2"} else {exit}
#Loop2
if (GlobalV) then {interupt = true; exit} else {interupt = false}
Counter = Counter + _timeStep
~_timeStep
goto "Loop"
Thanks for pointing that out UNN
The only worry I know have is, if 100 units use this at about the same time, will OFP be fast enough to handle it? (And, will there be lag?) :-\