KDScriptRendering effects

KDTrapWeather

ParameterTypeDescriptionDefault value
precip_freq_onrealfrequency (drops/second) to set when turned on
precip_freq_offrealfrequency (drops/second) to set when turned off
precip_speed_onrealspeed (feet/second) to set when turned on
precip_speed_offrealspeed (feet/second) to set when turned off
precip_radius_onrealradius (in feet) to set when turned on
precip_radius_offrealradius (in feet) to set when turned off
precip_opacity_onrealopacity (alpha) to set when turned on
precip_opacity_offrealopacity (alpha) to set when turned off
precip_brightness_onrealbrightness to set when turned on
precip_brightness_offrealbrightness to set when turned off
precip_wind_onvectorwind speed/direction to set when turned on
precip_wind_offvectorwind 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.