-- Search & Destroy 1 (SD1)
-- Created by k776
-- http://qlwiki.linuxsolutions.co.nz/
-- Duration Time: Approx 60-90mins

----------------
-- Flag Notes --
----------------
-- Flag 1 is in progressive order apart from two numbers:
-- When set to 98, it automatically jumps to the mission failed text
-- When set to 99, it automatically jumps to the mission successful text

-- Flag 2 is used to determine whether any more Etros Bays exist or not
-- When set to 0, no Etros Bays exist, enemy dropships are damageable
-- When set to 1, Etros Bays exist, none attacked yet, enemy dropships are not damageable

-- Flag 3 is used to determine whether a player took too long to get rid of the enemy and this player 2 has entered to help
-- When set to 0, enemy wave arrives in 2 minutes
-- When set to 1, enemy wave arrives in 50 seconds

-- Flag 40 is used to determine whether the dropship has received much damage:
-- When set to 0, health is above 95%
-- When set to 1, health is below 95%
-- When set to 2, health is below 70%
-- When set to 3, health is below 50%
-- When set to 4, health is below 30%
-- When set to 5, health is critical
-- When health is back up over 95%, flag reset to 0

------------------
-- Player notes --
------------------
-- Player 1 is the person playing the level
-- Player 2 is the support if you took over eight minutes to get rid of the GSDS when Etros Bays were all gone
-- Player 5 is the 6 cloaks and etros bays, the turrets and enemy units
-- Player 6 is the giant omnithias, and two regular dropships
-- Player 7 is for checkpoints (only one in the game though)

**************** START PRE-GAME SCRIPTING ****************

clear resources from last level
total memory cleanup
set activeworld 1
resetworld 1

load basic configuration

set landpatch land01_allthings13
set landdeform off
set landheightmap heightmap_land01_allthings13

set minnewfogdistance 50000
set maxviewdistance 80000

--load media http://qlwiki.linuxsolutions.co.nz/files/searchanddestroy-loadingscreen.jpg slot1 searchanddestroy-loadingscreen
--replace loadingscreen searchanddestroy-loadingscreen
--remove loading logo

if highmodeldetail
    load resourcepack http://internallink1/ql_highres_modelspack.cct slot2 highres_models
end if
if lowmodeldetail
    load resourcepack http://internallink1/ql_lowres_modelspack.cct slot2 lowres_models
end if

if highterraindetail
    load resourcepack http://internallink2/ql_highresterrain_allthings13.cct slot3 highres_terrain
end if
if mediumterraindetail
    load resourcepack http://internallink2/ql_medresterrain_allthings13.cct slot3 medres_terrain
end if
if lowterraindetail
    load resourcepack http://internallink2/ql_lowresterrain_allthings13.cct slot3 lowres_terrain
end if

prepare landpatch

load texturepack http://internallink1/ql_mega_texturepack.cct slot4 textures

load resourcepack http://internallink1/ql_soundpack_computer.cct slot5 computer_speech
load resourcepack http://internallink1/ql_soundpack_unitvoices.cct slot6 unit_speech

load resourcepack http://internallink1/ql_musicpack1.cct slot10 music_pack1
load resourcepack http://internallink1/ql_musicpack2.cct slot11 music_pack2
if nonwebversion
    load resourcepack http://internallink1/ql_musicpack3.cct slot12 music_pack3
end if

copymodel omnithias superomnithias

new database entry
superomnithias
affect all temporal mods
fullname Globex Super Drop-Ship
price 15000
buildtime 180000
unitflagrequired 1
techlevel 0
unitscale 2.1
healthratio 6
modeltype 1
armor 12000
damage 80
speed1 500
speed2 60
speed3 0
initialstate 21
initialblend 100
cantarget [1,2,3,4,5,10]
canattack [1,2,3,4,5,10,50]
candeploy yes
unitflag [1]
unitflagstate [21]
canbuild 1 [21] ["payatos"]
canreceive 1
power +10000
gridtype -5
lifetime 0
sounds selected ["transport01_aselected1","transport01_aselected2"]
sounds move ["transport01_amove1","transport01_amove2"]
sounds deploy ["transport01_adeploy1"]
sounds indeployment ["machine01_01"]
sounds undeploy ["transport01_aundeploy1"]
deploydelay 2000
undeploydelay 2000
animationtype 2
animation 0 0 100 yes yes yes
animation 20 100 250 no no no
animation 22 250 400 no no no
animation 3 400 450 no no no
animation 700 450 550 no no no
healthanimation <=0 smoke_trail 120000
#end
process database

new tactical entry
superomnithias
@name DB:fullname /n /n @primary @function /n experimental unit replication /n /n @flaws /n extremely low speed, not fully operational /n /n @good @against /n all low and medium flying units /n /n @counter @with /n heavy offensive units /n /n #DETAILED #INFO /n /n @armor /n DB:armor /n /n @speed /n DB:speed1 kpq /n /n @primary @weapon /n high-damage twin laser beams /n /n @damage @yield /n DB:damage /n /n @unable @to @target /n high flying units /n /n @hover @distance /n high
#end
process tactical database

copyobject shadow~omnithias shadow~superomnithias

load basic variables

load basic models
load minimap

movemodel sky01 vector(0,0,30000)
movemodel sky02 vector(0,0,30000)

