Add AI infantry production to Soviet02b
This commit is contained in:
@@ -276,7 +276,7 @@ Actors:
|
|||||||
Actor82: barl
|
Actor82: barl
|
||||||
Location: 84,69
|
Location: 84,69
|
||||||
Owner: Greece
|
Owner: Greece
|
||||||
Actor83: tent
|
Tent: tent
|
||||||
Location: 70,57
|
Location: 70,57
|
||||||
Owner: Greece
|
Owner: Greece
|
||||||
Actor84: barl
|
Actor84: barl
|
||||||
@@ -483,5 +483,11 @@ Actors:
|
|||||||
TransportWaypoint3: waypoint
|
TransportWaypoint3: waypoint
|
||||||
Location: 67,75
|
Location: 67,75
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
AttackWaypoint1: waypoint
|
||||||
|
Location: 52,55
|
||||||
|
Owner: Neutral
|
||||||
|
AttackWaypoint2: waypoint
|
||||||
|
Location: 80,83
|
||||||
|
Owner: Neutral
|
||||||
|
|
||||||
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
|
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ MSLO:
|
|||||||
|
|
||||||
E3:
|
E3:
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~tent
|
||||||
|
|
||||||
E4:
|
E4:
|
||||||
Buildable:
|
Buildable:
|
||||||
|
|||||||
@@ -15,6 +15,39 @@ EnemyBaseShroudTrigger = { CPos.New(64, 52), CPos.New(64, 53), CPos.New(64, 54),
|
|||||||
ParachuteTrigger = { CPos.New(80, 66), CPos.New(81, 66), CPos.New(82, 66), CPos.New(83, 66), CPos.New(84, 66), CPos.New(85, 66),CPos.New(86, 66), CPos.New(87, 66), CPos.New(88, 66), CPos.New(89, 66) }
|
ParachuteTrigger = { CPos.New(80, 66), CPos.New(81, 66), CPos.New(82, 66), CPos.New(83, 66), CPos.New(84, 66), CPos.New(85, 66),CPos.New(86, 66), CPos.New(87, 66), CPos.New(88, 66), CPos.New(89, 66) }
|
||||||
EnemyBaseEntranceShroudTrigger = { CPos.New(80, 73), CPos.New(81, 73), CPos.New(82, 73), CPos.New(83, 73), CPos.New(84, 73), CPos.New(85, 73),CPos.New(86, 73), CPos.New(87, 73), CPos.New(88, 73), CPos.New(89, 73) }
|
EnemyBaseEntranceShroudTrigger = { CPos.New(80, 73), CPos.New(81, 73), CPos.New(82, 73), CPos.New(83, 73), CPos.New(84, 73), CPos.New(85, 73),CPos.New(86, 73), CPos.New(87, 73), CPos.New(88, 73), CPos.New(89, 73) }
|
||||||
|
|
||||||
|
AttackWaypoints = { AttackWaypoint1, AttackWaypoint2 }
|
||||||
|
AttackGroup = { }
|
||||||
|
AttackGroupSize = 3
|
||||||
|
AlliedInfantry = { "e1", "e1", "e3" }
|
||||||
|
|
||||||
|
SendAttackGroup = function()
|
||||||
|
if #AttackGroup < AttackGroupSize then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local way = Utils.Random(AttackWaypoints)
|
||||||
|
Utils.Do(AttackGroup, function(unit)
|
||||||
|
if not unit.IsDead then
|
||||||
|
unit.AttackMove(way.Location)
|
||||||
|
Trigger.OnIdle(unit, unit.Hunt)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
AttackGroup = { }
|
||||||
|
end
|
||||||
|
|
||||||
|
ProduceInfantry = function()
|
||||||
|
if Tent.IsDead then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
enemy.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||||
|
table.insert(AttackGroup, units[1])
|
||||||
|
SendAttackGroup()
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(10), ProduceInfantry)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
SendUSSRParadrops = function()
|
SendUSSRParadrops = function()
|
||||||
paraproxy1 = Actor.Create("powerproxy.paratroopers", false, { Owner = player })
|
paraproxy1 = Actor.Create("powerproxy.paratroopers", false, { Owner = player })
|
||||||
paraproxy1.TargetParatroopers(ParachuteBaseEntrance.CenterPosition, Angle.North)
|
paraproxy1.TargetParatroopers(ParachuteBaseEntrance.CenterPosition, Angle.North)
|
||||||
@@ -163,6 +196,9 @@ WorldLoaded = function()
|
|||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective1 = player.AddPrimaryObjective("Protect the Command Center.")
|
sovietObjective1 = player.AddPrimaryObjective("Protect the Command Center.")
|
||||||
sovietObjective2 = player.AddPrimaryObjective("Destroy all Allied units and structures.")
|
sovietObjective2 = player.AddPrimaryObjective("Destroy all Allied units and structures.")
|
||||||
|
|
||||||
|
enemy.Resources = 2000
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
|
|||||||
Reference in New Issue
Block a user