# Destroy Effects

Grammar — Destroy up to maximum effectType effects within distance of position
FlagsNative | Action

Removes up to a specified amount of effects within a specified radius of a point. This includes effects created by the game as well as effects created via “Create Effect” trigger actions.

# Arguments

  • point — Position
  • fixed — Distance
  • int — Maximum
  • string<gamelink::Effect> — Effect Type

Returns — void

native void GameDestroyEffects(
	point pos,
	fixed radius,
	int maxCount,
	string effectType,
);

Category: Environment / Effects

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:6079

    RegionPlayableMapSet(gv_mapAreaNormal);
    UnitGroupIssueOrder(UnitGroup(null, c_playerAny, RegionFromId(24), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistent");
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistentInitial");
    ActorWorldParticleFXDestroy();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:6080

    UnitGroupIssueOrder(UnitGroup(null, c_playerAny, RegionFromId(24), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistent");
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistentInitial");
    ActorWorldParticleFXDestroy();
    UnitPauseAll(true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:6079

    RegionPlayableMapSet(gv_mapAreaNormal);
    UnitGroupIssueOrder(UnitGroup(null, c_playerAny, RegionFromId(24), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistent");
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistentInitial");
    ActorWorldParticleFXDestroy();

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:6080

    UnitGroupIssueOrder(UnitGroup(null, c_playerAny, RegionFromId(24), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistent");
    GameDestroyEffects(PointFromId(321), 15.0, 0, "VortexCreatePersistentInitial");
    ActorWorldParticleFXDestroy();
    UnitPauseAll(true);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar03.sc2map/MapScript.galaxy:904

        Wait(0.1, c_timeGame);
        if ((gv_midComplete == true)) {
            GameDestroyEffects(lp_cHOSEN_POINT, 8.0, 0, "NukeDetonate");
            return true;
        }

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar03.sc2map/MapScript.galaxy:956

        Wait(0.1, c_timeGame);
        if ((gv_midComplete == true)) {
            GameDestroyEffects(lp_cHOSEN_POINT, 8.0, 0, "NukeDetonate");
            return true;
        }

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar03.sc2map/MapScript.galaxy:6651

    SoundStop(gv_secondaryAmbienceSound, true);
    libNtve_gf_KillModel(gv_nukeActor);
    GameDestroyEffects(PointFromId(584), 30.0, 0, "NukeDetonate");
    SoundStop(gv_nukeSeekSound, true);
    gv_victoryHiddenUnitGroup = UnitGroup(null, gv_pLAYER_01_USER, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:6068


    }
    GameDestroyEffects(PointFromId(283), 12.0, 0, "VoidSentryShieldRepair");
    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar03.sc2mapMapScript.galaxy:904

        Wait(0.1, c_timeGame);
        if ((gv_midComplete == true)) {
            GameDestroyEffects(lp_cHOSEN_POINT, 8.0, 0, "NukeDetonate");
            return true;
        }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar03.sc2mapMapScript.galaxy:956

        Wait(0.1, c_timeGame);
        if ((gv_midComplete == true)) {
            GameDestroyEffects(lp_cHOSEN_POINT, 8.0, 0, "NukeDetonate");
            return true;
        }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar03.sc2mapMapScript.galaxy:6651

    SoundStop(gv_secondaryAmbienceSound, true);
    libNtve_gf_KillModel(gv_nukeActor);
    GameDestroyEffects(PointFromId(584), 30.0, 0, "NukeDetonate");
    SoundStop(gv_nukeSeekSound, true);
    gv_victoryHiddenUnitGroup = UnitGroup(null, gv_pLAYER_01_USER, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2mapMapScript.galaxy:6068


    }
    GameDestroyEffects(PointFromId(283), 12.0, 0, "VoidSentryShieldRepair");
    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();

mods/novastoryassets.sc2modbase2.sc2maps/maps/campaign/nova/nova06.sc2map/MapScript.galaxy:5863

    }

    GameDestroyEffects(RegionGetCenter(RegionFromId(71)), 12.0, 0, null);
    libNtve_gf_SendActorMessageToGameRegion(RegionFromId(71), "Signal CinematicRemoval");
    auto78A413F3_g = gv_cinematicTempUnits;

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2303

    libComC_gf_PauseAITimeCampaign(false);
    if ((libNovC_gf_NovaActiveEquipmentInSlot("EQPSlotHelmet") != "EQPHelmetItem5")) {
        GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
        if ((gv_dominatedBuddyUnit != null) && (UnitIsAlive(gv_dominatedBuddyUnit) == true)) {
            GameDestroyEffects(UnitGetPosition(gv_dominatedBuddyUnit), 8.0, 0, "NovaDominationPersistent");

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2305

        GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
        if ((gv_dominatedBuddyUnit != null) && (UnitIsAlive(gv_dominatedBuddyUnit) == true)) {
            GameDestroyEffects(UnitGetPosition(gv_dominatedBuddyUnit), 8.0, 0, "NovaDominationPersistent");
        }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:6018

    libNCMI_gf_StealthAIRemoveUnitFromAllStealthAIDefendRegions(gv_s1_ThorFriend);
    libNCMI_gf_StealthAIRemoveUnitStealthAIEnemyUnitGroup(gv_s1_ThorFriend);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_s1_ThorFriend), 8.0, 0, "NovaDominationPersistent");
    TriggerQueueEnter();

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:6019

    libNCMI_gf_StealthAIRemoveUnitStealthAIEnemyUnitGroup(gv_s1_ThorFriend);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_s1_ThorFriend), 8.0, 0, "NovaDominationPersistent");
    TriggerQueueEnter();
    libComC_gf_SetAllSoundChannelVolumesCampaign(libComC_ge_VolumeChannelModeCampaign_Speech);

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:8529

    libNtve_gf_KillModel(libHots_gf_ActorForUnit(gv_stone, 1));
    UnitBehaviorAdd(gv_stone, "SuppressCloak", gv_stone, 1);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_stone), 8.0, 0, "NovaDominationPersistent");
    return true;

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:8530

    UnitBehaviorAdd(gv_stone, "SuppressCloak", gv_stone, 1);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_stone), 8.0, 0, "NovaDominationPersistent");
    return true;
}

mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova06.sc2mapMapScript.galaxy:5863

    }

    GameDestroyEffects(RegionGetCenter(RegionFromId(71)), 12.0, 0, null);
    libNtve_gf_SendActorMessageToGameRegion(RegionFromId(71), "Signal CinematicRemoval");
    auto78A413F3_g = gv_cinematicTempUnits;

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2303

    libComC_gf_PauseAITimeCampaign(false);
    if ((libNovC_gf_NovaActiveEquipmentInSlot("EQPSlotHelmet") != "EQPHelmetItem5")) {
        GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
        if ((gv_dominatedBuddyUnit != null) && (UnitIsAlive(gv_dominatedBuddyUnit) == true)) {
            GameDestroyEffects(UnitGetPosition(gv_dominatedBuddyUnit), 8.0, 0, "NovaDominationPersistent");

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2305

        GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
        if ((gv_dominatedBuddyUnit != null) && (UnitIsAlive(gv_dominatedBuddyUnit) == true)) {
            GameDestroyEffects(UnitGetPosition(gv_dominatedBuddyUnit), 8.0, 0, "NovaDominationPersistent");
        }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:6018

    libNCMI_gf_StealthAIRemoveUnitFromAllStealthAIDefendRegions(gv_s1_ThorFriend);
    libNCMI_gf_StealthAIRemoveUnitStealthAIEnemyUnitGroup(gv_s1_ThorFriend);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_s1_ThorFriend), 8.0, 0, "NovaDominationPersistent");
    TriggerQueueEnter();

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:6019

    libNCMI_gf_StealthAIRemoveUnitStealthAIEnemyUnitGroup(gv_s1_ThorFriend);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_s1_ThorFriend), 8.0, 0, "NovaDominationPersistent");
    TriggerQueueEnter();
    libComC_gf_SetAllSoundChannelVolumesCampaign(libComC_ge_VolumeChannelModeCampaign_Speech);

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:8529

    libNtve_gf_KillModel(libHots_gf_ActorForUnit(gv_stone, 1));
    UnitBehaviorAdd(gv_stone, "SuppressCloak", gv_stone, 1);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_stone), 8.0, 0, "NovaDominationPersistent");
    return true;

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:8530

    UnitBehaviorAdd(gv_stone, "SuppressCloak", gv_stone, 1);
    GameDestroyEffects(UnitGetPosition(gv_nova), 8.0, 0, "NovaDominationPersistent");
    GameDestroyEffects(UnitGetPosition(gv_stone), 8.0, 0, "NovaDominationPersistent");
    return true;
}