createmodel player17 resourcepod vector(76507,77619,1034) 168.9013 1.0000 [1]
createmodel player17 resourcepod vector(61753,19347,688) -161.7023 1.0000 [1]
createmodel player17 resourcepod vector(59416,101336,1520) 168.9013 1.0000 [1]
createmodel player17 resourcepod vector(48802,64918,2479) 168.9013 1.0000 [1]
createmodel player17 resourcepod vector(72617,49578,1424) 168.9013 1.0000 [1]
createmodel player17 resourcepod vector(19622,26479,780) 168.9013 1.0000 [1]
createmodel player17 resourcepod vector(95442,101,224) 168.9013 1.0000 [1]

if displayextramodels
    createmodel player16 s_tree01 vector(9740,7902,5020) 57.1897 5.2684 [1]
    createmodel player16 s_tree02 vector(11480,62702,256) 69.4551 6.3816 [1]
    createmodel player16 s_tree02 vector(11550,100785,2986) 30.7410 7.1919 [1]
    createmodel player16 s_tree02 vector(42258,146486,546) 160.0783 6.5111 [1]
    createmodel player16 s_tree01 vector(11974,188343,-242) -53.7787 11.9864 [1]
    createmodel player16 s_tree02 vector(92350,193563,4267) -96.9052 8.2696 [1]
    createmodel player16 s_tree01 vector(84525,135214,1003) -147.2982 6.5112 [1]
    createmodel player16 s_tree01 vector(93869,61092,2114) -177.2872 5.8495 [1]
end if

createmodel player6 superomnithias vector(61753,25347,3771) -161.7023 1.0000 [1]
createmodel player6 omnithias vector(59040,24075,2169) -161.7023 1.0000 [1]
createmodel player6 omnithias vector(64769,26232,2480) -161.7023 1.0000 [1]

createmodel player5 agomenmon vector(90659,54440,5911) -161.7023 1.0000 [1]
createmodel player5 agomenmon vector(115799,-16945,12951) -161.7023 1.0000 [1]
createmodel player5 agomenmon vector(26992,-611,7229) -161.7023 1.0000 [1]
createmodel player5 agomenmon vector(28895,48814,9311) -161.7023 1.0000 [1]
createmodel player5 agomenmon vector(87844,25222,10555) -161.7023 1.0000 [1]
createmodel player5 agomenmon vector(61267,-4492,7225) -161.7023 1.0000 [1]

positioncamera vector(5.91996e4,1.62018e4,-100.0000) vector(0.0000,0.0000,168.9013) vector(0.0000,-3.10000e4,7.07143e3) vector(0.0000,0.0000,0.0000)

clear startingunit
createmodel player1 epsilon vector(74029,78249,2059) -161.7023 1.0000 [1]

set maxplayers 1

**************** END PRE-GAME SCRIPTING ****************

**************** START IN-GAME SCRIPTING ****************

if timer 1 >= 0
    playercantarget 1 1 [1,5,6]
    settechlevel 1 1 [0,1,2,3,4,5,6,7,9,11]
    playercantarget 1 2 [5]
    playercantarget 1 5 [1,2]
    playercantarget 1 6 [1,2]
    setunitstate 1 6 1 21 0 -1
    setunitstate 1 6 2 21 0 -1
    setunitstate 1 6 3 21 0 -1
    setunitstate 1 5 1 93 0 -1
    setunitstate 1 5 2 93 0 -1
    setunitstate 1 5 3 93 0 -1
    setunitstate 1 5 4 93 0 -1
    setunitstate 1 5 5 93 0 -1
    setunitstate 1 5 6 93 0 -1
    cleartasks 1 1
    addtask 1 1 unknown_task pending primary standby and wait for instructions
    set flag 1 to 1
    set flag 2 to 1
    reset timer 1
    reset timer 2
    reset timer 3
end if

if gamedifficulty = easy
    setplayermoney 1 1 7000
    setmaxunits 1 1 20
end if
if gamedifficulty = medium
    setplayermoney 1 1 5000
    setmaxunits 1 1 17
end if
if gamedifficulty = hard
    setplayermoney 1 1 3000
    setmaxunits 1 1 14
end if

if flag 1 = 1
and timer 1 >= 100
and soundchannel 1 is free
    playglobalsound 1 99 computer030
    comsatline Computer: Battle control, online. rgb(255,255,0)
    set flag 1 to 2
    reset timer 1
end if

if flag 1 = 2
and timer 1 >= 5000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline ** Welcome to the Search & Destroy map. rgb(0,255,0)
    set flag 1 to 3
    reset timer 1
end if

if flag 1 = 3
and timer 1 >= 5000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander! Would you take a look at this. Its huge! Globex has been engineering this new super dropship for some time. But with the way things are now, HQ thought we should eliminate it before it becomes a threat. rgb(255,255,255)
    set flag 1 to 4
    reset timer 1
end if

if flag 1 = 4
and timer 1 >= 17000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: According to the reports from HQ, we have about forty minutes to destroy the dropship or else it will be completed and fully operational, and then we will never be able to stop it! rgb(255,255,255)
    set flag 1 to 5
    reset timer 1
end if

if flag 1 = 5
and timer 1 >= 17000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: A dropship just south of this position is at your disposal. I suggest we deploy it, and use it to make a couple of gamma cruisers to attack the ship as soon as possible. rgb(255,255,255)
    set flag 1 to 6
    reset timer 1
    reset timer 3
end if

