{"name":"BIS_fnc_setRain","operator":null,"title":"BIS fnc setRain","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_setRain","revid":370247,"updated":"2024-11-14T17:13:01Z","groups":["Environment"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.10"}],"since":{"game":"arma3","name":"Arma 3","version":"2.10"},"arma3_since":"2.10","branch":null,"locality":{"argument":null,"effect":"global","server_exec":true},"exec":null,"description":"A helper function for setting rainParams in multiplayer. The call to the function could be placed in init.sqf to sync rainParams between all clients and JIP. Alternatively execute on server.","syntaxes":[{"syntax":"rainParams call BIS_fnc_setRain","since":null,"effect":null,"exec":null,"params":[{"name":"rainParams","type":"Array or Config","optional":false,"default":null,"description":"custom RainParticles params, see rainParams. Use empty array [] or configNull to reset to default values","types":["Array","Config"],"since":null,"text":"rainParams: Array or Config - custom RainParticles params, see rainParams. Use empty array [] or configNull to reset to default values"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"}}],"examples":[{"text":"```sqf\n0 setOvercast 1;\n0 setRain 1;\n0 setFog 0.1;        // snow affects visibility at distance\nsetHumidity 0.9;    // don't want to see dust clouds\nenableEnvironment [false, true];    // don't want to see snakes and butterflies either\nforceWeatherChange;\n[\n    \"a3\\data_f\\snowflake4_ca.paa\",    // rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa\n    4,                // texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used\n    0.01,            // minRainDensity\n    25,                // effectRadius\n    0.05,            // windCoef\n    2.5,            // dropSpeed\n    0.5,            // rndSpeed\n    0.5,            // rndDir\n    0.07,            // dropWidth\n    0.07,            // dropHeight\n    [1, 1, 1, 0.5],    // dropColor\n    0.0,            // lumSunFront\n    0.2,            // lumSunBack\n    0.5,            // refractCoef\n    0.5,            // refractSaturation\n    true,            // snow\n    false            // dropColorStrong\n]\ncall BIS_fnc_setRain;\n```","code":["0 setOvercast 1;\n0 setRain 1;\n0 setFog 0.1;\t\t// snow affects visibility at distance\nsetHumidity 0.9;\t// don't want to see dust clouds\nenableEnvironment [false, true];\t// don't want to see snakes and butterflies either\nforceWeatherChange;\n[\n\t\"a3\\data_f\\snowflake4_ca.paa\",\t// rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa\n\t4,\t\t\t\t// texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used\n\t0.01,\t\t\t// minRainDensity\n\t25,\t\t\t\t// effectRadius\n\t0.05,\t\t\t// windCoef\n\t2.5,\t\t\t// dropSpeed\n\t0.5,\t\t\t// rndSpeed\n\t0.5,\t\t\t// rndDir\n\t0.07,\t\t\t// dropWidth\n\t0.07,\t\t\t// dropHeight\n\t[1, 1, 1, 0.5],\t// dropColor\n\t0.0,\t\t\t// lumSunFront\n\t0.2,\t\t\t// lumSunBack\n\t0.5,\t\t\t// refractCoef\n\t0.5,\t\t\t// refractSaturation\n\ttrue,\t\t\t// snow\n\tfalse\t\t\t// dropColorStrong\n]\ncall BIS_fnc_setRain;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["rainParams","setRain"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Environment","Functions","Functions: Global Effect","Functions: Server Execution","Introduced with Arma 3 version 2.10"],"docblock":null,"filled_from_docblock":[]}