--Quantum World - 297
--aka first level of Fatal Cause 3.1

--NOTICE: in the story of QL, this level is referred to as "Sector 297"
--(despite that the internal script name still says txtSec296)

if timer 1 >= 0
    set ambientlight rgb(255,162,1)
    set light rgb(255,0,0)
    reset timer 4
    reset timer 5
    playercantarget 1 1 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 2 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 3 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 4 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 5 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 6 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 7 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    playercantarget 1 8 [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
--AI enemy players, who will attack non-host units:
    playercantarget 1 9 [2,3,4,5,6,7,8]
    playercantarget 1 10 [2,3,4,5,6,7,8]
--    playercantarget 1 9 [9,5]
--    playercantarget 1 10 [2,6]
    playercantarget 1 11 [3,7]
    playercantarget 1 12 [4,8]
    setmaxunits 1 1 27
    setmaxunits 1 2 27
    setmaxunits 1 3 27
    setmaxunits 1 4 27
    setmaxunits 1 5 27
    setmaxunits 1 6 27
    setmaxunits 1 7 27
    setmaxunits 1 8 27
--make sure the Centuras cruisers attack everyone:
    setai 1 9 1 100
    setai 1 10 1 100
--below: hide the tactical window (the user should know how to use it by now)
    hide tactical
    settechlevel 1 1 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 2 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 3 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 4 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 5 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 6 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 7 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
    settechlevel 1 8 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18]
end if

if timer 4 >= 60000*10
    playglobalsound 5 99 twobeeps01
    comsatline Computer: This is a Quantum World map. It will automatically restart every 60 minutes. When this happens, you will need to re-join the game server if you wish to continue playing. rgb(255,255,0)
--    radarbeacon 1 vector(198908,-5150,623) 60000
--    radarbeacon 1 vector(8789,195727,2888) 60000
    reset timer 4
    repeat this if
end if

if playernumber = 1
and timer 5 >= 60000*60
    --restart the level:
    reset timer 5
    setnewlevelname Quantum World - 297
    setnewlevelscript http://quantumlegacy.net/sdk/scripts/qworld297.txt
    loadnewlevel
end if

clear resources from last level

*****     BELOW: BETA TESTER and MOD user test     *****
*****     BELOW: BETA TESTER and MOD user test     *****
if timer 1 >= 0
    settechlevel 1 1 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 2 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 3 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 4 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 5 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 6 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 7 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
    settechlevel 1 8 [0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,17,18,19,20]
end if

if theBetaTesterList.findpos(sPlayer1Name) = 0
and theModList.findpos(sPlayer1Name) = 0
and theAdminList.findpos(sPlayer1Name) = 0
    removetechlevel 1 playernumber 19
    removetechlevel 1 playernumber 20
end if
*****     ABOVE: BETA TESTER and MOD user test     *****
*****     ABOVE: BETA TESTER and MOD user test     *****

if timer 1 >= 0
    reset timer 1
    set flag 1 to 1
    cleartasks 1 p1real
    addtask 1 p1real defend_dropship pending primary protect your drop-ship at all costs
    addtask 1 p1real hold_sector pending secondary establish a base, and defend this sector against enemy forces
end if

if flag 1 = 1
and timer 1 >= 5000
and soundchannel 1 is free
    playglobalsound 1 99 computer001
    comsatline Computer: Approach vector confirmed. rgb(255,255,0)
    set flag 1 to 2
    reset timer 1
end if

if flag 1 = 2
and timer 1 >= 100
and soundchannel 1 is free
    playglobalsound 1 99 computer031
    comsatline Computer: Weather conditions stable. rgb(255,255,0)
    set flag 1 to 3
    reset timer 1
end if

if flag 1 = 3
and timer 1 >= 100
and playernumber = 1
    playglobalsound 5 99 twobeeps01
    comsatline Computer: This is a multiplayer-only level. If you are hosting it while being behind a router, make sure that it is configured for QL, or no one will be able to join this level. rgb(255,255,0)
--    playglobalsound 1 99 snd_blair_sector12
--    comsatline >> Col. Blair: Commander, this sector is out of range of any of our outposts, thus, we will be unable to radio-in for help. Were on our own. Lets make the best of it. rgb(255,255,255)
    set flag 1 to 4
    reset timer 1
end if

if flag 1 = 4
and playernumber = 1
    playglobalsound 5 99 twobeeps01
    comsatline NOTICE: You are the host, and for better performance, your game-play HUD has now been set for "slow update" to increase FPS. If you wish to begin playing the game, click the "Menu" button. The game may seen "frozen" but it is not. rgb(0,255,0)
    set screenupdate false
    set flag 1 + 1
    reset timer 1