if flag 1 = 6
and timer 1 >= 13000
and soundchannel 1 is free
    cleartasks 1 1
    addtask 1 1 defend_dropship pending primary protect your drop-ship at all costs
    addtask 1 1 destroy_dropships pending secondary establish a base, and destroy the Globex super dropship
    playglobalsound 1 99 computer011
    comsatline Computer: New task confirmed. rgb(255,255,0)
    highlighthud tasks
    set flag 1 to 7
    reset timer 1
end if

if flag 1 = 7
and timer 1 >= 1000
and playerhasunitcount 1 1 gammacruiser >= 2
and soundchannel 1 is free
    createunit 1 7 checkpoint01 vector(62521,32447,1254) 0 14 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Well done Commander. Now, move our Gamma Cruiser troops to the designated checkpoint and start attacking the dropships. rgb(255,255,255)
    set flag 1 to 8
    reset timer 1
end if

if flag 1 = 8
and timer 1 >= 1000
and distancebetween 1 7 1 1 1 any <= 4000
    setunitstate 1 7 1 69 0 -1
    set flag 1 to 9
    reset timer 1
end if

if flag 1 = 9
and timer 1 >= 1000
and unithealth 1 6 1 < 96%
and soundchannel 1 is free
    setunithealth 1 6 1 12000
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander. According to the ships sensors, the enemy dropships are healing themselves before we can make significant damage. Theres no way a dropship could be engineered to do that! I'll gather some more information and report back soon. rgb(255,255,255)
    set flag 1 to 10
    reset timer 1
end if
if flag 1 = 9
and timer 1 >= 1000
and unithealth 1 6 2 < 96%
and soundchannel 1 is free
    setunithealth 1 6 1 12000
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander. According to the ships sensors, the enemy dropships are healing themselves before we can make significant damage. Theres no way a dropship could be engineered to do that! I'll gather some more information and report back soon. rgb(255,255,255)
    set flag 1 to 10
    reset timer 1
end if
if flag 1 = 9
and timer 1 >= 1000
and unithealth 1 6 3 < 96%
and soundchannel 1 is free
    setunithealth 1 6 1 12000
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander. According to the ships sensors, the enemy dropships are healing themselves before we can make significant damage. Theres no way a dropship could be engineered to do that! I'll gather some more information and report back soon. rgb(255,255,255)
    set flag 1 to 10
    reset timer 1
end if

if flag 1 = 10
and timer 1 >= 45000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: I've got it Commander. Readings indicate six energy waves being fired at the dropships every five seconds. This can only mean one thing. Etros Bays. rgb(255,255,255)
    set flag 1 to 11
    reset timer 1
end if

if flag 1 = 11
and timer 1 >= 15000
and soundchannel 1 is free
    settechlevel 1 1 [0,1,2,3,4,5,6,7,9,11,12,13]
    playercantarget 1 1 [1,5]
    playercantarget 1 6 [2]
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Our best bet is to find and destroy all six Etros Bays. With them, the dropships will be impossible to destroy. Pull our troops back to base and deploy some BC-45's as soon as possible to find the cloaked Etros bays. rgb(255,255,255)
    set flag 1 to 12
    reset timer 1
end if

if flag 1 = 12
and timer 1 >= 15000
and soundchannel 1 is free
    setunitstate 1 5 1 21 0 -1
    createunit 1 5 etros vector(88704,53471,4475) 0 82 0 -1 0 [1]
    setai 1 5 1 100
    addtask 1 1 destroy_etros pending secondary find and destroy all etros bays in this sector
    playglobalsound 1 99 computer011
    comsatline Computer: New task confirmed. rgb(255,255,0)
    highlighthud tasks
    set flag 1 to 13
    reset timer 1
end if

if flag 1 = 13
and timer 1 >= 1000
and playerhasunit 1 1 bc45
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Great job Commander. Now all we have to do is wait for it to find a cloak. In the mean time, build up offensive units, incase we encounter resistance. rgb(255,255,255)
    set flag 1 to 14
    reset timer 1
end if

if flag 1 = 14
and unitstate 1 5 1 = 3
    radarbeacon 1 vector(88704,53471,4475) 10000
    set flag 1 to 15
end if

if flag 1 = 15
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: The BC-45 has found a cloaked Etros Bay Commander. All units, attack! rgb(255,255,255)
    set flag 1 to 16
    reset timer 1
end if

if flag 1 = 16
and playerhasunitcount 1 5 etros = 0
and soundchannel 1 is free
    setunitstate 1 5 2 21 0 -1
    setunitstate 1 5 3 21 0 -1
    setunitstate 1 5 4 21 0 -1
    setunitstate 1 5 5 21 0 -1
    setunitstate 1 5 6 21 0 -1
    createunit 1 5 etros vector(90148,25557,9058) 0 82 0 -1 0 [1]
    createunit 1 5 etros vector(116936,-16682,11185) 0 82 0 -1 0 [1]
    createunit 1 5 etros vector(29278,92,6173) 0 82 0 -1 0 [1]
    createunit 1 5 etros vector(31122,48882,7982) 0 82 0 -1 0 [1]
    createunit 1 5 etros vector(63644,-3730,6003) 0 82 0 -1 0 [1]
    setai 1 5 1 100
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Great job Commander. We got rid of one. We still have five to go though. Find and destroy the remaining Etros bays. rgb(255,255,255)
    set flag 1 to 17
    reset timer 1
