# Set Target Escort For Attack Waves, No Leashing
Grammar — Set the target for player player attack waves to be escorting unit group escortGroup|UnitGroup with replace behavior replaceType. This version is without leashing.
Flags —Native
|Action
Sets the target of a player’s attack waves to escort a unit group. The escorts will not break combat and return to their charge should they become seperated.
# Arguments
int
— Attackerunitgroup
— EscortGroupint
<preset::ReplaceType> — ReplaceType
Returns — void
native void AIAttackWaveSetTargetEscortNL(
int player,
unitgroup g,
int replaceType,
);
# 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/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:329
autoD1A8BB6F_val = gv_protossThreatLevel;
if (autoD1A8BB6F_val == 1) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:332
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:343
}
else if (autoD1A8BB6F_val == 2) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:346
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:357
}
else if (autoD1A8BB6F_val == 3) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(0, 0, 1, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:360
AIAttackWaveAddUnits4(0, 0, 1, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:378
}
else if (autoD1A8BB6F_val == 4) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:381
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:400
}
else if (autoD1A8BB6F_val == 5) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(2, 2, 3, 3, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:403
AIAttackWaveAddUnits4(2, 2, 3, 3, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 4);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:329
autoD1A8BB6F_val = gv_protossThreatLevel;
if (autoD1A8BB6F_val == 1) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:332
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:343
}
else if (autoD1A8BB6F_val == 2) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:346
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:357
}
else if (autoD1A8BB6F_val == 3) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(0, 0, 1, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:360
AIAttackWaveAddUnits4(0, 0, 1, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:378
}
else if (autoD1A8BB6F_val == 4) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:381
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:400
}
else if (autoD1A8BB6F_val == 5) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(2, 2, 3, 3, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:403
AIAttackWaveAddUnits4(2, 2, 3, 3, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 4);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/ptaldarim02.sc2map/MapScript.galaxy:3000
}
AIAttackWaveSetTargetEscortNL(gv_pLAYER_02_TALDARIM, libNtve_gf_ConvertUnitToUnitGroup(gv_tugOfWarEscortTargetUnit), 0);
AIAttackWaveSetGatherPoint(gv_pLAYER_02_TALDARIM, RegionGetCenter(gf_GetWarpInRegion()));
if ((gv_waveGroupIndex < gv_waveGroupUBound)) {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/ptaldarim02.sc2map/MapScript.galaxy:3139
}
AIAttackWaveSetTargetEscortNL(gv_pLAYER_05_TALDARIM, libNtve_gf_ConvertUnitToUnitGroup(gv_tugOfWarEscortTargetUnit), 0);
AIAttackWaveSetGatherPoint(gv_pLAYER_05_TALDARIM, RegionGetCenter(RegionFromId(23)));
if ((gv_specialWaveGroupIndex < gv_specialWaveGroupUBound)) {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ptaldarim02.sc2map — MapScript.galaxy:3000
}
AIAttackWaveSetTargetEscortNL(gv_pLAYER_02_TALDARIM, libNtve_gf_ConvertUnitToUnitGroup(gv_tugOfWarEscortTargetUnit), 0);
AIAttackWaveSetGatherPoint(gv_pLAYER_02_TALDARIM, RegionGetCenter(gf_GetWarpInRegion()));
if ((gv_waveGroupIndex < gv_waveGroupUBound)) {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ptaldarim02.sc2map — MapScript.galaxy:3139
}
AIAttackWaveSetTargetEscortNL(gv_pLAYER_05_TALDARIM, libNtve_gf_ConvertUnitToUnitGroup(gv_tugOfWarEscortTargetUnit), 0);
AIAttackWaveSetGatherPoint(gv_pLAYER_05_TALDARIM, RegionGetCenter(RegionFromId(23)));
if ((gv_specialWaveGroupIndex < gv_specialWaveGroupUBound)) {