Sign in to follow this  

Random Weather

1 post in this topic

Forget Key Frames.  As of Arma 1.55 you can use weighted random values to select weather (and other stuff) on the fly.


 * ExileServer_system_weather_thread_weatherSimulation
 * Exile Mod
 * © 2015 Exile Mod Team
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit
_interval = round(getNumber (configFile >> "CfgSettings" >> "Weather" >> "interval") * 60);
_keyframes = getArray (configFile >> "CfgSettings" >> "Weather" >> "keyframes");
_keyframeName = selectRandom _keyframes;
_keyframeConfig = configFile >> "CfgSettings" >> "Weather" >> _keyframeName;
_interval setFog getNumber (_keyframeConfig >> "fogValue"); 
_interval setFog 
	getNumber (_keyframeConfig >> "fogValue"),
	getNumber (_keyframeConfig >> "fogDecay"),
	getNumber (_keyframeConfig >> "fogBase")
_interval setOvercast random [0,0.2,1];
_interval setWaves random [0,0.2,1];
_interval setWindStr random [0,0.1,1];
_interval setGusts random [0,0.2,1];
_interval setRain random [0,0.2,1];
_interval setLightnings random [0,0.2,1];
_interval setRainbow random [0,0.2,1];

/*_interval setOvercast (getNumber (_keyframeConfig >> "overcast"));
_interval setWaves (getNumber (_keyframeConfig >> "waves"));
_interval setWindStr (getNumber (_keyframeConfig >> "wind"));
_interval setGusts (getNumber (_keyframeConfig >> "gusts"));
_interval setRain (getNumber (_keyframeConfig >> "rain"));
_interval setLightnings (getNumber (_keyframeConfig >> "lightnings"));
_interval setRainbow (getNumber (_keyframeConfig >> "rainbows"));*/


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.