end if

if flag 1 = 17
and timer 1 >= 10000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Use caution though Commander. The Globex will no doubt try to protect the Etros Bays by sending reinforcements. Get ready for a battle. rgb(255,255,255)
    set flag 1 to 18
    reset timer 1
end if

if flag 1 = 18
and timer 1 >= 10000
and playerhasnounit 1 1 bc45
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander, it seems we have lost our BC-45. No worries. Build a new one as soon as you can. We dont have long until the Super Dropship is complete. rgb(255,255,255)
    set flag 1 to 19
    reset timer 1
end if
if flag 1 = 18
and timer 1 >= 9000
and playerhasunit 1 1 bc45
    set flag 1 to 19
    reset timer 1
end if

if flag 1 = 19
and unitstate 1 5 2 = 3
and gamedifficulty = easy
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(119795,-13694,10907) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(115658,-14950,11379) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 3 = 3
and gamedifficulty = easy
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(32037,2758,6177) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(32377,4504,5951) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 4 = 3
and gamedifficulty = easy
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(33660,44016,7254) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(31158,52213,8389) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 5 = 3
and gamedifficulty = easy
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(92321,28181,9334) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(91565,22096,9187) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 6 = 3
and gamedifficulty = easy
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(68325,-5109,6408) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63212,-1155,5844) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 2 = 3
and gamedifficulty = medium
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(119795,-13694,10907) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(118520,-13063,11094) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(117278,-12712,11133) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(115658,-14950,11379) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(114405,-14891,11167) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(113196,-14786,10620) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 3 = 3
and gamedifficulty = medium
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(32037,2758,6177) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(30742,2749,6030) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(29479,2922,5862) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(32377,4504,5951) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(31139,4830,5888) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(29866,4938,5723) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 4 = 3
and gamedifficulty = medium
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(33660,44016,7254) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(32402,44300,7325) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(31205,44495,7336) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(31158,52213,8389) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(30001,52798,8648) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(28824,53146,8882) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 5 = 3
and gamedifficulty = medium
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(92321,28181,9334) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90968,28478,9267) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(89634,28723,9205) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(91565,22096,9187) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(90212,22080,9233) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(88741,21838,9268) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 6 = 3
and gamedifficulty = medium
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(68325,-5109,6408) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(67602,-3348,6360) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(66895,-2045,6281) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63212,-1155,5844) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(61994,-981,5756) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(60724,-971,5531) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 2 = 3
and gamedifficulty = hard
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(119795,-13694,10907) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(118520,-13063,11094) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(117278,-12712,11133) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(115918,-12589,10997) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(114721,-12187,10810) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(115658,-14950,11379) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(114405,-14891,11167) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(113196,-14786,10620) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(116643,-13805,11236) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(113602,-13264,10618) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 3 = 3
and gamedifficulty = hard
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(32037,2758,6177) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(30742,2749,6030) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(29479,2922,5862) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(28128,2899,5696) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(26834,2994,5529) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(32377,4504,5951) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(31139,4830,5888) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(29866,4938,5723) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(28488,4909,5554) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(27192,5022,5352) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 4 = 3
and gamedifficulty = hard
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(33660,44016,7254) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(32402,44300,7325) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(31205,44495,7336) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(30013,44729,7336) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(28697,45307,7501) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(31158,52213,8389) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(30001,52798,8648) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(28824,53146,8882) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(30044,50744,8394) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(28879,51160,8610) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 5 = 3
and gamedifficulty = hard
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(92321,28181,9334) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90968,28478,9267) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(89634,28723,9205) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(88233,28974,9134) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(86758,28953,8806) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(91565,22096,9187) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(90212,22080,9233) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(88741,21838,9268) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(87482,22738,9377) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(86167,23331,9466) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and unitstate 1 5 6 = 3
and gamedifficulty = hard
and soundchannel 1 is free
    createunit 1 5 bowgerus vector(68325,-5109,6408) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(67602,-3348,6360) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(66895,-2045,6281) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(66118,-925,6104) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(65339,277,5897) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63212,-1155,5844) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(61994,-981,5756) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(60724,-971,5531) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(62870,470,5589) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(61635,374,5300) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
end if
if flag 1 = 19
and playerhasunitcount 1 5 etros <= 4
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Well done Commander. You've have gotten rid of 2 of the Etros bays. Keep it up. rgb(255,255,255)
end if
if flag 1 = 19
and playerhasunitcount 1 5 etros <= 2
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Almost there Commander. Only two more to go. Keep up the good work. rgb(255,255,255)
end if
if flag 1 = 19
and playerhasnounit 1 5 etros
and soundchannel 1 is free
    changetask 1 1 destroy_etros complete
    highlighthud tasks
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Congratulations Commander. You did it. You got rid of all the Etros bays. rgb(255,255,255)
    set flag 1 to 20
    reset timer 1
end if

if flag 1 = 20
and timer 1 >= 12000
and soundchannel 1 is free
    dropcam 1 6 1 9000 2
    playglobalsound 3 99 threebeeps01
    comsatline >> [Globex Colonel]: How DARE YOU destroy our structures!!! Prepare to face ultimate doom!! rgb(192,192,192)
    set flag 1 to 21
    set flag 2 to 0
    reset timer 1
end if