end if

--BELOW: if the host did not build any units within the first 3 minutes
--then erase his drop-ship (this way the engine has one less player to worry about
--and the host's job becomes to only provide a level for others to play in)
--if flag 1 = 5
--and playernumber = 1
--and timer 1 >= 60000*3
--and timer 1 <= 60000*4
--and totalplayerunits 1 1 <= 1
--    setunitstate 1 1 all 69
--    reset timer 1
--end if

total memory cleanup
set activeworld 1
resetworld 1

load basic configuration

set landpatch land_fatalcause_31a
set landdeform off
set landheightmap heightmap_fatalcause31a

set minnewfogdistance 50000
set maxviewdistance 80000

**** RESOURCE PACK FILES START
if highmodeldetail
    load resourcepack http://internallink1/ql_highres_modelspack.cct slot1 highres_models
end if
if lowmodeldetail
    load resourcepack http://internallink1/ql_lowres_modelspack.cct slot1 lowres_models
end if

if highterraindetail
    load resourcepack http://internallink2/ql_highresterrain_fatalcause31a.cct slot2 highres_terrain
end if
if mediumterraindetail
    load resourcepack http://internallink2/ql_medresterrain_fatalcause31a.cct slot2 medres_terrain
end if
if lowterraindetail
    load resourcepack http://internallink2/ql_lowresterrain_fatalcause31a.cct slot2 lowres_terrain
end if

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

load resourcepack http://internallink1/ql_soundpack_blairgeneral.cct slot4 character_speech
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
**** RESOURCE PACK FILES END

--NIGHT SKY: FINAL
--set skycolor rgb(2,7,29)
--ORANGE SKY:
--set skycolor rgb(255,162,1)

--set weather rain
prepare landpatch

load basic variables

load basic models
load minimap

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

if displayextramodels
    createmodel player16 s_tree02 vector(45274,10528,-2391) 78.5949 10.5809 [5]
    createmodel player16 s_tree01 vector(138866,11913,-3897) 115.6008 11.3906 [5]
    createmodel player16 s_tree02 vector(185522,83468,1904) 163.7160 7.4120 [5]
    createmodel player16 s_tree02 vector(186906,137497,1980) -165.3351 8.3531 [5]
    createmodel player16 s_tree01 vector(149123,217927,-7096) -116.4490 12.9227 [5]
    createmodel player16 s_tree02 vector(17435,182521,2508) -18.0229 9.0428 [5]
    createmodel player16 s_tree02 vector(28650,113440,2514) 37.5273 8.1722 [5]
    createmodel player16 s_tree01 vector(10407,67638,-14) 40.1162 7.9581 [5]
    createmodel player16 s_tree02 vector(68799,217123,-1425) -48.8089 11.0523 [5]
    --last batch of "patch trees" below
    createmodel player16 s_tree02 vector(91217,86906,918) -52.9820 4.0429 [5]
    createmodel player16 s_tree01 vector(140797,134324,2088) -146.8343 5.0039 [5]
    createmodel player16 s_tree01 vector(49806,133116,2619) -4.4790 4.8231 [5]
end if

if displayextramodels and highterraindetail
    createmodel player16 s_tree01 vector(-21719,221998,-4691) -60.3022 11.1639 [5]
    createmodel player16 s_tree01 vector(-28098,69163,-6791) 179.3978 11.9371 [5]
    createmodel player16 s_tree01 vector(-18549,-26688,-6311) -159.3472 13.7827 [5]
    createmodel player16 s_tree02 vector(120194,-35447,-8763) 142.1678 13.7827 [5]
    createmodel player16 s_tree02 vector(222009,-21740,-3476) 159.5930 12.5297 [5]
    createmodel player16 s_tree01 vector(231875,136156,-5772) 35.4622 12.3311 [5]
    createmodel player16 s_tree02 vector(203606,205186,-2016) -41.3528 10.1073 [5]
end if

--PRE-BUFFERING OF UNITS
if displayextramodels
createmodel player0 ftacollector vector(-10000,-10000,-10000) 0 0 [1]
--createmodel player0 turbine vector(-11000,-11000,-10000) 0 0 [1]
--createmodel player0 bladescout vector(-12000,-12000,-10000) 0 0 [1]
--createmodel player0 interceptor vector(-13000,-13000,-10000) 0 0 [1]
--createmodel player0 advocate vector(-14000,-14000,-10000) 0 0 [1]
--createmodel player0 radartower vector(-15000,-15000,-10000) 0 0 [1]
--createmodel player0 flakturret vector(-16000,-16000,-10000) 0 0 [1]
end if

new database entry
resourcepod
affect all temporal mods
fullname Resource Pod
price 0
buildtime 2000
unitflagrequired 0
techlevel 0
unitscale 1
healthratio 5
modeltype 10
isabuilding yes
unmoving true
armor 100000
speed1 0
speed2 0
speed3 40
initialstate 81
maxbuilddistance 1000000000
gridtype -2  --was: -4
collisiontype 0    --no collision check on the unit
deathtype 3
lifetime 0
hasresource 1
quantityofresource -1	--unlimited resources
addspecial 91    --explode when resource is depleted
#end

--below: this particular uplink will auto-attack anyone it sees
--new database entry
--farseeruplink
--affect all temporal mods
--fullname Farseer Uplink
--price 4000
--buildtime 50000
--unitflagrequired 1
--maxallowed 1    --cannot build more than one
--techlevel 19
--unitscale 1
--healthratio 6
--modeltype 10
--isabuilding yes
--unmoving true
--armor 5000	--more armor for this level
--speed1 0
--speed2 0
--speed3 40
--initialstate 85
--maxbuilddistance 12000
--gridtype -2
--deathtype 3
--power +800	--in this level it gives power
--lifetime 0
--cantarget [1,2,3,4,5,10,50]
--canattack [1,2,3,4,5,10,50]
----canbuild 1 [333] ["farseeruplinkcheckpoint"]    --state 333 means: can't be built by user
--builddelay 10000 180000    --the 3 minute delay before the above unit is auto-built
--sounds created ["computer_global_137","computer_global_138"]
--sounds deploy ["fuplink_loud_prime"]
--sounds undeploy ["fuplink_global_fire1","fuplink_global_fire2"]
--animationtype 2        --has custom animation
--animation 0 0 100 no yes yes        --idle
--animation 20 100 200 no no no    --deploy
--animation 22 300 400 no no no    --undeploy
--deploydelay 3500
--undeploydelay 3500
--addspecial 10    --animation is power dependent
--addspecial 31    --do not target back if attacked
--addspecial 59    --create a radar beacon when entered the world
--addspecial 63    --player can't tell unit to move
--addspecial 64    --player can't tell unit to attack
--addspecial 69    --unit will de-cloak 1 minute before the builddelay expires
--addspecial 89    --play countdown sample every minute. sound format: "unit_minute"
--addspecial 92    --the builddelay timer works when power > 0
--addspecial 93    --create the unit after builddelay only locally
--addspecial 94    --only build the builddelay unit when "idle"
--addspecial 95    --deploy when builddelay runs out
--addspecial 82    --fire primary weapon when have a target
--addspecial 83    --only fire the weapon when deployed
--healthanimation <=20 smoke_and_fire 10000
--healthanimation <=50 slight_smoke 10000
--candeploy no
----below: the list of vectors is used to fire the projectile/weapon at set locations
--weaponvector [vector(-900,1800,0),vector(900,-1800,0)*2,vector(1800,0,0),vector(-1800,0,0)*2,vector(-900,-1800,0),vector(900,1800,0)*2,vector(900,1800,0),vector(-900,-1800,0)*2,vector(-1800,0,0),vector(1800,0,0)*2,vector(900,-1800,0),vector(-900,1800,0)*2,vector(0,0,0)]
--weaponvector [vector(-900,1800,0),vector(1800,0,0),vector(-900,-1800,0),vector(900,1800,0),vector(-1800,0,0),vector(900,-1800,0),vector(0,0,0)]
--#end

--BELOW: this farseer will also attack anyone it sees
--new database entry
--farseer
--affect all temporal mods
--fullname Farseer Cannon
--price 3500
--buildtime 45000
--unitflagrequired 1
--maxallowed 1    --cannot build more than one
--techlevel 18
--unitscale 1
--healthratio 8
--modeltype 10
--isabuilding yes
--unmoving false
--armor 5000	--more armor for this level
----damage 0
--speed1 0
--speed2 20    --40
--speed3 40
--initialstate 85
--maxbuilddistance 12000
--gridtype -2
--deathtype 3
--cantarget [2,3,4,10,50]
--canattack [1,2,3,4,10,50]
--power +700		--in this level it gives power
--lifetime 0
--canbuild 4 [777] ["farseeruplink"]    --state 777 means: all states
--sounds created ["computer_global_135","computer_global_136"]
--animationtype 2        --has custom animation
--animation 0 0 100 no yes yes        --idle
--animation 3 100 200 no no no        --idle
--animation 800 400 500 no no no    --fire weapon
--addspecial 10    --animation is power dependent
--addspecial 8    --building can't turn, except for the turret
--addspecial 59    --create a radar beacon when entered the world
--addspecial 77    --can't be cloaked
----REM addspecial 84    --create radar beacon on target after firing the weapon
--healthanimation <=20 smoke_and_fire 10000
--healthanimation <=50 slight_smoke 10000
--#end

--BELOW: entry for the Centuras unit
--new database entry
--centuras
--affect all temporal mods
--fullname Centuras Cruiser
--price 2500
--buildtime 35000
--unitflagrequired 1
--maxallowed 3    --cannot build more than this
--techlevel 13
--unitscale 1
--healthratio 6
--modeltype 4        --5
--armor 800		--more armor for this level
--damage 250
--speed1 900
--speed2 90
--speed3 200
--initialstate 82
--cantarget [2,3,4,5,10,50]	--this cruiser can attack/target anyone. was: [10]
--canattack [1,2,3,4,5,10,50]
--gridtype -2
--deathtype 3    --fall forward and straight down
--sounds created ["transportgamma_acreated1","transportgamma_aattack3"]
--sounds selected ["transportgamma_aattack2","transportgamma_aattack3"]
--sounds move ["transportgamma_amove1","transportgamma_amove2","transportgamma_amove3"]
--sounds attack ["transportgamma_aattack1","transportgamma_aattack4"]
----addspecial 1    --has a on-board radar
----addspecial 9    --can't stop
----addspecial 72    --is a spy unit
----addspecial 73    --weapons will un-deploy targets
----animationtype 2        --has custom animation
----animation 0 0 100 no yes yes        --idle
--animation 0 200 300 no no no        --idle
--animation 3 100 200 no no no        --move forward
----animation 700 200 300 no no no    --before stops
----animation 800 300 400 no no no    --fire weapon
--#end

process database

---*** AI ENEMY UNITS ***
---*** AI ENEMY UNITS ***

--createmodel player9 farseeruplink vector(8789,195727,2888) 61.1037 1.0000 [1]
--createmodel player9 mammothturbine vector(11745,197948,2951) 61.1037 1.0000 [1]
--createmodel player9 centuras vector(21351,23976,21071) 148.1809 1.0000 [1]
--createmodel player10 centuras vector(23855,89953,20500) 76.1740 1.0000 [1]

--below: for now, disable the FarSeers (they make the level too hard)
--createmodel player11 farseer vector(198908,-5150,623) -69.7957 1.0000 [1]
--createmodel player12 farseer vector(8789,195727,2888) 61.1037 1.0000 [1]


createmodel player17 resourcepod vector(111818,55908,1878) -172.7549 1.0000 [1]
createmodel player17 resourcepod vector(54571,39888,1792) 48.5718 1.0000 [1]
createmodel player17 resourcepod vector(84069,100682,1125) -2.2946 1.0000 [1]
createmodel player17 resourcepod vector(110562,121529,2387) 166.5475 1.0000 [1]
createmodel player17 resourcepod vector(154839,75386,1289) -170.4261 1.0000 [1]

set activeworld 1

positioncamera vector(5.36543e4,3.94721e4,-100.0000) vector(0.0000,0.0000,148.2670) vector(0.0000,-6.50000e4,1.09862e4) vector(0.0000,0.0000,0.0000)

clear startingunit
add startingunit epsilon omnithias
--clear bonusunit

-- **** GENERAL BLAIR SAMPLES ****

if soundchannel 1 is free
and gametime >= 120000
and unitstate 1 < 80
and playerpower < 0
    playglobalsound 1 99 snd_blair_lowpower2
    comsatline >> Col. Blair: Low power Commander. Lets get more turbines up and running. rgb(255,255,255)
    reset timer 1
end if

if soundchannel 1 is free
and unitstate 1 < 80
and playermoney < 300
    playglobalsound 1 99 snd_blair_lowmoney1
    comsatline >> Col. Blair: We are running low on funds. See if you can create new Collector units and scout the area for more resources. rgb(255,255,255)
    reset timer 1
end if

--if soundchannel 1 is free
--and hasunit chopper01
--and unitstate 2 < 80
--and unithealth 2 < 80%
--    playglobalsound 1 99 snd_blair_lowcollectorhealth1
--    comsatline >> Col. Blair: Our Collector is taking damage. Pull our forces back to provide some cover. rgb(255,255,255)
--    reset timer 1
--end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 80%
    playglobalsound 1 99 snd_blair_lowdropshiphealth1
    comsatline >> Col. Blair: The drop-ship is under attack. We need reinforcements back here. rgb(255,255,255)
    reset timer 1
end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 30%
    playglobalsound 1 99 snd_blair_lowdropshiphealth2
    comsatline >> Col. Blair: Commander, the drop-ship is almost destroyed. I dont know what you are doing, but consider putting it on hold and building us more reinforcements. rgb(255,255,255)
    reset timer 1
end if

if soundchannel 1 is free
and unithealth 1 <= 0%
    playglobalsound 1 99 snd_blair_dropshipdead2
    comsatline >> Col. Blair: Weve lost our drop-ship. I hope you are happy. I will raise HQ on COM-SAT and tell them the bad news. rgb(255,255,255)
    reset timer 1
    changetask 1 p1real defend_dropship failed
    set flag 1 to 92
end if

if flag 1 = 92
and timer 1 >= 3000
and soundchannel 1 is free
    playglobalsound 2 99 computer015
    comsatline Computer: Mission failed. rgb(255,255,0)
    highlighthud tasks
    set flag 1 to 93
    reset timer 1
end if

if soundchannel 1 is free
and sinceenemyjump <= 10000
    playglobalsound 1 99 snd_blair_enemyjump2
    comsatline >> Col. Blair: Enemy is approaching this sector. Alert our forces commander. rgb(255,255,255)
    reset timer 1
end if

if soundchannel 1 is free
and playerlosses >= 1
    playglobalsound 1 99 snd_blair_lost2
    comsatline >> Col. Blair: As far as Im concerned, you were given a simple task: not let our forces be destroyed at the hands of the enemy. And you, blew it. I have nothing more to say to you at this point. You will hear the rest in my official report. Good day Commander. rgb(255,255,255)
    changetask 1 p1real hold_sector failed
    set flag 1 to 92
    reset timer 1
end if

if soundchannel 1 is free
and playerwins >= 1
    playglobalsound 1 99 snd_blair_won2
    comsatline >> Col. Blair: I sometimes forget why exactly I bother taking your orders Commander, but these few and rare moments do tend to remind me. I just hope our foes learned a lesson as well, and will think twice before approaching our forces in the future. rgb(255,255,255)
    reset timer 1
end if

-- **** GENERAL BLAIR SAMPLES END****

--------------
-- MUSIC
--------------

if soundchannel 8 is free
and timer 2 >= 20000
    addmusic ql_track_6a
    addmusic ql_track_12a
    addmusic ql_track_10a
    addmusic ql_track_8a
    addmusic ql_track_11a
    addmusic ql_track_9a
    addmusic ql_track_6c
    addmusic ql_track_10b
    addmusic ql_track_8b
    addmusic ql_track_12b
    addmusic ql_track_6b
    addmusic ql_track_11b
    addmusic ql_track_9b
    addmusic ql_track_8c
    addmusic ql_track_10c
    pause between tracks 10000
    randomize music
    reset timer 2
end if

--------------
-- MUSIC END
--------------

*** GENERAL COMPUTER VOICE START

if soundchannel 1 is free
if flag 19 = 0
and unitstate 1 < 80
and timer 19 >= 60000
and playerpower < 0
    set flag 19 to random(2)
    reset timer 19
    repeat this if
end if

if flag 19 = 1
    playglobalsound 2 99 computer025
    comsatline Computer: Low Power. rgb(255,255,0)
    highlighthud power
    set flag 19 to 3
    repeat this if
end if

if flag 19 = 2
    playglobalsound 2 99 computer026
    comsatline Computer: New generators required. rgb(255,255,0)
    highlighthud power
    set flag 19 to 3
    repeat this if
end if

if flag 19 = 3
and playerpower > 1
    set flag 19 to 0
    repeat this if
end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 90%
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    reset timer 1
end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 70%
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    reset timer 1
end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 50%
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    reset timer 1
end if

if soundchannel 1 is free
and unitstate 1 < 80
and unithealth 1 < 30%
    playglobalsound 2 99 computer034
    comsatline Computer: Drop-ship under fire. rgb(255,255,0)
    reset timer 1
end if

*** GENERAL COMPUTER VOICE END

set maxplayers 6
