Jump to content
Sign in to follow this  
CarlGustaffa

Possible to make sure setOvercast and setFog are complete?

Recommended Posts

Is there a sure way to know that setOvercast and setFog are actually complete?

I have these lines going in the end of the script, inside a while {true} do loop:

waitUntil {overcast - olcur < 0.01; fog - fgcur < 0.01};

and

waitUntil {sleep 2.345; scriptDone envhandle; scriptDone windhandle};

but still, under some circumstances (mission overhead and accelerated time), it appears that the script is being restarted without the previous setXxx commands being fully complete with what they do.

The handles envhandle (overcast and fog) and windhandle are separate spawns inside the loop, where the delay in the parallel run fog and overcast are on very tight loops: 0.01 setXxx followed by sleep 0.02 (just to make sure, but 0.0 setXxx also doesn't help).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×