if flag 1 = 21
and timer 1 >= 8000
and gamedifficulty = easy
and soundchannel 1 is free
    playercantarget 1 1 [1,5,6]
    playercantarget 1 6 [1,2]
    createunit 1 5 tryphon vector(58149,29704,1258) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(59725,30780,1324) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(65058,29854,1456) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(63442,28711,1529) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(62176,29610,1511) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(60616,29647,1462) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Now Commander!! Destroy the dropships and all other units before they can contact others and get backup! You have about three minutes. rgb(255,255,255)
    set flag 1 to 22
    reset timer 1
end if
if flag 1 = 21
and timer 1 >= 8000
and gamedifficulty = medium
and soundchannel 1 is free
    playercantarget 1 1 [1,5,6]
    playercantarget 1 6 [1,2]
    createunit 1 5 tryphon vector(58149,29704,1258) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(59725,30780,1324) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(65058,29854,1456) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63660,30949,1438) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(61897,31530,1396) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(63442,28711,1529) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(62176,29610,1511) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(60616,29647,1462) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58936,28500,1391) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(57155,27578,1326) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(56009,24157,2073) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Now Commander!! Destroy the dropships and all other units before they can contact others and get backup! You have about three minutes. rgb(255,255,255)
    set flag 1 to 22
    reset timer 1
end if
if flag 1 = 21
and timer 1 >= 8000
and gamedifficulty = hard
and soundchannel 1 is free
    playercantarget 1 1 [1,5,6]
    playercantarget 1 6 [1,2]
    createunit 1 5 tryphon vector(58149,29704,1258) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(59725,30780,1324) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(65058,29854,1456) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63660,30949,1438) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(61897,31530,1396) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58969,31853,1355) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(60717,32405,1395) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(64829,31724,1495) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(63588,32595,1477) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(62188,33123,1448) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(63442,28711,1529) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(62176,29610,1511) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(60616,29647,1462) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58936,28500,1391) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(57155,27578,1326) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(64648,27385,1557) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56909,29928,1392) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(65984,27766,1607) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(56009,24157,2073) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(55086,27192,2192) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Now Commander!! Destroy the dropships and all other units before they can contact others and get backup! You have about three minutes. rgb(255,255,255)
    set flag 1 to 22
    reset timer 1
end if

if flag 1 = 22
and timer 1 >= 10000
and timer 1 < 180000
and totalplayerunits 1 5 <= 0
and totalplayerunits 1 6 <= 0
and soundchannel 1 is free
    changetask 1 1 destroy_dropships complete
    highlighthud tasks
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Success Commander. You successfully destroyed the dropships and the other units before they were able to call for backup. rgb(255,255,255)
    set flag 1 to 37
    reset timer 1
end if
if flag 1 = 22
and timer 1 >= 180000
and timer 1 < 480000
and totalplayerunits 1 5 <= 0
and totalplayerunits 1 6 <= 0
and soundchannel 1 is free
    changetask 1 1 destroy_dropships complete
    highlighthud tasks
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Oh no Commander. You successfully destroyed the enemy, but not in time. They called for backup. A huge army is approaching our position as I speak and will be here in a five minutes. Quick! Gather our forces to defend our dropship! rgb(255,255,255)
    set flag 1 to 23
    reset timer 1
end if
if flag 1 = 22
and timer 1 >= 480000
and totalplayerunits 1 5 <= 0
and totalplayerunits 1 6 <= 0
and soundchannel 1 is free
    changetask 1 1 destroy_dropships complete
    highlighthud tasks
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: WHY Commander?!? You took over eight minutes to destroy the enemy. They had plenty of time to call for backup. A huge army is approaching our position as I speak and will be here in just over a minute. rgb(255,255,255)
    set flag 1 to 23
    set flag 3 to 1
    reset timer 1
end if

if flag 1 = 23
and flag 3 = 0
and timer 1 >= 300000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Here they come Commander. You should have had enough time to get our troops together. rgb(255,255,255)
    set flag 1 to 27
    reset timer 1
end if
if flag 1 = 23
and flag 3 = 1
and timer 1 >= 15000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Thankfully for you, I also called for backup. Lt Col. Tyler and his crew should be here any minute to assist us. rgb(255,255,255)
    set flag 1 to 24
    reset timer 1
end if

if flag 1 = 24
and flag 3 = 1
and timer 1 >= 30000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Lt Col. Tyler: I'm here. Sorry for the delay. We encountered some troops just north of this position. rgb(170,200,184)
    set flag 1 to 25
    reset timer 1
end if

if flag 1 = 25
and flag 3 = 1
and timer 1 >= 7000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: No problem Tyler. Set down your dropship and make some troops. They'll be here any moment. rgb(255,255,255)
    set flag 1 to 26
    reset timer 1
end if

if flag 1 = 26
and flag 3 = 1
and timer 1 >= 7000
    createunit 1 2 epsilon vector(60411,86432,2496) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(61868,87138,2189) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(62864,87482,2176) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(63860,87827,2162) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(58684,86138,2208) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(57621,85854,2212) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(56449,85462,2217) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(56115,88393,2102) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(57307,88755,2127) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(61465,90032,2141) 0 82 0 -1 0 [1]
    createunit 1 2 gammacruiser vector(62587,90261,2129) 0 82 0 -1 0 [1]
    set flag 1 to 27
    reset timer 1
end if

