# Units In Waves With Target
Grammar — Units owned by player player in waves targeting waveTarget|Wave Target
Flags —Native
|Function
Returns a group of all the units owned by a player in any waves that are targeting the specified wave target.
# Arguments
int
— Playerwavetarget
— WaveTarget
Returns — unitgroup
native unitgroup AIGetUnitsInWavesWithTarget(
int player,
wavetarget target,
);
# Related
Category: AI / MiscCampaign / Functions
- AI Time Is Paused —
bool
— AITimeIsPaused - Elapsed AI Time —
fixed
— AIGetTime - Wave Of Unit —
wave
— AIUnitGetWave - Units Of Wave —
unitgroup
— AIWaveGetUnits - Escorts Of Unit —
unitgroup
— AIGetAllEscorts - Escorts Of Unit Group —
unitgroup
— AIGetAllEscortsGroup - Units In Waves With Target —
unitgroup
— AIGetUnitsInWavesWithTarget - Unit Is Script Controlled —
bool
— AIIsScriptControlled - Unit Is Unavailable For Wave Use —
bool
— AIIsNotUsableInWaves - Unit Is Suicidal —
bool
— AIIsSuicideUnit - Difficulty Value (Integer) —
int
— libNtve_gf_DifficultyValueInt - Difficulty Value (Real) —
fixed
— libNtve_gf_DifficultyValueFixed - Difficulty Value (Unit Type) —
string
<gamelink::Unit> — libNtve_gf_DifficultyValueUnitType - Difficulty Is (one)
- Difficulty Is (two)
- Difficulty High
- Difficulty Low
- Random Spawn Point —
point
— AIRandomSpawnPoint
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:1205
TimerWindowShow(gv_kerrigansETAWINDOW, PlayerGroupAll(), false);
TriggerExecute(gt_ObjectiveDestroyDataUpdate, true, true);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100))), lv_guardUnits);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1))), lv_guardUnits);
UnitGroupIssueOrder(lv_guardUnits, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(5))), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:1206
TriggerExecute(gt_ObjectiveDestroyDataUpdate, true, true);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100))), lv_guardUnits);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1))), lv_guardUnits);
UnitGroupIssueOrder(lv_guardUnits, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(5))), c_orderQueueAddToEnd);
PingDestroy(gv_pINGSite1);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2map — MapScript.galaxy:1205
TimerWindowShow(gv_kerrigansETAWINDOW, PlayerGroupAll(), false);
TriggerExecute(gt_ObjectiveDestroyDataUpdate, true, true);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100))), lv_guardUnits);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1))), lv_guardUnits);
UnitGroupIssueOrder(lv_guardUnits, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(5))), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2map — MapScript.galaxy:1206
TriggerExecute(gt_ObjectiveDestroyDataUpdate, true, true);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100))), lv_guardUnits);
libNtve_gf_AddUnitGroupToUnitGroup(AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1))), lv_guardUnits);
UnitGroupIssueOrder(lv_guardUnits, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(5))), c_orderQueueAddToEnd);
PingDestroy(gv_pINGSite1);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zkorhal03.sc2map/MapScript.galaxy:3663
Wait(1.0, c_timeAI);
}
lv_attackGroup = AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)));
auto6FC17D8E_g = lv_attackGroup;
auto6FC17D8E_u = UnitGroupCount(auto6FC17D8E_g, c_unitCountAll);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zkorhal03.sc2map/MapScript.galaxy:3788
Wait(1.0, c_timeAI);
}
lv_attackGroup = AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)));
auto44B49985_g = lv_attackGroup;
auto44B49985_u = UnitGroupCount(auto44B49985_g, c_unitCountAll);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal03.sc2map — MapScript.galaxy:3663
Wait(1.0, c_timeAI);
}
lv_attackGroup = AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)));
auto6FC17D8E_g = lv_attackGroup;
auto6FC17D8E_u = UnitGroupCount(auto6FC17D8E_g, c_unitCountAll);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal03.sc2map — MapScript.galaxy:3788
Wait(1.0, c_timeAI);
}
lv_attackGroup = AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)));
auto44B49985_g = lv_attackGroup;
auto44B49985_u = UnitGroupCount(auto44B49985_g, c_unitCountAll);