# Set Fog Density

Grammar — Set fog’s density to density
FlagsNative | Action

Sets the density of environmental fog. A higher value means thicker fog.

# Arguments

  • fixed — Density

Returns — void

native void FogSetDensity(fixed d);

Category: Environment / Fog And Background

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19954

    FogSetColor(Color(67.84, 40.00, 27.84));
    FogSetFallOff(0.096);
    FogSetDensity(0.017);
    FogSetStartHeight(-5.904);
    GameSetLighting("SMCharBattlefield", 0.0);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:1103


    GameTimeOfDaySet("08:00:00");
    FogSetDensity(0.2);
    FogSetColor(Color(0,0,0));
    CreepModify(PointFromId(8), 10.0, true, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:7547

    }
    FogSetColor(ColorWithAlpha(95.69, 20.00, 20.00, 40.00));
    FogSetDensity(0.7);
    FogSetFallOff(0.35);
    FogSetStartHeight((gv__4HeightOfLava - 7.0));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19954

    FogSetColor(Color(67.84, 40.00, 27.84));
    FogSetFallOff(0.096);
    FogSetDensity(0.017);
    FogSetStartHeight(-5.904);
    GameSetLighting("SMCharBattlefield", 0.0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2mapMapScript.galaxy:1103


    GameTimeOfDaySet("08:00:00");
    FogSetDensity(0.2);
    FogSetColor(Color(0,0,0));
    CreepModify(PointFromId(8), 10.0, true, true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02a.sc2mapMapScript.galaxy:7547

    }
    FogSetColor(ColorWithAlpha(95.69, 20.00, 20.00, 40.00));
    FogSetDensity(0.7);
    FogSetFallOff(0.35);
    FogSetStartHeight((gv__4HeightOfLava - 7.0));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition01.sc2map/MapScript.galaxy:1353

    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionEntireMap(), "SnowBlizzard", "Death", "Death", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
    FogSetColor(Color(65.10, 84.31, 100.00));
    FogSetDensity(0.1);
    FogSetFallOff(0.2);
    FogSetStartHeight(0.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab02.sc2map/MapScript.galaxy:12158

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryAmbience, "Ambience_Avernus", c_soundtrackCueAny, c_soundtrackIndexAny, true);
    FogSetColor(Color(86.67, 78.04, 65.10));
    FogSetDensity(0.07);
    FogSetFallOff(0.12);
    FogSetStartHeight(-4.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab02.sc2map/MapScript.galaxy:12359

    libNtve_gf_RemoveDoodadsinRegion(RegionEntireMap(), "UmojanLabTramBackgroundNaturalCliffs");
    FogSetColor(Color(86.67, 78.04, 65.10));
    FogSetDensity(0.07);
    FogSetFallOff(0.12);
    FogSetStartHeight(-4.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstorychar.sc2map/MapScript.galaxy:443

    FogSetEnabled(true);
    FogSetColor(Color(50.20, 25.10, 20.39));
    FogSetDensity(0.0035);
    FogSetFallOff(0.001);
    FogSetStartHeight(0.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2map/MapScript.galaxy:358

        FogSetEnabled(true);
        FogSetColor(Color(50.20, 60.00, 100.00));
        FogSetDensity(0.008);
        FogSetFallOff(0.1);
        FogSetStartHeight(0.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2map/MapScript.galaxy:366

        FogSetEnabled(true);
        FogSetColor(Color(60.00, 50.20, 29.80));
        FogSetDensity(0.01);
        FogSetFallOff(0.1);
        FogSetStartHeight(0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition01.sc2mapMapScript.galaxy:1353

    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionEntireMap(), "SnowBlizzard", "Death", "Death", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
    FogSetColor(Color(65.10, 84.31, 100.00));
    FogSetDensity(0.1);
    FogSetFallOff(0.2);
    FogSetStartHeight(0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab02.sc2mapMapScript.galaxy:12158

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryAmbience, "Ambience_Avernus", c_soundtrackCueAny, c_soundtrackIndexAny, true);
    FogSetColor(Color(86.67, 78.04, 65.10));
    FogSetDensity(0.07);
    FogSetFallOff(0.12);
    FogSetStartHeight(-4.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab02.sc2mapMapScript.galaxy:12359

    libNtve_gf_RemoveDoodadsinRegion(RegionEntireMap(), "UmojanLabTramBackgroundNaturalCliffs");
    FogSetColor(Color(86.67, 78.04, 65.10));
    FogSetDensity(0.07);
    FogSetFallOff(0.12);
    FogSetStartHeight(-4.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorychar.sc2mapMapScript.galaxy:443

    FogSetEnabled(true);
    FogSetColor(Color(50.20, 25.10, 20.39));
    FogSetDensity(0.0035);
    FogSetFallOff(0.001);
    FogSetStartHeight(0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2mapMapScript.galaxy:358

        FogSetEnabled(true);
        FogSetColor(Color(50.20, 60.00, 100.00));
        FogSetDensity(0.008);
        FogSetFallOff(0.1);
        FogSetStartHeight(0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2mapMapScript.galaxy:366

        FogSetEnabled(true);
        FogSetColor(Color(60.00, 50.20, 29.80));
        FogSetDensity(0.01);
        FogSetFallOff(0.1);
        FogSetStartHeight(0.0);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7532

        FogSetColor(Color(9.80, 14.90, 9.80));
        FogSetFallOff(0.1);
        FogSetDensity(0.03);
        FogSetStartHeight(0.0);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8828

    FogSetColor(Color(9.80, 14.90, 9.80));
    FogSetFallOff(0.1);
    FogSetDensity(0.03);
    FogSetStartHeight(0.0);
    EnvironmentShow(c_environmentAll, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:376

    FogSetColor(Color(17.65, 26.67, 33.73));
    FogSetStartHeight(-0.9);
    FogSetDensity(0.06);
    FogSetFallOff(0.2);
    GameSetLighting("Aiur4City", 0.0);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:469

    FogSetColor(Color(46.67, 52.55, 74.90));
    FogSetStartHeight(-0.5);
    FogSetDensity(0.06);
    FogSetFallOff(0.2);
    GameSetLighting("Aiur4City", 0.0);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:530

    FogSetColor(Color(21.18, 30.20, 39.61));
    FogSetStartHeight(4.0);
    FogSetDensity(0.35);
    FogSetFallOff(0.4);
    GameSetLighting("Aiur4Temple", 0.0);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:376

    FogSetColor(Color(17.65, 26.67, 33.73));
    FogSetStartHeight(-0.9);
    FogSetDensity(0.06);
    FogSetFallOff(0.2);
    GameSetLighting("Aiur4City", 0.0);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:469

    FogSetColor(Color(46.67, 52.55, 74.90));
    FogSetStartHeight(-0.5);
    FogSetDensity(0.06);
    FogSetFallOff(0.2);
    GameSetLighting("Aiur4City", 0.0);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:530

    FogSetColor(Color(21.18, 30.20, 39.61));
    FogSetStartHeight(4.0);
    FogSetDensity(0.35);
    FogSetFallOff(0.4);
    GameSetLighting("Aiur4Temple", 0.0);