if flag 1 = 27
and flag 3 = 0
and gamedifficulty = easy
and soundchannel 1 is free
    --army 1--
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    setai 1 2 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 31
    reset timer 1
end if
if flag 1 = 27
and flag 3 = 0
and gamedifficulty = medium
and soundchannel 1 is free
    --army 1--
    createunit 1 5 omnithias vector(23740,72858,3353) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(22523,74634,2334) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(21455,76096,2050) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(75773,93595,1309) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72964,94387,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(73994,95837,1341) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(74971,97407,1312) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 omnithias vector(57807,17876,1768) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(55659,20565,990) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(53850,19740,886) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(57502,22747,1080) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(91792,-29500,3079) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90511,-26994,2009) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(88868,-26925,2088) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(89482,-24653,1758) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(94934,-25777,1566) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    setai 1 2 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 31
    reset timer 1
end if
if flag 1 = 27
and flag 3 = 0
and gamedifficulty = hard
and soundchannel 1 is free
    --army 1--
    createunit 1 5 omnithias vector(23740,72858,3353) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(22523,74634,2334) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(20889,73569,2058) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(26242,72583,2598) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(21455,76096,2050) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(75773,93595,1309) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72964,94387,1331) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(74314,93949,1323) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(73994,95837,1341) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(74971,97407,1312) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(73625,97682,1327) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 omnithias vector(57807,17876,1768) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(55331,18304,1784) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(55659,20565,990) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(53850,19740,886) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(54400,22305,1027) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(60182,21113,1128) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(57502,22747,1080) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(56053,23131,1040) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(91792,-29500,3079) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(89494,-28802,3176) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90511,-26994,2009) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(88868,-26925,2088) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(87465,-28088,2286) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96579,-31652,1579) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(87838,-25381,1981) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(97176,-28899,1421) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(89482,-24653,1758) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(94934,-25777,1566) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(91109,-24789,1686) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(93146,-25175,1634) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    setai 1 5 1 100
    setai 1 2 1 100
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 31
    reset timer 1
end if
if flag 1 = 27
and flag 3 = 1
and timer 1 >= 15000
and gamedifficulty = easy
and soundchannel 1 is free
    --army 1--
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    createunit 1 5 milanos vector(54782,14263,269) 0 82 0 -1 0 [1]
    createunit 1 5 dampener vector(56926,13929,355) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 28
    reset timer 1
end if
if flag 1 = 27
and flag 3 = 1
and timer 1 >= 15000
and gamedifficulty = medium
and soundchannel 1 is free
    --army 1--
    createunit 1 5 omnithias vector(23740,72858,3353) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(22523,74634,2334) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(21455,76096,2050) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(75773,93595,1309) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72964,94387,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(73994,95837,1341) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(74971,97407,1312) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 omnithias vector(57807,17876,1768) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(55659,20565,990) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(53850,19740,886) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(57502,22747,1080) 0 82 0 -1 0 [1]
    createunit 1 5 milanos vector(54782,14263,269) 0 82 0 -1 0 [1]
    createunit 1 5 dampener vector(56926,13929,355) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(91792,-29500,3079) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90511,-26994,2009) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(88868,-26925,2088) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(89482,-24653,1758) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(94934,-25777,1566) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 28
    reset timer 1
end if
if flag 1 = 27
and flag 3 = 1
and timer 1 >= 15000
and gamedifficulty = hard
and soundchannel 1 is free
    --army 1--
    createunit 1 5 omnithias vector(23740,72858,3353) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(25419,74525,2728) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(24035,75090,2600) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(22523,74634,2334) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(20889,73569,2058) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(26242,72583,2598) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(26932,75316,2677) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(21455,76096,2050) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 2--
    createunit 1 5 forsydon vector(76559,95006,1232) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72717,96049,1263) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(75773,93595,1309) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(72964,94387,1331) 0 82 0 -1 0 [1]
    createunit 1 5 forsydon vector(74314,93949,1323) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(75361,95456,1331) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(73994,95837,1341) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(76312,97099,1319) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(74971,97407,1312) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(73625,97682,1327) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 3--
    createunit 1 5 omnithias vector(57807,17876,1768) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(55331,18304,1784) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(59781,18590,903) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(58374,20040,1000) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(56977,20383,1002) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(55659,20565,990) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(53850,19740,886) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(54400,22305,1027) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(60182,21113,1128) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(58801,22395,1123) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(57502,22747,1080) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(56053,23131,1040) 0 82 0 -1 0 [1]
    createunit 1 5 milanos vector(54782,14263,269) 0 82 0 -1 0 [1]
    createunit 1 5 dampener vector(56926,13929,355) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    --army 4--
    createunit 1 5 omnithias vector(94192,-30597,2570) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(91792,-29500,3079) 0 82 0 -1 0 [1]
    createunit 1 5 omnithias vector(89494,-28802,3176) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96069,-29510,1484) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(94577,-28248,1692) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(93281,-27618,1930) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(91862,-27357,1978) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(90511,-26994,2009) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(88868,-26925,2088) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(87465,-28088,2286) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(96579,-31652,1579) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(87838,-25381,1981) 0 82 0 -1 0 [1]
    createunit 1 5 bowgerus vector(97176,-28899,1421) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(96333,-26964,1344) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(89482,-24653,1758) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(94934,-25777,1566) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(91109,-24789,1686) 0 82 0 -1 0 [1]
    createunit 1 5 tryphon vector(93146,-25175,1634) 0 82 0 -1 0 [1]
    radarbeacon 1 lastvector 10000
    playglobalsound 1 99 computer018
    comsatline Computer: New threat detected. rgb(255,255,0)
    set flag 1 to 28
    reset timer 1
