Jump to content
Sign in to follow this  
whisperFFW06

Problem with command "setovercast"

Recommended Posts

I tried in a script, called at mission startup, to change weather overcast.

The strange thing is that

0 setOvercast 0

works perfectly, but not

_halfTime setOvercast 0

where _halfTime is a variable set in the script

I tried

60 setOvercast 0

in the script too, do not work either....

I can't get where's the problem  confused.gif

The code :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_duration=Param1

_halfTime=_duration / 2

_fogOutTime=2 * (_duration / 3)

; hint format ["%1, %2, %3", _duration, _halfTime, _fogOutTime]

_halfTime setOvercast 0

_halfTime setRain 0

_fogOutTime setFog 0.3

~_halftime

halfTime=true

exit

<span id='postcolor'>

Whis'

Share this post


Link to post
Share on other sites

Try puting this somewhere in the script:

hint format ["Param1 : %1",Param1]

If it comes up with "scalar boolar array" and the like then there is nothing in your variable. smile.gif

wow.gif PEACE

Share this post


Link to post
Share on other sites

As you can see in the commented line in the code, I already tried to check the local variables. Unfortunately, they are fine sad.gif

And 60 setOvercast 0 doesn't work either confused.gif

Share this post


Link to post
Share on other sites

Are you sure it doosn't work ?

60 setOvercast 0 should make sunny weather. If you start with sunny weather you'll not see any change.

Share this post


Link to post
Share on other sites

Well...I'm sure sad.gif

In the init.sqs, I have put :

0 setOvercast 1

and the weather is terrible at mission startup. With 60 setOvercast 0 , I sit down, wait 1 minute, and due to the _halfTime setRain 0, rain stops, but the sky is always cloudly as hell sad.gif

Share this post


Link to post
Share on other sites

While working at SCF I ran into the same problem: my dynamic weather script didn't want to work; with my console I tried setOvercast and it worked and in my script it didn't work.

Then I made the discovery: You can't use setFog and setOvercast at the same time. So you have to do:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_transitionTime setOverCast _overCast

~_transitionTime

_fogTime setFog _fog

<span id='postcolor'>

Then it will work for sure! smile.gif

Share this post


Link to post
Share on other sites

<span style='font-size:15pt;line-height:100%'>Bigpoppa</span>

kiss1.gif

<span style='font-size:17pt;line-height:100%'>THANKS!</span>

it works perfectly!!! smile.gifsmile.giftounge.gifbiggrin.gif

Whis'

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  

×