Call of Duty 5: Fog
Jump to navigation
Jump to search
There are now 2 type of scripted fog in COD:WW, here is a quick tutorial on how to use them and what they do.
SetExpFog
Theory
This function has been present in previous COD games, it creates an exponential fog on your level:
- The functions is of this form:
SetExpFog( <startDist>, <halfwayDist>, <red>, <green>, <blue>, <transition time> )
Parameters:
- <startDist> The distance, in world units, at which the fog begins.
- <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
- <red> The red component of the fog as a value between 0.0 and 1.0
- <green> The green component of the fog as a value between 0.0 and 1.0
- <blue> The blue component of the fog as a value between 0.0 and 1.0
- <transition time> transition time in seconds
Implementation in Levels
- To add SetExpFog to your level open up your Map GSC and anywhere after maps\mp\_load::main() add this:
setExpFog(100, 1000, 0.4, 0.425, 0.44, 0.0);
- Replace the values to your liking of course (Values above are the one used in the example pictures on top)
SetVolFog
Theory
This function is new to COD games, it creates an volumetric fog on your level. Main difference with the above SetExpFog is that SetVolFog has 2 extra parameters for the height of the fog.
- The functions is of this form:
setVolFog(<startDist>, <halfwayDist>, <halfwayHeight>, <baseHeight>, <red>, <green>, <blue>, <transition time>)
Parameters:
- <startDist> The distance, in world units, at which the fog begins.
- <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
- <halfwayHeight> The height, in world units, at which the fog will be fogged
- <baseHeight> The height, in world units, at which the fog will begins
- <red> The red component of the fog as a value between 0.0 and 1.0
- <green> The green component of the fog as a value between 0.0 and 1.0
- <blue> The blue component of the fog as a value between 0.0 and 1.0
- <transition time> transition time in seconds
Implementation in Levels
- To add SetVolFog to your level open up your Map GSC and anywhere after maps\mp\_load::main() add this:
setVolFog(200, 1500, 350, 100, 0.4, 0.425, 0.44, 0.0);
- Replace the values to your liking of course (Values above are the one used in the example pictures on top)