end if

if flag 1 = 28
and flag 3 = 1
and timer 1 >= 10000
and soundchannel 1 is free
    dropcam 1 2 1 9000 3
    playglobalsound 3 99 threebeeps01
    comsatline >> Lt Col. Tyler: Wow. There's more than I thought. On yo...we'l...ike............ rgb(170,200,184)
    set flag 1 to 29
    reset timer 1
end if

if flag 1 = 29
and flag 3 = 1
and timer 1 >= 10000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Tyler?!? ......... Commander. The enemy has setup a dampener cutting off contact to Lt Col. Tyler. I suggest we destroy it as soon as possible. Brace yourself for the attack and be sure to protect Tyler's dropship! rgb(255,255,255)
    set flag 1 to 30
    reset timer 1
end if

if flag 1 = 30
and timer 1 >= 17000
and soundchannel 1 is free
    addtask 1 1 defend_tyler pending optional make sure Lt Col. Tyler's dropship is not destroyed
    playglobalsound 1 99 computer011
    comsatline Computer: New task confirmed. rgb(255,255,0)
    highlighthud tasks
    set flag 1 to 31
    setai 1 5 1 100
    setai 1 2 1 100
    reset timer 1
    reset timer 4
end if

if flag 1 = 31
and unithealth 1 1 1 <= 0%
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: You did a good job in destroying the Etros Bays and dropships Commander. But you can't win them all, The dropship was destroyed by the army. Let's get out of here and report back to HQ. rgb(255,255,255)
    set flag 1 to 98
    reset timer 1
end if
if flag 1 = 31
and flag 3 = 0
and timer 1 >= 10000
and totalplayerunits 1 5 <= 0
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Bravo Commander! You successfully found and destroyed all Etros Bays, got rid of that giant Super Dropship, and defended our dropship against an enemy attack. rgb(255,255,255)
    set flag 1 to 37
    reset timer 1
end if
if flag 1 = 31
and flag 3 = 1
and totalplayerunits 1 5 <= 0
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Tyler? Can you here me? rgb(255,255,255)
    set flag 1 to 32
    reset timer 1
end if

if flag 1 = 32
and flag 3 = 1
and timer 1 >= 10000
and playerhasnounit 1 2 epsilon
and soundchannel 1 is free
    changetask 1 1 defend_tyler failed
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander. It seems that Lt Col. Tyler was killed in action. This is a sad day for the Free Trade Alliance. rgb(255,255,255)
    highlighthud tasks
    set flag 1 to 38
    reset timer 1
end if
if flag 1 = 32
and flag 3 = 1
and timer 1 >= 10000
and playerhasunit 1 2 epsilon
and soundchannel 1 is free
    dropcam 1 2 1 35000 3
    playglobalsound 3 99 threebeeps01
    comsatline >> Lt Col. Tyler: Affirmative. All crew alive and well. And it looks like we got rid of the enemy Sir. rgb(170,200,184)
    set flag 1 to 33
    reset timer 1
end if

if flag 1 = 33
and flag 3 = 1
and timer 1 >= 9000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: It would appear that way. Thank you for your help Tyler. rgb(255,255,255)
    set flag 1 to 34
    reset timer 1
end if

if flag 1 = 34
and flag 3 = 1
and timer 1 >= 7000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Lt Col. Tyler: No problem Sir. It was an honor to work with you. But I must go. I've just received new assignments from HQ. rgb(170,200,184)
    set flag 1 to 35
    reset timer 1
end if

if flag 1 = 35
and flag 3 = 1
and timer 1 >= 12000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: All right. Thanks again. rgb(255,255,255)
    set flag 1 to 37
    reset timer 1
end if

--if flag 1 = 36
--and flag 3 = 1
--and timer 1 >= 5000
--and soundchannel 1 is free
--    changetask 1 1 defend_tyler complete
--    highlighthud tasks
--    setunitstate 1 2 all 69 -1 -1
--    set flag 1 to 37
--    reset timer 1
--end if

if flag 1 = 37
and timer 1 >= 14000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: You did extremely well today Commander and I'll be sure to mention your success to the General the next time I see him. rgb(255,255,255)
    set flag 1 to 38
    reset timer 1
end if

if flag 1 = 38
and timer 1 >= 12000
and soundchannel 1 is free
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Our job here is done Commander. Let's get back to HQ. rgb(255,255,255)
    set flag 1 to 99
    reset timer 1
end if

if flag 1 = 98
and timer 1 >= 18000
and soundchannel 1 is free
    changetask 1 1 defend_dropship failed
    playglobalsound 1 99 computer015
    comsatline Computer: Mission failed. rgb(255,255,0)
    highlighthud tasks
    comsatline ** Mission FAILED. Press "Menu" and "Exit" when ready. rgb(0,255,0)
end if

if flag 1 = 99
and timer 1 >= 8000
and soundchannel 1 is free
    changetask 1 1 defend_dropship complete
    playglobalsound 1 99 computer016
    comsatline Computer: Mission successful. rgb(255,255,0)
    highlighthud tasks
end if

