Parameter | Type | Description | Default value |
---|---|---|---|
precip_freq_on | real | frequency (drops/second) to set when turned on | — |
precip_freq_off | real | frequency (drops/second) to set when turned off | — |
precip_speed_on | real | speed (feet/second) to set when turned on | — |
precip_speed_off | real | speed (feet/second) to set when turned off | — |
precip_radius_on | real | radius (in feet) to set when turned on | — |
precip_radius_off | real | radius (in feet) to set when turned off | — |
precip_opacity_on | real | opacity (alpha) to set when turned on | — |
precip_opacity_off | real | opacity (alpha) to set when turned off | — |
precip_brightness_on | real | brightness to set when turned on | — |
precip_brightness_off | real | brightness to set when turned off | — |
precip_wind_on | vector | wind speed/direction to set when turned on | — |
precip_wind_off | vector | wind speed/direction to set when turned off | — |
When triggered, KDTrapWeather
changes the frequency and speed of precipitation (weather). The frequency is expressed in number of new drops per second, while the speed is expressed in feet per second. (The default weather, including a number of other values, is defined in the Mission Variables → Weather dialog.)
When turned on, this script sets the precipitation frequency, speed, radius, opacity, brightness, and wind based on the precip_…_on
parameters above. A value will not be changed if the corresponding parameter is not set. If the defined frequency is zero (0.0
), precipitation will be turned off completely.
When turned off, this script sets the precipitation values based on the precip_…_off
parameters, if defined.
This script supports smooth transitions; see that section for details. However, not all precipitation values can transition smoothly; specifically, the speed will change instantaneously. The usual trap control flags, locking, and timing are respected.
This script is part of the KDScript module. Copyright © 2012–2013 Kevin Daughtridge. See introduction for details.