# Set Target UnitArea For Attack Waves

Grammar — Set the target for player player attack waves to the current position of unitTag
FlagsNative | Action

Sets the position of a unit to be the target of a player’s attack waves.

# Arguments

  • int — Attacker
  • unit — Unit

Returns — void

native void AIAttackWaveSetTargetUnitPoint(
	int player,
	unit u,
);

Category: AI / AttackWaves / Actions

# Examples

campaigns/swarm.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2campaignbase.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.sc2mapMapScript.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);