-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Refactored the mission script to respawn the correct amount o…
…f units per group.
- Loading branch information
1 parent
f30bd5c
commit 42e578e
Showing
2 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |