Jump to content
Sign in to follow this  
santafee

Thunder/Storm?

Recommended Posts

I know setOvercast and setRain, is there any way to make sure i got a bad Thunderstorm at start?

Share this post


Link to post
Share on other sites

As far as I know, those are really your only options. You can have really overcast sky but rain and lightning/thunder are not 100% certain to be there at start.

Share this post


Link to post
Share on other sites

0 setovercast 1.0

Will usually do the job pretty quick - if it does not work 100% for you then play an initial custom sound

Share this post


Link to post
Share on other sites

@Arkon can that be put in the init.sqf to ensure bad weather from the start?

*edit*

nevermind, I just put a repeatedly activated trigger with setOvercast and setRain to force awful weather :)

Edited by AnimalMother92

Share this post


Link to post
Share on other sites

AnimalMother92,

Put it in the .init file out of the way - no need to use the trigger.

Share this post


Link to post
Share on other sites

so i have

0 setOvercast 1; 0 setRain 1;

in the init.sqf.

Will it wear off over time though, or remain forced at 1? It definitely works at the start and the weather is the worst, but I want to keep it at the setting for the whole mission.

Share this post


Link to post
Share on other sites

You'll need to set up a loop to maintain the weather, something like this:

while {true} do
{
5 setOvercast 1;
sleep 6;
5 setRain 1;
sleep 6;
};

Which will give you a 12 second monitor cycle. Fiddle the numbers as you see fit, but bear in mind that setOvercast and setRain cannot both execute at the same time, you'll need to ensure one has finished before instigating the other.

*edit*

BTW, you don't put that code in the init ;)

You put that code in a script, then run that script from the init.

Edited by DMarkwick

Share this post


Link to post
Share on other sites
so i have
0 setOvercast 1; 0 setRain 1;

in the init.sqf.

Will it wear off over time though, or remain forced at 1? It definitely works at the start and the weather is the worst, but I want to keep it at the setting for the whole mission.

I have not noticed the weather changing after I have set it myself.

But, that is without using "setRain".

I just use:

0 setOvercast 1;

for my mission and change the 1 to another value when I want to adjust the weather again...

I do not use setRain with "setOvercast 1" as seems to rains for most of the time anyway.

Share this post


Link to post
Share on other sites
You'll need to set up a loop to maintain the weather, something like this:

while {true} do
{
5 setOvercast 1;
sleep 6;
5 setRain 1;
sleep 6;
};

Which will give you a 12 second monitor cycle. Fiddle the numbers as you see fit, but bear in mind that setOvercast and setRain cannot both execute at the same time, you'll need to ensure one has finished before instigating the other.

*edit*

BTW, you don't put that code in the init ;)

You put that code in a script, then run that script from the init.

Let me see if I have this straight.

Ok so in the init I would exec a weather script (containing the code you posted), would it be sqf or sqs?

Now in the Biki it says

Only one script command induced weather change (either setOvercast or setFog) can be happening at a time. Starting a new weather change will immediately halt the current weather change. SetRain changes are independent and can occur simultaneously to a weather change.
which I took to mean that setOvercast and setRain would work together but NOT setFog (which would interfere with setOvercast).

I'll give this a try and see what happens when I get home, my overall goal is just to keep the sky completely overcast and have the heaviest rain during the entire mission. Thanks for the info :)

Share this post


Link to post
Share on other sites
Let me see if I have this straight.

Ok so in the init I would exec a weather script (containing the code you posted), would it be sqf or sqs?

SQF of course ;)

Now in the Biki it says which I took to mean that setOvercast and setRain would work together but NOT setFog (which would interfere with setOvercast).

Well just try it, you'll soon find out if it's working or not if you hint up the values. Or, you can set the mission in the editor with a low-medium weather slider setting, then in the script do a "5 setOvercast 1" followed immediately (no sleep) with a "5 setRain 1;" command & see if you get fully overcast weather. If not, it'll be because there's no sleep pause.

I'll give this a try and see what happens when I get home, my overall goal is just to keep the sky completely overcast and have the heaviest rain during the entire mission. Thanks for the info :)

Have you tried the most simple method, setting both weather and forecast weather to minimum & seeing what happens?

Share this post


Link to post
Share on other sites

@DMarkwick, thanks man! Your info and script sent me in the right direction. With some fiddling it seems I've got things how I wanted them :)

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  

×