if unithealth 1 1 1 <= 0%
and playerhasunit 1 5 etros
and soundchannel 1 is free
    changetask 1 1 destroy_dropships failed
    changetask 1 1 destroy_etros failed
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: How did you manage to loose the dropship Commander? You were given a simple task and you failed to complete it. I'll make sure you never command again! You're a joke! rgb(255,255,255)
    set flag 1 to 98
    reset timer 1
end if

if unithealth 1 1 1 <= 0%
and playerhasnounit 1 5 etros
and soundchannel 1 is free
    changetask 1 1 destroy_dropships failed
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: The Super dropship turned out to be better than we estimated. Fear not Commander. HQ will be able to send another fleet to destroy them. But I think its time you sat down and considered retirement! rgb(255,255,255)
    set flag 1 to 98
    reset timer 1
end if

if timer 3 >= 3600000
and unithealth 1 6 1 > 0%
and playerhasunit 1 5 etros
and soundchannel 1 is free
    changetask 1 1 destroy_dropships failed
    changetask 1 1 destroy_etros failed
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander, you weren't fast enough in destroying the Etros Bays that were healing the super dropship. The Globex Super Dropship has now been completed and is fully operational. Theres no stopping it now. rgb(255,255,255)
    set flag 1 to 98
    set flag 2 to 1
    reset timer 1
end if

if timer 3 >= 3600000
and unithealth 1 6 1 > 0%
and playerhasnounit 1 5 etros
and soundchannel 1 is free
    changetask 1 1 destroy_dropships failed
    playglobalsound 3 99 threebeeps01
    comsatline >> Col. Blair: Commander, you were too late. You managed to destroy the Etros Bays, but didn't have enough time to get rid of the dropship afterwards. The Globex Super Dropship has now been completed and is fully operational. Theres no stopping it now. rgb(255,255,255)
    set flag 1 to 98
    set flag 2 to 1
    reset timer 1
end if

if flag 1 >= 30
and flag 3 = 1
and timer 4 >= 60000
and playerhasunit 1 2 epsilon
and totalplayerunits 1 5 > 0
    createunit 1 2 gammacruiser vector(59133,90347,2243) 0 82 0 -1 0 [1]
    setai 1 2 1 100
    reset timer 4
    repeat this if
end if

if flag 2 = 1
and timer 2 >= 5000
and unithealth 1 6 1 < 95%
    setunitstate 1 6 1 21 0 12000
    reset timer 2
    repeat this if
end if
if flag 2 = 1
and timer 2 >= 5000
and unithealth 1 6 2 < 95%
    setunitstate 1 6 2 21 0 3000
    reset timer 2
    repeat this if
end if
if flag 2 = 1
and timer 2 >= 5000
and unithealth 1 6 3 < 95%
    setunitstate 1 6 3 21 0 3000
    reset timer 2
    repeat this if
end if

**************** START IN-GAME MUSIC ****************

if soundchannel 8 is free
    addmusic ql_track_6a
    addmusic ql_track_9a
    addmusic ql_track_10a
    addmusic ql_track_8c
    addmusic ql_track_6c
    addmusic ql_track_10b
    addmusic ql_track_9b
    addmusic ql_track_12b
    addmusic ql_track_11b
    addmusic ql_track_8a
    addmusic ql_track_6b
    addmusic ql_track_10c
    addmusic ql_track_12a
    addmusic ql_track_8b
    addmusic ql_track_11a
    pause between tracks 10000
end if

**************** END IN-GAME MUSIC ****************

**************** START IN-GAME COMPUTER VOICES ****************

if timer 39 >= 0
    reset timer 39
end if

if timer 40 >= 0
    reset timer 40
end if

if unitstate 1 1 1 < 80
and timer 39 >= 180000
and playerpower < 200
and playerpower > 0
and soundchannel 1 is free
    playglobalsound 2 99 computer025
    comsatline Computer: Low Power. rgb(255,255,0)
    highlighthud power
    reset timer 39
    repeat this if
end if

if unitstate 1 1 1 < 80
and timer 40 >= 60000
and playerpower <= 0
and soundchannel 1 is free
    playglobalsound 2 99 computer026
    comsatline Computer: New generators required. rgb(255,255,0)
    highlighthud power
    reset timer 40
    repeat this if
end if

if unitstate 1 1 1 < 80
and unithealth 1 1 1 >= 95%
    set flag 40 to 0
    repeat this if
end if

if flag 40 = 0
and unitstate 1 1 1 < 80
and unithealth 1 1 1 < 95%
    set flag 40 to 1
    repeat this if
end if

if flag 40 = 1
and unitstate 1 1 1 < 80
and unithealth 1 1 1 < 95%
and soundchannel 1 is free
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    set flag 40 to 2
    repeat this if
end if

if flag 40 = 2
and unitstate 1 1 1 < 80
and unithealth 1 1 1 < 70%
and soundchannel 1 is free
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    set flag 40 to 3
    repeat this if
end if

if flag 40 = 3
and unitstate 1 1 1 < 80
and unithealth 1 1 1 < 50%
and soundchannel 1 is free
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    set flag 40 to 4
    repeat this if
end if

if flag 40 = 4
and unitstate 1 1 1 < 80
and unithealth 1 1 1 < 30%
and soundchannel 1 is free
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    set flag 40 to 5
    repeat this if
end if

**************** END IN-GAME COMPUTER VOICES ****************

**************** END IN-GAME SCRIPTING ****************