---
name: "BIS_fnc_setRain"
type: function
status: ok
groups: ["Environment"]
arma3_since: "2.10"
locality: {"argument": null, "effect": "global", "server_exec": true}
source: https://community.bistudio.com/wiki/BIS_fnc_setRain
revid: 370247
updated: 2024-11-14T17:13:01Z
---

# BIS_fnc_setRain

*Function · Environment · Arma 3 v2.10*

Locality: effect **global** · **server execution only**

## Description

A helper function for setting [rainParams](../commands/rainParams.md) in multiplayer. The call to the function could be placed in [init.sqf](../topics/Event_Scripts.md#init-sqf) to sync [rainParams](../commands/rainParams.md) between all clients and JIP. Alternatively execute on server.

## Syntax

```sqf
rainParams call BIS_fnc_setRain
```

**Parameters:**

- `rainParams`: [Array](../topics/Array.md) or [Config](../topics/Config.md) - custom RainParticles params, see [rainParams](../commands/rainParams.md). Use empty array [] or [configNull](../commands/configNull.md) to reset to default values

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
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;
```

## See also

[rainParams](../commands/rainParams.md) · [setRain](../commands/setRain.md)

<sub>Source: [BI Community Wiki — BIS fnc setRain](https://community.bistudio.com/wiki/BIS_fnc_setRain) (revision 370247).</sub>
