AddWeatherEffect

Parameters
where rect

The rect where the weather will be visible.

effectID integer

(Rawcode) Which weather preset to apply.

comment

Creates a weather effect that is spatially limited to the specified area.

This creates a new object and returns its handle, to prevent leaks it must be destroyed with RemoveWeatherEffect when no longer needed.

The weather effect is created initially disabled and must be turned on with EnableWeatherEffect.

Example (Lua): to create an "Ashenvale Heavy Rain" at map center:

center = Rect(-1024, -1024, 1024, 1024)
weather = AddWeatherEffect(center, FourCC("RAhr"))
EnableWeatherEffect(weather, true)
note

To understand more about weather effects nature, I advise to read Ammorth's article about weather effects: http://www.wc3c.net/showthread.php?t=91176.

note

To get an idea on how to add your own weather effects, you may read CryoniC's article about custom weather effects: http://www.wc3c.net/showthread.php?t=67949.

note

The weather effects are defined in terrainart/weather.slk in game files. The current default list is here (v1.32.10).

patch

1.00

Source
common.j
return type
weathereffect
Source code
native AddWeatherEffect             takes rect where, integer effectID returns weathereffect