Search the Community
Showing results for tags 'pre init'.
Found 1 result
-
Hi, I have working weather script that is used with mission params to change the weather. The only problem is weather changes after the mission start and is quite immersion breaking for the players. Can somehow pre-init the script, so weather change before players can see the changes? The script itself (very primitive but works): //initServer.sqf private _weather = "Weather" call BIS_fnc_getParamValue; if (_weather == 1) then { sleep 3; 0 setOvercast 0; 0 setRain 0; 0 setFog 0; forceWeatherChange; ["weather", []] call BIS_fnc_showNotification;}; if (_weather == 2) then { sleep 3; 0 setOvercast 0.5; 0 setRain 0; 0 setFog 0; forceWeatherChange; ["weather", []] call BIS_fnc_showNotification;}; if (_weather == 3) then { sleep 3; 0 setOvercast 0.6; 0 setRain 0; 0 setFog 0.1; forceWeatherChange; ["weather", []] call BIS_fnc_showNotification;}; if (_weather == 4) then { sleep 3; 0 setOvercast 1; 0 setRain 0.5; forceWeatherChange; ["weather", []] call BIS_fnc_showNotification;}; Mission parameters: class Params { class Weather { title = "Choose weather conditions for the mission"; texts[] = { "Clear", "Cloudy", "Fog", "Rain" }; values[] = { 1, 2, 3, 4 }; default = 4; }; };