Improve AI response in Nod03b

This commit is contained in:
Smittytron
2021-02-06 19:27:07 -06:00
committed by reaperrr
parent 8711d8799c
commit 5cf622fb6e
2 changed files with 45 additions and 19 deletions

View File

@@ -26,15 +26,15 @@ Players:
Faction: gdi Faction: gdi
PlayerReference@GDI: PlayerReference@GDI:
Name: GDI Name: GDI
Bot: campaign
Faction: gdi Faction: gdi
Color: F5D378 Color: F5D378
Allies: GDI Allies: GDI
Enemies: Nod Enemies: Nod
Bot: campaign
PlayerReference@Nod: PlayerReference@Nod:
Name: Nod Name: Nod
Playable: True
AllowBots: False AllowBots: False
Playable: True
Required: True Required: True
LockFaction: True LockFaction: True
Faction: nod Faction: nod
@@ -121,8 +121,8 @@ Actors:
Actor89: e1 Actor89: e1
Location: 19,21 Location: 19,21
Owner: GDI Owner: GDI
Facing: 512
SubCell: 1 SubCell: 1
Facing: 512
Actor90: e1 Actor90: e1
Location: 30,43 Location: 30,43
Owner: GDI Owner: GDI
@@ -324,22 +324,22 @@ Actors:
Actor50: t18 Actor50: t18
Location: 13,37 Location: 13,37
Owner: Neutral Owner: Neutral
Actor51: silo Base4: silo
Location: 23,17 Location: 23,17
Owner: GDI Owner: GDI
Actor52: silo Base1: silo
Location: 18,17 Location: 18,17
Owner: GDI Owner: GDI
Actor53: pyle Base3: pyle
Location: 23,19 Location: 23,19
Owner: GDI Owner: GDI
Actor54: nuke Base5: nuke
Location: 25,17 Location: 25,17
Owner: GDI Owner: GDI
Actor55: fact Base6: fact
Location: 27,17 Location: 27,17
Owner: GDI Owner: GDI
Actor56: gtwr Base7: gtwr
Location: 18,23 Location: 18,23
Owner: GDI Owner: GDI
Actor57: v20 Actor57: v20
@@ -360,7 +360,7 @@ Actors:
Actor62: v19 Actor62: v19
Location: 28,41 Location: 28,41
Owner: Neutral Owner: Neutral
Actor63: proc Base2: proc
Location: 20,17 Location: 20,17
Owner: GDI Owner: GDI
Actor65: v19 Actor65: v19
@@ -372,7 +372,7 @@ Actors:
Actor68: v19 Actor68: v19
Location: 29,42 Location: 29,42
Owner: Neutral Owner: Neutral
Actor72: jeep Humvee1: jeep
Location: 28,21 Location: 28,21
Owner: GDI Owner: GDI
Facing: 512 Facing: 512
@@ -384,7 +384,7 @@ Actors:
Location: 32,36 Location: 32,36
Owner: GDI Owner: GDI
Facing: 384 Facing: 384
Actor75: jeep Humvee2: jeep
Location: 29,21 Location: 29,21
Owner: GDI Owner: GDI
Facing: 512 Facing: 512

View File

@@ -12,23 +12,26 @@ Engineers = { "e6", "e6", "e6" }
FirstAttackWaveUnits = { "e1", "e1", "e2" } FirstAttackWaveUnits = { "e1", "e1", "e2" }
SecondAttackWaveUnits = { "e1", "e1", "e1" } SecondAttackWaveUnits = { "e1", "e1", "e1" }
ThirdAttackWaveUnits = { "e1", "e1", "e1", "e2" } 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) SendAttackWave = function(units, action)
Reinforcements.Reinforce(GDI, units, { GDIBarracksSpawn.Location, WP0.Location, WP1.Location }, 15, action) Reinforcements.Reinforce(GDI, units, { GDIBarracksSpawn.Location, WP0.Location, WP1.Location }, 15, action)
end end
FirstAttackWave = function(soldier) FirstAttackWave = function(soldier)
soldier.Move(WP2.Location) soldier.AttackMove(WP2.Location)
soldier.Move(WP3.Location) soldier.AttackMove(WP3.Location)
soldier.Move(WP4.Location) soldier.AttackMove(WP4.Location)
soldier.AttackMove(PlayerBase.Location) soldier.AttackMove(PlayerBase.Location)
end end
SecondAttackWave = function(soldier) SecondAttackWave = function(soldier)
soldier.Move(WP5.Location) soldier.AttackMove(WP5.Location)
soldier.Move(WP6.Location) soldier.AttackMove(WP6.Location)
soldier.Move(WP7.Location) soldier.AttackMove(WP7.Location)
soldier.Move(WP9.Location) soldier.AttackMove(WP9.Location)
soldier.AttackMove(PlayerBase.Location) soldier.AttackMove(PlayerBase.Location)
end end
@@ -62,6 +65,29 @@ WorldLoaded = function()
Trigger.AfterDelay(DateTime.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end) Trigger.AfterDelay(DateTime.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end)
Trigger.AfterDelay(DateTime.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end) Trigger.AfterDelay(DateTime.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end)
Trigger.AfterDelay(DateTime.Seconds(140), function() SendAttackWave(ThirdAttackWaveUnits, FirstAttackWave) 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 end
Tick = function() Tick = function()