Skip to content

Commit

Permalink
[FIXED] Refactored the mission script to respawn the correct amount o…
Browse files Browse the repository at this point in the history
…f units per group.
  • Loading branch information
srogers909 committed Oct 10, 2021
1 parent f30bd5c commit 42e578e
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 12 deletions.
Binary file modified OVERLOAD-Caucasus.miz
Binary file not shown.
85 changes: 73 additions & 12 deletions overload-mission.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,79 @@
enemyPlanes = {'Z1_MIG29_1', 'Z1_MIG21_1',
'Z2_SU27_1', 'Z3_MIG29_1', 'Z3_SU27_1', 'Z4_SU27_2', 'Z4_SU27_1', 'Z5_MIG29_1', 'Z5_SU33_1'}

for i, v in ipairs(enemyPlanes) do
SPAWN:New(v)
-- Zone 1 (Z1) Defenses
SPAWN:New('Z1_MIG29_1')
:InitKeepUnitNames(false)
:InitLimit(9, 1800)
:InitLimit(2, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:OnSpawnGroup(
function(group)
trigger.action
.outText('Group (' .. group.GroupName .. ') with skill level: ' .. group:GetSkill() .. ' has spawned.', 10)
end
)
:SpawnScheduled(600, .3)
end


SPAWN:New('Z1_MIG21_1')
:InitKeepUnitNames(false)
:InitLimit(3, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

-- Zone 2 (Z2) Defenses
SPAWN:New('Z2_SU27_1')
:InitKeepUnitNames(false)
:InitLimit(2, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

-- Zone 3 (Z3) Defenses
SPAWN:New('Z3_MIG29_1')
:InitKeepUnitNames(false)
:InitLimit(4, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

SPAWN:New('Z3_SU27_1')
:InitKeepUnitNames(false)
:InitLimit(1, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

-- Zone 4 (Z4) Defenses
SPAWN:New('Z4_SU27_2')
:InitKeepUnitNames(false)
:InitLimit(2, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

SPAWN:New('Z4_SU27_1')
:InitKeepUnitNames(false)
:InitLimit(3, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)


-- Zone 5 (Z5) Defenses
SPAWN:New('Z5_MIG29_1')
:InitKeepUnitNames(false)
:InitLimit(3, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

SPAWN:New('Z5_SU33_1')
:InitKeepUnitNames(false)
:InitLimit(4, 500)
:InitDelayOff()
:InitSkill("Random")
:InitRepeatOnLanding()
:SpawnScheduled(600, .3)

0 comments on commit 42e578e

Please sign in to comment.