# Set Fog Density Over Time
Grammar — Set fog’s density to density over duration seconds
Flags —Native
|Action
Sets the density of environmental fog. A higher value means thicker fog.
# Arguments
fixed
— Densityfixed
— Duration
Returns — void
native void FogSetDensityOverTime(fixed d, fixed timeRamp);
# Related
Category: Environment / Fog And Background
- Enable/Disable Fog —
void
— FogSetEnabled - Enable/Disable Fog At Ultra —
void
— FogSetDisableAtUltra - Set Fog Density —
void
— FogSetDensity - Set Fog Color —
void
— FogSetColor - Set Fog Falloff —
void
— FogSetFallOff - Set Fog Start Height —
void
— FogSetStartHeight - Set Fog Density Over Time —
void
— FogSetDensityOverTime - Set Fog Color Over Time —
void
— FogSetColorOverTime - Set Fog Falloff Over Time —
void
— FogSetFallOffOverTime - Set Fog Start Height Over Time —
void
— FogSetStartHeightOverTime - Set Background Model —
void
— GameSetBackground
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:603
// Automatic Variable Declarations
// Implementation
FogSetDensityOverTime(0.2, lp_dURATION);
FogSetFallOffOverTime(0.3, lp_dURATION);
FogSetStartHeightOverTime(8.0, lp_dURATION);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:627
// Automatic Variable Declarations
// Implementation
FogSetDensityOverTime(0.1, lp_dURATION);
FogSetFallOffOverTime(0.2, lp_dURATION);
FogSetStartHeightOverTime(0.0, lp_dURATION);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:2435
TriggerEnable(TriggerGetCurrent(), false);
TriggerEnable(gt_DEBUGStage2, false);
FogSetDensityOverTime(0.2, 5.0);
FogSetFallOffOverTime(0.3, 5.0);
FogSetStartHeightOverTime(8.0, 5.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:2503
UnitIssueOrder(UnitFromId(249), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(591)), c_orderQueueAddToEnd);
Wait((SoundLengthSync(SoundLink(ConversationDataGetSound("zMission_Expedition01|Line00120", true), c_soundIndexAny)) + SoundLengthSync(SoundLink(ConversationDataGetSound("zMission_Expedition01|Line00014", true), c_soundIndexAny))), c_timeReal);
FogSetDensityOverTime(0.0, 12.0);
UnitKill(UnitFromId(169));
Wait(0.2, c_timeGame);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:5443
TriggerEnable(TriggerGetCurrent(), false);
FogSetDensityOverTime(0.15, 4.0);
FogSetFallOffOverTime(0.28, 4.0);
FogSetStartHeightOverTime(4.0, 4.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:5490
TriggerEnable(TriggerGetCurrent(), false);
TriggerExecute(gt_TransmissionFlashFreezeisNearQ, true, false);
FogSetDensityOverTime(0.125, 4.0);
FogSetFallOffOverTime(0.24, 4.0);
FogSetStartHeightOverTime(2.0, 4.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:603
// Automatic Variable Declarations
// Implementation
FogSetDensityOverTime(0.2, lp_dURATION);
FogSetFallOffOverTime(0.3, lp_dURATION);
FogSetStartHeightOverTime(8.0, lp_dURATION);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:627
// Automatic Variable Declarations
// Implementation
FogSetDensityOverTime(0.1, lp_dURATION);
FogSetFallOffOverTime(0.2, lp_dURATION);
FogSetStartHeightOverTime(0.0, lp_dURATION);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:2435
TriggerEnable(TriggerGetCurrent(), false);
TriggerEnable(gt_DEBUGStage2, false);
FogSetDensityOverTime(0.2, 5.0);
FogSetFallOffOverTime(0.3, 5.0);
FogSetStartHeightOverTime(8.0, 5.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:2503
UnitIssueOrder(UnitFromId(249), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(591)), c_orderQueueAddToEnd);
Wait((SoundLengthSync(SoundLink(ConversationDataGetSound("zMission_Expedition01|Line00120", true), c_soundIndexAny)) + SoundLengthSync(SoundLink(ConversationDataGetSound("zMission_Expedition01|Line00014", true), c_soundIndexAny))), c_timeReal);
FogSetDensityOverTime(0.0, 12.0);
UnitKill(UnitFromId(169));
Wait(0.2, c_timeGame);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:5443
TriggerEnable(TriggerGetCurrent(), false);
FogSetDensityOverTime(0.15, 4.0);
FogSetFallOffOverTime(0.28, 4.0);
FogSetStartHeightOverTime(4.0, 4.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2map — MapScript.galaxy:5490
TriggerEnable(TriggerGetCurrent(), false);
TriggerExecute(gt_TransmissionFlashFreezeisNearQ, true, false);
FogSetDensityOverTime(0.125, 4.0);
FogSetFallOffOverTime(0.24, 4.0);
FogSetStartHeightOverTime(2.0, 4.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:3361
GameSetLighting("KorhalPlatformEx2_Fire", 4.0);
FogSetColorOverTime(Color(100.00, 35.29, 16.86), 2.0);
FogSetDensityOverTime(0.1, 2.0);
FogSetFallOffOverTime(0.135, 2.0);
Wait(2.0, c_timeGame);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:5847
GameSetLighting("KorhalPlatformEx2", 4.0);
FogSetColorOverTime(Color(36.86, 85.88, 77.25), 4.0);
FogSetDensityOverTime(0.02, 4.0);
FogSetFallOffOverTime(0.135, 4.0);
libVoiC_gf_PauseAITimeCampaign(false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/ppurifier01.sc2map/MapScript.galaxy:3950
GameSetLighting("ProtossBaseDay", 90.0);
FogSetColorOverTime(Color(21.57, 34.51, 44.31), 90.0);
FogSetDensityOverTime(0.18, 90.0);
FogSetFallOffOverTime(0.15, 90.0);
SoundtrackStopCurrent(PlayerGroupAll(), c_soundtrackCategoryAmbience, true);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2map — MapScript.galaxy:3361
GameSetLighting("KorhalPlatformEx2_Fire", 4.0);
FogSetColorOverTime(Color(100.00, 35.29, 16.86), 2.0);
FogSetDensityOverTime(0.1, 2.0);
FogSetFallOffOverTime(0.135, 2.0);
Wait(2.0, c_timeGame);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2map — MapScript.galaxy:5847
GameSetLighting("KorhalPlatformEx2", 4.0);
FogSetColorOverTime(Color(36.86, 85.88, 77.25), 4.0);
FogSetDensityOverTime(0.02, 4.0);
FogSetFallOffOverTime(0.135, 4.0);
libVoiC_gf_PauseAITimeCampaign(false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ppurifier01.sc2map — MapScript.galaxy:3950
GameSetLighting("ProtossBaseDay", 90.0);
FogSetColorOverTime(Color(21.57, 34.51, 44.31), 90.0);
FogSetDensityOverTime(0.18, 90.0);
FogSetFallOffOverTime(0.15, 90.0);
SoundtrackStopCurrent(PlayerGroupAll(), c_soundtrackCategoryAmbience, true);