# Set Target UnitArea For Attack Waves
Grammar — Set the target for player player attack waves to the current position of unitTag
Flags —Native
|Action
Sets the position of a unit to be the target of a player’s attack waves.
# Arguments
int
— Attackerunit
— Unit
Returns — void
native void AIAttackWaveSetTargetUnitPoint(
int player,
unit u,
);
# Related
Category: AI / AttackWaves / Actions
- Add Unit To Attack Wave —
void
— AIAttackWaveUseUnit - Add Unit Group To Attack Wave —
void
— AIAttackWaveUseGroup - Add Escort Unit To Attack Wave —
void
— AIAttackWaveAddEscortUnit - Add Escort UnitType To Attack Wave —
void
— AIAttackWaveAddEscortType - Add Attack Wave Waypoint —
void
— AIAttackWaveAddWaypoint - Send Attack Wave —
void
— AIAttackWaveSend - Cancel Attack Wave —
void
— AIAttackWaveCancel - Set Attack Wave Gather Point —
void
— AIAttackWaveSetGatherPoint - Set Target Player For Attack Waves —
void
— AIAttackWaveSetTargetPlayer - Set Target Unit For Attack Waves —
void
— AIAttackWaveSetTargetUnit - Set Target UnitGroup For Attack Waves —
void
— AIAttackWaveSetTargetUnitGroup - Set Target UnitArea For Attack Waves —
void
— AIAttackWaveSetTargetUnitPoint - Set Target Point For Attack Waves —
void
— AIAttackWaveSetTargetPoint - Set Target Merge For Attack Waves —
void
— AIAttackWaveSetTargetMerge - Set Target Patrol For Attack Waves —
void
— AIAttackWaveSetTargetPatrol - Set Target Escort For Attack Waves —
void
— AIAttackWaveSetTargetEscort - Set Target Escort For Attack Waves, No Leashing —
void
— AIAttackWaveSetTargetEscortNL - Set Target Gather Defense For Attack Waves —
void
— AIAttackWaveSetTargetGatherD - Set Target Gather Offense For Attack Waves —
void
— AIAttackWaveSetTargetGatherO - Set Target Melee For Attack Waves —
void
— AIAttackWaveSetTargetMelee - Set Target Melee Harass For Attack Waves —
void
— AIAttackWaveSetTargetMeleeHarass - Set Target Region For Attack/Defense Waves —
void
— AIAttackWaveSetTargetRegion - Add Attack Wave Unit Types (Liberty) —
void
— AIAttackWaveAddUnits4 - Add Attack Wave Unit Types (Swarm) —
void
— AIAttackWaveAddUnits3 - Set Attack Wave Keep Alive —
void
— AIAttackWaveSetKeepAlive - Set Attack Wave Gather Early No Replace —
void
— AIAttackWaveSetGatherEarlyNoReplace
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4503
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gv_virophageRecord[ge_VirophageName_VirophageSA1].lv_virophage;
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4521
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4536
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4553
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4569
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(4, 4, 6, "Marine");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4584
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "SiegeTank");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4600
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(2, 2, 3, "Marauder");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4615
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(3, 3, 4, "VikingFighter");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4631
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Banshee");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:4645
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(2, 2, 3, "Medivac");
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:744
AISetUnitScriptControlled(lv_currentUnit, false);
if ((lp_gatherRegion == RegionFromId(27))) {
AIAttackWaveSetTargetUnitPoint(UnitGetOwner(lv_currentUnit), gv_chrysalis);
AIAttackWaveUseUnit(UnitGetOwner(lv_currentUnit), lv_currentUnit);
AIAttackWaveSend(UnitGetOwner(lv_currentUnit), 0, false);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:803
UnitGroupAdd(gv_airAttackGroup, UnitLastCreated());
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_03_YAGDRA, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_03_YAGDRA, gv_airAttackGroup);
if ((gv_allowAirHarassment == true) && ((UnitGroupCount(UnitGroup("Hatchery", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1) || (UnitGroupCount(UnitGroup("Lair", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1) || (UnitGroupCount(UnitGroup("Hive", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1))) {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:819
UnitGroupAdd(gv_airAttackGroup, UnitLastCreated());
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_BRAKK, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_02_BRAKK, gv_airAttackGroup);
AIAttackWaveSend(gv_pLAYER_02_BRAKK, 0, false);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:4244
AISetUnitScriptControlled(autoD63BB403_var, false);
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_BRAKK, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_02_BRAKK, lv_rockAttackGroup);
AIAttackWaveSend(gv_pLAYER_02_BRAKK, 0, false);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:4266
libNtve_gf_ClearAnimationOnDoodadsInRegion(RegionFromId(18), null, c_animNameDefault);
AISetGroupScriptControlled(lv_rockAttackGroup, false);
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_03_YAGDRA, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_03_YAGDRA, lv_rockAttackGroup);
AIAttackWaveSend(gv_pLAYER_03_YAGDRA, 0, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4503
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gv_virophageRecord[ge_VirophageName_VirophageSA1].lv_virophage;
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4521
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4536
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4553
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Medivac");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4569
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(4, 4, 6, "Marine");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4584
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "SiegeTank");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4600
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(2, 2, 3, "Marauder");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4615
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(3, 3, 4, "VikingFighter");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4631
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(4, 4, 5, "Firebat");
AIAttackWaveAddUnits3(1, 1, 2, "Banshee");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:4645
gv_cleanserTeamTargets[gv_cleanserWaveCount] = gf_GetCleanserTarget();
if ((gv_cleanserTeamTargets[gv_cleanserWaveCount] != null)) {
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_04_DOMINION_CLEANSERS, gv_cleanserTeamTargets[gv_cleanserWaveCount]);
AIAttackWaveAddUnits3(3, 3, 4, "Firebat");
AIAttackWaveAddUnits3(2, 2, 3, "Medivac");
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:744
AISetUnitScriptControlled(lv_currentUnit, false);
if ((lp_gatherRegion == RegionFromId(27))) {
AIAttackWaveSetTargetUnitPoint(UnitGetOwner(lv_currentUnit), gv_chrysalis);
AIAttackWaveUseUnit(UnitGetOwner(lv_currentUnit), lv_currentUnit);
AIAttackWaveSend(UnitGetOwner(lv_currentUnit), 0, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:803
UnitGroupAdd(gv_airAttackGroup, UnitLastCreated());
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_03_YAGDRA, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_03_YAGDRA, gv_airAttackGroup);
if ((gv_allowAirHarassment == true) && ((UnitGroupCount(UnitGroup("Hatchery", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1) || (UnitGroupCount(UnitGroup("Lair", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1) || (UnitGroupCount(UnitGroup("Hive", gv_pLAYER_01_USER, RegionCircle(PointFromId(2441), 12.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) >= 1))) {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:819
UnitGroupAdd(gv_airAttackGroup, UnitLastCreated());
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_BRAKK, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_02_BRAKK, gv_airAttackGroup);
AIAttackWaveSend(gv_pLAYER_02_BRAKK, 0, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:4244
AISetUnitScriptControlled(autoD63BB403_var, false);
}
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_BRAKK, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_02_BRAKK, lv_rockAttackGroup);
AIAttackWaveSend(gv_pLAYER_02_BRAKK, 0, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:4266
libNtve_gf_ClearAnimationOnDoodadsInRegion(RegionFromId(18), null, c_animNameDefault);
AISetGroupScriptControlled(lv_rockAttackGroup, false);
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_03_YAGDRA, gv_chrysalis);
AIAttackWaveUseGroup(gv_pLAYER_03_YAGDRA, lv_rockAttackGroup);
AIAttackWaveSend(gv_pLAYER_03_YAGDRA, 0, false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:741
}
AIAttackWaveSetGatherPoint(gv_pLAYER_02_DOMINION, gv_gatherPoints[lp_region]);
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_DOMINION, gv_artanis);
if ((lp_region == 4)) {
AIAttackWaveAddWaypoint(gv_pLAYER_02_DOMINION, PointFromId(550), true);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:741
}
AIAttackWaveSetGatherPoint(gv_pLAYER_02_DOMINION, gv_gatherPoints[lp_region]);
AIAttackWaveSetTargetUnitPoint(gv_pLAYER_02_DOMINION, gv_artanis);
if ((lp_region == 4)) {
AIAttackWaveAddWaypoint(gv_pLAYER_02_DOMINION, PointFromId(550), true);