Jump to content
Sign in to follow this  
gavc

MP Weather sync problems

Recommended Posts

So i'm having trouble with my MP mission and it's weather...

I manually set the weather in the editor to about 40% overcast with really heavy fog. It's set to change to light fog in about 2 hours time as the sun comes up.

I've this run in the init.sqf

skiptime (((Start_time) - daytime + 24) % 24);
simulWeatherSync;

The mission loads in, dark murky fog as expected, but as the mission finishes initialising it brightens up and the fog levels are now much lower.

Can someone please explain where i'm going wrong? I don't really understand why i'm skipping time (just been advised that this is necessary) Do i have to script the weather opposed ot use the editor?

hastebin link to init.sqf As you may be able to tell a lot of this code is borrowed from other peoples missions and friends help. I understand what each element does, but maybe not the order it should be used in.

Adding the ability to sync up with JIP players would be an advantage but not entirely necessary.

Gav

Share this post


Link to post
Share on other sites
So i'm having trouble with my MP mission and it's weather...

I manually set the weather in the editor to about 40% overcast with really heavy fog. It's set to change to light fog in about 2 hours time as the sun comes up.

I've this run in the init.sqf

skiptime (((Start_time) - daytime + 24) % 24);
simulWeatherSync;

The mission loads in, dark murky fog as expected, but as the mission finishes initialising it brightens up and the fog levels are now much lower.

Can someone please explain where i'm going wrong? I don't really understand why i'm skipping time (just been advised that this is necessary) Do i have to script the weather opposed ot use the editor?

hastebin link to init.sqf As you may be able to tell a lot of this code is borrowed from other peoples missions and friends help. I understand what each element does, but maybe not the order it should be used in.

Adding the ability to sync up with JIP players would be an advantage but not entirely necessary.

Gav

if(isServer && time>1) then

{

0 setOvercast 0.4;

0 setFog 0.8; // or use 0 setFog [0.8, 0.025, 0]

7200 setFog 0.2; // 7200 setFog [0.2, 0.025, 0]

};

You could try something like this. That always worked for me. To answer you're second questing, skipping time help to immediately change the weather. The command setOvercast slowly changes the overcast, even if the time in parameter is set to 0.

Edited by R3vo

Share this post


Link to post
Share on other sites

thanks for this R3vo, works a treat.

Gav

Share this post


Link to post
Share on other sites
thanks for this R3vo, works a treat.

Gav

I'm glad I could 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  

×