SetWeather
Changes the sky for everyone - by a preset name or a level profile.
A preset is a friendly name for one of the level’s time-of-day profiles: clear (or sunny), fair, cloudy, overcast,
showers, drizzle (or fog), storm, dry_storm (GetWeatherPresets maps them; Weather lists the
profiles). A profile name passes through as it is. Each client blends the new sky in over blendSeconds ([world] weather_blend, 10 s, without them). "" hands the sky back to the server’s rotation: a sky rolled from the chances
every 3 to 5 game hours (SetWeatherChances - the fair ones most often by default), the same for every client. The
/weather built-in is the same call (/weather auto for the rotation).
Syntax
Section titled “Syntax”SetWeather(presetOrProfile [, blendSeconds])| Parameter | Type | |
|---|---|---|
presetOrProfile |
string | a preset or a profile name; "" = the server’s rotation |
blendSeconds |
number | seconds the change blends in over ([world] weather_blend) (optional) |
Returns
Section titled “Returns”boolean - false for a name that is neither a preset nor a profile
Example
Section titled “Example”-- the storm rolls in over the last minute of the roundSetWeather("storm", 60)SetTimer(function() SetWeather("clear", 20) end, 90000)See also
Section titled “See also”GetWeather · GetWeatherPresets · SetWeatherChances · SetRain · the The world - clock, weather, terrain, the navmesh, the geometry group of the index
