home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Games.EXE 1999 January
/
pcgamesexe-1999-01.iso
/
Warzone
/
data1.cab
/
Program_Executable_Files
/
script
/
text
/
cam1daynight.slo
next >
Wrap
Text File
|
1998-10-27
|
887b
|
36 lines
// Weather and day/night script for Cam1 (arizona)
//daytime colour
public int Rstart, Gstart, Bstart;
public int Rend, Gend, Bend;
public int Steps;
private int count, Rdiff, Gdiff, Bdiff, Rnow, Gnow, Bnow;
trigger delayTrig(every, 10); //change fog every 1 second
event startup(CALL_GAMEINIT)
{
// setBackgroundFog(TRUE); //set fog on
// setDepthFog(TRUE);
// setFogColour(Rstart, Gstart, Bstart); //set fog to start colour
Rdiff = Rstart - Rend;
Gdiff = Gstart - Gend;
Bdiff = Bstart - Bend;
setEventTrigger(startup, inactive);
}
event changeFog(delayTrig)
{
Rnow = Rstart - (count * Rdiff / Steps);
Gnow = Gstart - (count * Gdiff / Steps);
Bnow = Bstart - (count * Bdiff / Steps);
setFogColour(Rnow, Gnow, Bnow);
count = count + 1;
if (count > Steps)
{
//stop change
count = 0;
setEventTrigger(changeFog, inactive);
}
}