(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_RAINAdds a rain effect to the entire map, disabling any previous weather setting in the process.
  • WEATHER_CLEARClears any active weather effect.
  • WEATHER_SNOWAdds 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: