Add paratroopers to Fort Lonestar
This commit is contained in:
@@ -11,6 +11,8 @@ ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
|
|||||||
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
|
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
|
||||||
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
|
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
|
||||||
|
|
||||||
|
ParaChance = 30
|
||||||
|
|
||||||
Wave = 0
|
Wave = 0
|
||||||
Waves =
|
Waves =
|
||||||
{
|
{
|
||||||
@@ -56,7 +58,21 @@ SendWave = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
if (Wave < #Waves) then
|
if (Wave < #Waves) then
|
||||||
SendWave()
|
if Utils.RandomInteger(1, 100) < ParaChance then
|
||||||
|
local units = ParaProxy.SendParatroopers(Utils.Random(ParadropWaypoints).CenterPosition)
|
||||||
|
Utils.Do(units, function(unit)
|
||||||
|
Trigger.OnIdle(unit, function(a)
|
||||||
|
if a.IsInWorld then
|
||||||
|
a.Hunt()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
local delay = Utils.RandomInteger(DateTime.Seconds(20), DateTime.Seconds(45))
|
||||||
|
Trigger.AfterDelay(delay, SendWave)
|
||||||
|
else
|
||||||
|
SendWave()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating)
|
Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating)
|
||||||
Media.DisplayMessage("You almost survived the onslaught! No more waves incoming.")
|
Media.DisplayMessage("You almost survived the onslaught! No more waves incoming.")
|
||||||
@@ -95,5 +111,6 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
Media.DisplayMessage("Defend Fort Lonestar at all costs!")
|
Media.DisplayMessage("Defend Fort Lonestar at all costs!")
|
||||||
|
|
||||||
|
ParaProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = soviets })
|
||||||
SendWave()
|
SendWave()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -714,6 +714,9 @@ Rules:
|
|||||||
Actor: MIG.Husk
|
Actor: MIG.Husk
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
Image: mig
|
Image: mig
|
||||||
|
powerproxy.paratroopers:
|
||||||
|
ParatroopersPower:
|
||||||
|
DropItems: E1,E1,E1,E1,E2,E2
|
||||||
SILO:
|
SILO:
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user