BIS fnc setRain: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=function |game1= arma3 |version1= 2.10 |branch= dev |gr1= Environment |eff= global |serverExec= server |descr= A helper function for setting rainParams in m...")
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.10
|version1= 2.10
|branch= dev


|gr1= Environment
|gr1= Environment
Line 11: Line 10:
|serverExec= server
|serverExec= server


|descr= 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.
|descr= A helper function for setting [[rainParams]] in multiplayer. The call to the function could be placed in [[Event Scripts#init.sqf|init.sqf]] to sync [[rainParams]] between all clients and JIP. Alternatively execute on server.
 
|s1= rainParams [[call]] [[BIS_fnc_setRain]]
|s1= rainParams [[call]] [[BIS_fnc_setRain]]


Line 18: Line 18:
|r1= [[Boolean]]
|r1= [[Boolean]]


|x1= <sqf>0 setOvercast 1;
|x1= <sqf>
0 setOvercast 1;
0 setRain 1;
0 setRain 1;
0 setFog 0.1; // snow affects visibility at distance
0 setFog 0.1; // snow affects visibility at distance
setHumidity 0.9; // don't want to see dust clouds
setHumidity 0.9; // don't want to see dust clouds
enableEnvironment [false, true]; // don't want to see snakes and butterflies either
enableEnvironment [false, true]; // don't want to see snakes and butterflies either
forceWeatherChange;
forceWeatherChange;
[
[
"a3\data_f\rainnormal_ca.paa", // rainDropTexture
"a3\data_f\snowflake4_ca.paa", // rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa
1, // texDropCount
4, // texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used
0.01, // minRainDensity
0.01, // minRainDensity
15, // effectRadius
25, // effectRadius
0.1, // windCoef
0.05, // windCoef
2, // dropSpeed
2.5, // dropSpeed
0.5, // rndSpeed
0.5, // rndSpeed
0.5, // rndDir
0.5, // rndDir
0.02, // dropWidth
0.07, // dropWidth
0.02, // dropHeight
0.07, // dropHeight
[0.1, 0.1, 0.1, 1], // dropColor
[1, 1, 1, 0.5], // dropColor
0.1, // lumSunFront
0.0, // lumSunFront
0.1, // lumSunBack
0.2, // lumSunBack
5.5, // refractCoef
0.5, // refractCoef
0.3, // refractSaturation
0.5, // refractSaturation
true, // snow
true, // snow
false // dropColorStrong
false // dropColorStrong
]  
]
call BIS_fnc_setRain;</sqf>
call BIS_fnc_setRain;
</sqf>


|seealso= [[rainParams]] [[setRain]]
|seealso= [[rainParams]] [[setRain]]
}}
}}

Latest revision as of 18:13, 14 November 2024

Hover & click on the images for description

Description

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.
Execution:
call
Groups:
Environment

Syntax

Syntax:
rainParams call BIS_fnc_setRain
Parameters:
rainParams: Array or Config - custom RainParticles params, see rainParams. Use empty array [] or configNull to reset to default values
Return Value:
Boolean

Examples

Example 1:
0 setOvercast 1; 0 setRain 1; 0 setFog 0.1; // snow affects visibility at distance setHumidity 0.9; // don't want to see dust clouds enableEnvironment [false, true]; // don't want to see snakes and butterflies either forceWeatherChange; [ "a3\data_f\snowflake4_ca.paa", // rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa 4, // texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used 0.01, // minRainDensity 25, // effectRadius 0.05, // windCoef 2.5, // dropSpeed 0.5, // rndSpeed 0.5, // rndDir 0.07, // dropWidth 0.07, // dropHeight [1, 1, 1, 0.5], // dropColor 0.0, // lumSunFront 0.2, // lumSunBack 0.5, // refractCoef 0.5, // refractSaturation true, // snow false // dropColorStrong ] call BIS_fnc_setRain;

Additional Information

See also:
rainParams setRain

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note