| Parameter | Type | Description | Default value |
|---|---|---|---|
fog_zone | integer | zone to change the fog for (0–8) | 0 (global) |
fog_color_on | color | color of fog to set when turned on | — |
fog_dist_on | real | distance (in feet) of fog to set when turned on | — |
fog_color_off | color | color of fog to set when turned off | — |
fog_dist_off | real | distance (in feet) of fog to set when turned off | — |
When triggered, KDTrapFog changes the color and distance of fog for the specified fog zone. If the fog_zone parameter is 0 or undefined, the global fog is changed. (The initial fog, both global and per zone, is defined in the Mission Variables → Fog Zones dialog.)
When turned on, this script sets the fog color and distance for the specified zone to the values of the fog_color_on and fog_dist_on parameters, respectively. If the color is undefined or black (#000000), it will not be changed. If the distance is undefined or less than zero, it will not be changed. If the distance is zero (0.0), fog is disabled; transitions to and from disabled fog are handled correctly. When turned off, this script sets the fog color and distance to fog_color_off and fog_dist_off, with the same caveats.
This script supports smooth transitions; see that section for details. 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.