(info) Other great resources: Official JS API docs, Scripting Forum

setWeather()

Sets the weather effect applied to the whole map.

 

Syntax

setWeather(weather);

Parameters

ParameterTypeMandatoryNotesWarzone Version
weatherConstant(tick)

Defines the type of weather to apply:

  • WEATHER_RAIN — Adds a rain effect to the entire map, disabling any previous weather setting in the process.
  • WEATHER_CLEAR — Clears any active weather effect.
  • WEATHER_SNOW — Adds a snow effect to the entire map, disabling any previous weather setting in the process.

3.2

Return value

Unknown at present.

Example

// make it rain
setWeather(WEATHER_RAIN);
Only one weather type can be applied at any given time. When a new weather effect is applied, any existing effect is disabled.
Availability 3.2+

Requires:

  • Warzone 3.2 or above
Contents

Jump to:

See also

Related effects:

  • setSunPosition() – sets the position of the sun, which affects shadows on the map
  • setSunIntensity() – sets the colour, intensity, etc., of the sun
  • setSky() – define sky image, rotation speed and scale
  • Skybox Mods – creating custom sky images

Â