I just tested a piece of script I did to change the color and distance of the fogplane during the game... I found it rather cool. And because I'm such a nice guy, I'll share it with you guys:
pulsating_fog:
// Color settings
local.farplane_color = "0.3 0.3 "
local.blueshift = 0
local.blueshift_max = 1
local.blueshift_min = 0
local.blueshift_step = 0.01
// Depth settings
local.fogplane = 5000
local.fogplane_step = 40
// Other stuff
local.pulsate_speed = 0.1
local.acending = 1
// Actual code
while ( 1 ) //for ever
{
// Switch pulse direction at max and min
if ( local.blueshift < local.blueshift_min || local.blueshift > local.blueshift_max )
{
local.acending = ! local.acending
}
wait local.pulsate_speed
if ( local.acending )
{
local.blueshift = local.blueshift + local.blueshift_step
local.fogplane = local.fogplane + local.fogplane_step
}
else
{
local.blueshift = local.blueshift - local.blueshift_step
local.fogplane = local.fogplane - local.fogplane_step
}
// Set the variables in $world
$world farplane_color ( local.farplane_color + string local.blueshift )
$world farplane local.fogplane
}
end
The example fog pulsates between purple and "poison yellow", and rolls wildly back and forth... play with the variables at the start to calibrate it into someting that you can actually use
I (sure I'm not alone) thought it would be great if you could randomise the light on a map. I had a quick look but it appeared settings like the amibent light, sun colour, direction, etc could not be changed in game. I presume these are set at compile time to improve performance.
Yep, you are correct... the light settigs are compiled into the map... as it often takes several minutes up to a few hours to do the light compile, it would not be a good thing to demand a recompile every frame