Skip to content

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). "" leaves every client’s sky as it is. The /weather built-in is the same call.

SetWeather(presetOrProfile [, blendSeconds])
Parameter Type
presetOrProfile string a preset or a profile name; "" = leave the skies alone
blendSeconds number seconds the change blends in over ([world] weather_blend) (optional)

boolean - false for a name that is neither a preset nor a profile

-- the storm rolls in over the last minute of the round
SetWeather("storm", 60)
SetTimer(function() SetWeather("clear", 20) end, 90000)

GetWeather · GetWeatherPresets · SetRain · the The world - clock, weather, terrain, the navmesh, the geometry group of the index