Let the remaing enemy troops in Allies02 attack the player

once the base is destroyed.
Does not include unit guarding the convoy path.
This commit is contained in:
abcdefg30
2019-01-07 13:22:54 +01:00
committed by Paul Chote
parent da40f45ece
commit 30e3b45637
2 changed files with 26 additions and 16 deletions

View File

@@ -17,6 +17,8 @@ TruckPath = { TruckEntryPoint.Location, TruckRallyPoint.Location }
PathGuards = { PathGuard1, PathGuard2, PathGuard3, PathGuard4, PathGuard5, PathGuard6, PathGuard7, PathGuard8, PathGuard9, PathGuard10, PathGuard11, PathGuard12, PathGuard13, PathGuard14, PathGuard15 }
SovietBase = { SovietConyard, SovietRefinery, SovietPower1, SovietPower2, SovietSilo, SovietKennel, SovietBarracks, SovietWarfactory }
IdlingUnits = { }
if Map.LobbyOption("difficulty") == "easy" then
@@ -87,6 +89,14 @@ RunInitialActivities = function()
SendTrucks()
end)
Trigger.OnAllKilled(SovietBase, function()
Utils.Do(ussr.GetGroundAttackers(), function(unit)
if not Utils.Any(PathGuards, function(pg) return pg == unit end) then
Trigger.OnIdle(unit, unit.Hunt)
end
end)
end)
if InfantryTypes then
Trigger.AfterDelay(InfantryDelay, InfantryProduction)
end