er2.setTimeAndWeather 88
Sets the current time of day of the mission and some weather conditions, like clouds, snow and fog.
To synchronize the weather changes to other clients you can use synchWeather.
NOTE: This function it's CPU heavy
Return value
Return Type | Description |
---|---|
void | This function doesn't return anything |
Parameters
Parameter | Type | Description |
---|---|---|
1 | integer | The hour of the day. Must stay between 0 and 23 |
2 | integer | The minute of the day. Must stay between 0 and 59. |
3 | float | (Optional) The percentage of clouds in the map. From 0.0 to 1.0 |
4 | float | (Optional) The percentage of snow over the terrain. From 0.0 to 1.0 |
5 | float | (Optional) The percentage of fog all over the map. From 0.0 to 1.0 |
Examples
Set weather and snow, synched online
er2.setTimeAndWeather(17, 20, 0.5, 0.6, 0.4) -- Set 5:20 PM with cloudy sky, some rain on the ground and some fog
er2.setSnowing() -- set snow falling from the sky
er2.synchWeather() -- apply set weather to all clients, including future connecting ones