# Destroy Effects
Grammar — Destroy up to maximum effectType effects within distance of position
Flags —Native
|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
— Positionfixed
— Distanceint
— Maximumstring
<gamelink::Effect> — Effect Type
Returns — void
native void GameDestroyEffects(
point pos,
fixed radius,
int maxCount,
string effectType,
);
# Related
Category: Environment / Effects
- Create Explosion At Point —
void
— libNtve_gf_CreateExplosionAtPoint - Create Effect At Point (From Player) —
void
— PlayerCreateEffectPoint - Create Effect On Unit (From Player) —
void
— PlayerCreateEffectUnit - Create Effect At Point (From Unit) —
void
— UnitCreateEffectPoint - Create Effect On Unit (From Unit) —
void
— UnitCreateEffectUnit - Damage Unit (From Unit) —
void
— UnitDamage - Player Can Create Effect At Point —
bool
— libNtve_gf_PlayerCanCreateEffectAtPoint - Player Can Create Effect On Unit —
bool
— libNtve_gf_PlayerCanCreateEffectOnUnit - Unit Can Create Effect At Point —
bool
— libNtve_gf_UnitCanCreateEffectAtPoint - Unit Can Create Effect On Unit —
bool
— libNtve_gf_UnitCanCreateEffectOnUnit - Destroy Effects —
void
— GameDestroyEffects - Effect Used —
void
— TriggerAddEventPlayerEffectUsed - Effect Used From Scope —
void
— TriggerAddEventPlayerEffectUsedFromScope - Triggering Effect Used —
string
<gamelink::Effect> — EventPlayerEffectUsed - Triggering Effect Point —
point
— EventPlayerEffectUsedPoint - Triggering Effect Unit —
unit
— EventPlayerEffectUsedUnit - Triggering Effect Item —
unit
— EventPlayerEffectUsedItem - Triggering Effect Impact Unit —
unit
— EventPlayerEffectUsedUnitImpact - Triggering Effect Launch Unit —
unit
— EventPlayerEffectUsedUnitLaunch - Triggering Effect Unit Owner —
int
— EventPlayerEffectUsedUnitOwner - Triggering Effect Unit Type —
string
<gamelink::Unit> — EventPlayerEffectUsedUnitType - Triggering Effect Item Type —
string
<gamelink::Unit> — EventPlayerEffectUsedItemType - Triggering Effect Amount (Integer) —
int
— EventPlayerEffectUsedAmountInt - Triggering Effect Amount (Real) —
fixed
— EventPlayerEffectUsedAmountFixed - Triggering Effect Source Behavior —
string
<gamelink::Behavior> — EventPlayerEffectUsedSourceBehavior - Triggering Effect Weapon —
string
<gamelink::Weapon> — EventPlayerEffectUsedWeapon - Triggering Effect Ability —
string
<gamelink::Abil> — EventPlayerEffectUsedAbil
# Examples
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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/swarm.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:6068
}
GameDestroyEffects(PointFromId(283), 12.0, 0, "VoidSentryShieldRepair");
gv_cinematicHiddenUnits = UnitGroupEmpty();
gv_cinematicTempUnits = UnitGroupEmpty();
mods/novastoryassets.sc2mod — base2.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.sc2mod — base3.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.sc2mod — base3.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.sc2mod — base3.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.sc2mod — base3.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.sc2mod — base3.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.sc2mod — base3.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.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.sc2mod/base3.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.sc2mod/base3.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.sc2mod/base3.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.sc2mod/base3.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.sc2mod/base3.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.sc2mod/base3.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;
}