Improve AI response in Nod03b
This commit is contained in:
@@ -12,23 +12,26 @@ Engineers = { "e6", "e6", "e6" }
|
||||
FirstAttackWaveUnits = { "e1", "e1", "e2" }
|
||||
SecondAttackWaveUnits = { "e1", "e1", "e1" }
|
||||
ThirdAttackWaveUnits = { "e1", "e1", "e1", "e2" }
|
||||
GDIBase = { Base1, Base2, Base3, Base4, Base5, Base6, Base7 }
|
||||
Humvees = { Humvee1, Humvee2 }
|
||||
HumveeFootprint = { CPos.New(22,26), CPos.New(23,26), CPos.New(24,26), CPos.New(34,25), CPos.New(35,25) }
|
||||
|
||||
SendAttackWave = function(units, action)
|
||||
Reinforcements.Reinforce(GDI, units, { GDIBarracksSpawn.Location, WP0.Location, WP1.Location }, 15, action)
|
||||
end
|
||||
|
||||
FirstAttackWave = function(soldier)
|
||||
soldier.Move(WP2.Location)
|
||||
soldier.Move(WP3.Location)
|
||||
soldier.Move(WP4.Location)
|
||||
soldier.AttackMove(WP2.Location)
|
||||
soldier.AttackMove(WP3.Location)
|
||||
soldier.AttackMove(WP4.Location)
|
||||
soldier.AttackMove(PlayerBase.Location)
|
||||
end
|
||||
|
||||
SecondAttackWave = function(soldier)
|
||||
soldier.Move(WP5.Location)
|
||||
soldier.Move(WP6.Location)
|
||||
soldier.Move(WP7.Location)
|
||||
soldier.Move(WP9.Location)
|
||||
soldier.AttackMove(WP5.Location)
|
||||
soldier.AttackMove(WP6.Location)
|
||||
soldier.AttackMove(WP7.Location)
|
||||
soldier.AttackMove(WP9.Location)
|
||||
soldier.AttackMove(PlayerBase.Location)
|
||||
end
|
||||
|
||||
@@ -62,6 +65,29 @@ WorldLoaded = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(140), function() SendAttackWave(ThirdAttackWaveUnits, FirstAttackWave) end)
|
||||
|
||||
local humveeTriggered
|
||||
Trigger.OnEnteredFootprint(HumveeFootprint, function(actor, id)
|
||||
if actor.Owner == Nod and not humveeTriggered then
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
humveeTriggered = true
|
||||
|
||||
Utils.Do(Humvees, function(a)
|
||||
if not a.IsDead then
|
||||
IdleHunt(a)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnAnyKilled(GDIBase, function()
|
||||
if not BaseAttacked then
|
||||
BaseAttacked = true
|
||||
Utils.Do(GDI.GetGroundAttackers(), function(unit)
|
||||
IdleHunt(unit)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
|
||||
Reference in New Issue
Block a user