home *** CD-ROM | disk | FTP | other *** search
/ Tripas 5 / TRIPAS 005.iso / Wos.EXE / base / maps / intro.scr < prev    next >
Encoding:
Text File  |  1999-02-24  |  51.6 KB  |  1,794 lines

  1. //==========================================
  2. // Intro Map Script
  3. // Tom Mustaine - Ritual Entertainment
  4. //==========================================
  5. // This map is not deathmatchable
  6. //parm.deathmatch getcvar deathmatch
  7. //parm.deathmatch ifnotequal 0 goto maps/intro_dm.scr::start
  8. //parm.deathmatch ifnotequal 0 goto end_singleplayer_script
  9. //goto single_player_script_start
  10. //end
  11.  
  12. //end_singleplayer_script:
  13. //end
  14.  
  15. //==========================================
  16. // Intro Dialog
  17. single_player_script_start:
  18.  
  19.     setdialogscript dialog/dialog_intro.scr
  20.  
  21. //
  22. //==========================================
  23.  
  24. //==========================================
  25. // Jump to Intro Cinematic
  26. //==========================================
  27.  
  28.     $skip_trigger hide
  29.     thread banktimecon
  30.     goto cinematic
  31.      end
  32.  
  33. //------------------------------------------
  34. //******************************************
  35. //==========================================
  36. // Main thread and Script init
  37. //==========================================
  38. //******************************************
  39. //------------------------------------------
  40. mainthread:
  41. // Flag so that player can't end level when dead
  42.     level.PlayerKilled = 0
  43.     level.CinematicStarted = 0
  44.  
  45.     thread helicopter_damage_thread        // Heli Damage sound thread
  46.     thread rotors_spin_down_thread        // Rotor spindown for end
  47.     thread billboard_thread            // Billboard setup and wait
  48.     thread ammo1_thread            // Ammobox1 wait
  49.     thread ammo2_thread            // Ammobox2 wait
  50.     thread bank_entrance_thread        // Awning collapse and wait thread
  51.     thread t1000_secret            // Easter egg
  52.  
  53. // Initial Level variable setup
  54.  
  55.     level.count_bad_guys = 0
  56.     level.count_good_guys = 0
  57.     level.PObjective1 = 0
  58.     level.PObjective2 = 0
  59.     level.PObjective3 = 0
  60.     level.SObjective1 = 0
  61.     level.found_secrets = 0
  62.     level.total_secrets = 1
  63.     level.tree_death_toll = 0
  64.     game.intro_start = 1
  65.     $door1    notsolid            // Fix guys getting caught on doors
  66.     $door2    notsolid            // Fix guys getting caught on doors
  67.     $door3    notsolid            // Fix guys getting caught on doors
  68.  
  69.     thread turret_death_wait        // Turret death counter
  70.     thread turret1_deathreport        // Object waiting for turret death
  71.     thread turret2_deathreport        // Object waiting for turret death
  72.     thread turret3_deathreport        // Object waiting for turret death
  73.     thread MissionComputer            // Mission Computer
  74.     thread SkillLevelSettings        // Skill level settings
  75.     thread pillar                // Awning trigger thread
  76.     thread heli_damage_dialog        // Helicopter damage dialog thread
  77.     thread random_sounds            // Random sounds near player head
  78.                                                                                                                                                                                                                                                                                                                                                                                                                                                    thread shootsign            // Smart ass remark sign
  79.      end
  80. //==========================================
  81. //------------------------------------------
  82. //==========================================
  83.  
  84.  
  85. //------------------------------------------
  86. //******************************************
  87. //==========================================
  88. // All cinematic stuff
  89. //==========================================
  90. //******************************************
  91. //------------------------------------------
  92. cinematic:
  93.  
  94.     cinematic            // start up as a cinematic
  95.     skipthread skip_sequence    // setup our skip thread
  96.     waitforplayer            // wait till the player is spawned
  97.     freezeplayer            // freeze the player
  98.     fadeout 0.5 0 0 0        // fade out
  99.  
  100.     thread initialize_thread    // Setup level and actors
  101.     local.waitforthread = parm.previousthread
  102.     waitForThread local.waitforthread
  103.  
  104.     thread PoliceCar1_Movie            // Start Car1
  105.     thread PoliceCar2_Movie            // Start Car2
  106.  
  107.     thread camera_thread            // Start Camera
  108.     level.camerathread = parm.previousthread
  109.     thread pigeon_thread            // Start Pigeon
  110.     level.pigeonthread = parm.previousthread
  111.     $roofblade thread ignore_thread        // Actors ignore everything
  112.     $groundblade thread ignore_thread    // Actors ignore everything
  113.     $cinematic_thug1 thread ignore_thread    // Actors ignore everything
  114.     $cinematic_thug2 thread ignore_thread    // Actors ignore everything
  115.      end
  116.  
  117. //==========================================
  118. // Main Cinematic Skip Sequence
  119. //==========================================
  120. skip_sequence:
  121.     fadeout 0.1 0 0 0
  122.     noncinematic            // no longer a cinematic
  123.     wait 0.1            // wait for fade out
  124.     cueplayer            // go back to the player
  125.  
  126.     level.camera2started ifequal 1 terminate level.camera2thread    // kill any threads we have going
  127.     terminate level.camerathread
  128.     terminate level.pigeonthread
  129.  
  130.     $pigeon remove            // remove that darn pigeon
  131.  
  132.     thread helicopter_setup_thread    // setup helicopter
  133.     local.WaitingForThread = parm.previousthread
  134.     waitForThread local.WaitingForThread
  135.     //waitForThread parm.previousthread
  136.  
  137.     $helicopter jumpto $hover_path
  138.     thread mainthread        // Skip to action!
  139.     local.WaitingForThread = parm.previousthread
  140.     waitForThread local.WaitingForThread
  141.     thread start_action_thread
  142.      end
  143.  
  144. //==========================================
  145. // Cinematic/Level Initilize thread
  146. //==========================================
  147. initialize_thread:
  148.     hud 0                // Kill hud for Cinematic
  149.     music none            // No music
  150.     $sun1 remove
  151.     freezeplayer
  152.     $camera2 moveto $cam2start
  153.     $node hide
  154.     $node notsolid
  155.     $lookatme hide
  156.     $lookatme notsolid
  157.     $roofblade hide
  158.     $groundblade hide
  159.     $groundblade notsolid
  160.     $roofblade notsolid
  161.     $node time .1
  162.     $node rotateYup 180
  163.     waitFor $node
  164.     music aux5 none
  165.     $cinematic_thug1 anim talk1
  166.     $cinematic_thug2 anim talk1
  167.      end
  168.  
  169. //==========================================
  170. // Police Car #1 go
  171. //==========================================
  172. PoliceCar1_Movie:
  173.     local.Movie = 1
  174.     local.WaitTime = 0
  175.     $policecar1_movie jumpto $police1_movie_start
  176.     $policetruck1_movie jumpto $police1_movie_start
  177.     $policetruck1_movie hide
  178.     local.VehicleName string "$policecar1_movie"
  179.     $policecar1_siren_movie bind local.VehicleName
  180.     wait 0.1
  181.      goto PoliceCar1_Movie_Loop
  182.  
  183. PoliceCar1_Movie_Loop:
  184.     local.VehicleName show
  185.     $policecar1_siren_movie playsound "environment/alarm/police/siren2.wav" 4
  186.     local.VehicleName followpath $police1_movie_start normalangles
  187.     waitFor local.VehicleName
  188.     wait local.WaitTime
  189.     $policecar1_siren_movie stopsound
  190.  
  191. level.piller ifequal 2 goto movieend1
  192.  
  193.     $police1_movie_launcher launch rocket
  194.     wait 0.3
  195.     parm.VehicleName string local.VehicleName
  196.     thread Police1_Movie_CarExplode
  197.     local.waitforthread = parm.previousthread
  198.     waitForThread parm.previousthread
  199.     local.VehicleName jumpto $police1_movie_start
  200.     local.Vehicle randomint 100
  201.     local.Vehicle ifgreater 50 local.VehicleName string "$policetruck1_movie"
  202.     local.Vehicle iflessequal 50 local.VehicleName string "$policecar1_movie"
  203.     $policecar1_siren_movie bind local.VehicleName
  204.     local.WaitTime randomint 10
  205.     local.WaitTime += 1
  206.     wait local.WaitTime
  207.     local.Movie ifequal 1 wait 15
  208.     local.Movie = 0
  209.       goto PoliceCar1_Movie_Loop
  210.      end
  211.  
  212. movieend1:        // Stop Car from moving
  213. end
  214.  
  215. //==========================================
  216. // Police Car #1 explode
  217. //==========================================
  218. Police1_Movie_CarExplode:
  219.     local.VehicleName string parm.VehicleName
  220.     local.VehicleName time 0.6
  221.     local.VehicleName moveUp    128
  222.     local.VehicleName moveWest  24
  223.     local.VehicleName rotateXup  -60
  224.     trigger $police1_movie_boom
  225.     //local.VehicleName shatter "1 1 1" 20 10 40 .05 0
  226.     $policecar1_siren_movie playsound "environment/alarm/police/siren2down.wav" 3
  227.       waitFor local.VehicleName
  228.  
  229.     local.VehicleName time 0.3
  230.     local.VehicleName moveUp    64
  231.     local.VehicleName moveWest   12
  232.     local.VehicleName rotateXup  -30
  233.       waitFor local.VehicleName
  234.  
  235.     local.VehicleName time 0.9
  236.     local.VehicleName moveDown  128
  237.     local.VehicleName moveWest    36
  238.     local.VehicleName rotateXup  -90
  239.     trigger $police1_movie_boom
  240.     local.VehicleName shatter "1 1 1" 40 20 40 .05 0
  241.       waitFor local.VehicleName
  242.  
  243.     local.VehicleName hide
  244.     local.VehicleName time 0.1
  245.     local.VehicleName rotateXup  180
  246.     trigger $police1_movie_boom
  247.       waitFor local.VehicleName
  248.      end
  249.  
  250. //==========================================
  251. // Police Car #2 go
  252. //==========================================
  253. PoliceCar2_Movie:
  254.     local.Movie = 1
  255.     local.WaitTime = 4
  256.     $policecar2_movie jumpto $police2_movie_start
  257.     $policetruck2_movie jumpto $police2_movie_start
  258.     $policetruck2_movie hide
  259.     local.VehicleName string "$policecar2_movie"
  260.     $policecar2_siren_movie bind local.VehicleName
  261.     wait 4
  262.       goto PoliceCar2_Movie_Loop
  263.  
  264. PoliceCar2_Movie_Loop:
  265.     local.VehicleName show
  266.     $policecar2_siren_movie playsound "environment/alarm/police/siren2.wav" 4
  267.     local.VehicleName followpath $police2_movie_start normalangles
  268.     waitFor local.VehicleName
  269.     wait local.WaitTime
  270.     $policecar2_siren_movie stopsound
  271.  
  272.     level.piller ifequal 2 goto movieend2
  273.  
  274.     $police2_movie_launcher launch rocket
  275.     wait 0.3
  276.     parm.VehicleName string local.VehicleName
  277.     thread Police2_Movie_CarExplode
  278.     local.waitforthread = parm.previousthread
  279.     waitForThread parm.previousthread
  280.     local.VehicleName jumpto $police2_movie_start
  281.     local.Vehicle randomint 100
  282.     local.Vehicle ifgreater 50 local.VehicleName string "$policetruck2_movie"
  283.     local.Vehicle iflessequal 50 local.VehicleName string "$policecar2_movie"
  284.     $policecar2_siren_movie bind local.VehicleName
  285.     local.WaitTime randomint 10
  286.     local.WaitTime += 1
  287.     wait local.WaitTime
  288.     local.Movie ifequal 1 wait 15
  289.     local.Movie = 0
  290.  
  291.       goto PoliceCar2_Movie_Loop
  292.      end
  293.  
  294. movieend2:        // Car2 stop going
  295. end
  296.  
  297. //==========================================
  298. // Police Car #2 explode
  299. //==========================================
  300. Police2_Movie_CarExplode:
  301.     local.VehicleName string parm.VehicleName
  302.     local.VehicleName time 0.6
  303.     local.VehicleName moveUp    128
  304.     local.VehicleName moveNorth  24
  305.     local.VehicleName rotateZup  -60
  306.     trigger $police2_movie_boom
  307.     //local.VehicleName shatter "1 1 1" 20 10 40 .05 0
  308.     $policecar2_siren_movie playsound "environment/alarm/police/siren2down.wav" 3
  309.       waitFor local.VehicleName
  310.  
  311.     local.VehicleName time 0.3
  312.     local.VehicleName moveUp    64
  313.     local.VehicleName moveNorth   12
  314.     local.VehicleName rotateZup  -30
  315.       waitFor local.VehicleName
  316.  
  317.     local.VehicleName time 0.9
  318.     local.VehicleName moveDown  128
  319.     local.VehicleName moveNorth    36
  320.     local.VehicleName rotateZup  -90
  321.     trigger $police2_movie_boom
  322.     local.VehicleName shatter "1 1 1" 40 20 40 .05 0
  323.       waitFor local.VehicleName
  324.  
  325.     local.VehicleName hide
  326.     local.VehicleName time 0.1
  327.     local.VehicleName rotateZup  180
  328.     trigger $police2_movie_boom
  329.       waitFor local.VehicleName
  330.      end
  331.  
  332. //==========================================
  333. // First Camera Thread - MAIN CINEMATIC
  334. //==========================================
  335. camera_thread:
  336.     $pigeon speed 10
  337.     $pigeon moveto $pigeonstart
  338.     $camera moveto $pigeonstart
  339.     $camera follow $pigeon
  340.     $pigeon followpath $pigeonstart
  341.     cueplayer
  342.     $camera jumpcut
  343.     cuecamera $camera
  344.     fadein 2 0 0 0
  345.      end
  346.  
  347. //==========================================
  348. // Pigeon Thread - MAIN CINEMATIC
  349. //==========================================
  350. pigeon_thread:
  351.     $skip_trigger notrigger
  352.     $pigeon nextanim pigeon_fly
  353.     wait 1.5
  354.     $skip_trigger notrigger
  355.     $pigeon nextanim coast
  356.     wait 2.3
  357.     $pigeon nextanim pigeon_fly
  358.     wait 4
  359.     $pigeon nextanim coast
  360.     $pigeon nextanim coast
  361.     wait 4.5
  362.     $pigeon nextanim pigeon_fly
  363.     wait 1.5
  364.     $cinematic_thug1 anim attack
  365.     $pigeon nextanim coast
  366.     wait .8
  367.     music aux6 none
  368.     wait .2
  369.     trigger $cinematic_sound1
  370.     $pigeon gib 1 30 1 organic    // Piegon Dies
  371.     $pigeon gib 20 30 1 feather
  372.     wait .5
  373.     skipthread ""            // no longer a cinematic
  374.     thread camera2_thread
  375.     level.camera2thread = parm.previousthread
  376.      end
  377.  
  378. //==========================================
  379. // Cinematic actors ignore thread
  380. //==========================================
  381. ignore_thread:
  382.     local.self ignoreall
  383.     pause
  384.     goto ignore_thread
  385.      end
  386.  
  387. //==========================================
  388. // 2nd and 3rd Cinematic Camera Setup - MAIN CINEMATIC
  389. //==========================================
  390. camera2_thread:
  391.     level.camera2started = 1
  392.     $camera follow $node $lookatme
  393.     wait 2
  394.     thread camera3_thread
  395.     $camera follow $cam2start $lookatme
  396.     wait 2
  397.     $camera pause
  398.     wait 5
  399.     $camera continue
  400.     thread move_lookatme_thread
  401.     wait 8
  402.     fadeout 1 0 0 0
  403.     noncinematic        // we are no longer a cinematic
  404.     cueplayer
  405.     thread mainthread
  406.     thread start_action_thread
  407.      end
  408.  
  409. camera3_thread:
  410.     music aux7
  411.     parm.thug1 string $cinematic_thug1
  412.     parm.thug2 string $cinematic_thug2
  413.     thread dialog::thug_too_easy
  414.     thread helicopter_ride_thread
  415.     wait 1
  416.     $cinematic_thug1 anim talk2
  417.     wait 2
  418.     $cinematic_thug1 anim talk1
  419.     wait 1.5
  420.     $cinematic_thug1 anim talk2
  421.     wait 2.5
  422.     $cinematic_thug1 anim laugh1
  423.     wait .5
  424.     $cinematic_thug2 anim laugh1
  425.     wait 1
  426.     $cinematic_thug1 anim talk1
  427.     wait .5
  428.     $cinematic_thug2 anim talk1
  429.     wait 4.5
  430.     parm.thug1 string $cinematic_thug1
  431.     parm.thug2 string $cinematic_thug2
  432.     thread dialog::blade_suprise
  433.      end
  434.  
  435. move_lookatme_thread:
  436.     $lookatme time 5
  437.     $lookatme moveUp 128
  438.     waitFor $lookatme
  439.     $lookatme time 3.5
  440.     $lookatme moveUp 148
  441.     $lookatme moveEast 384
  442.     $lookatme moveSouth 96
  443.     waitFor $lookatme
  444.      end
  445.  
  446. //==========================================
  447. // Roof Cinematic - ROOF CINMEATIC
  448. //==========================================
  449. roofcam_thread:
  450.     // if the player's dead, don't play cinematic
  451.     level.PlayerKilled ifnotequal 0 end
  452.     level.CinematicStarted = 1
  453.  
  454.     cinematic
  455.     skipthread "roofcam_skip"
  456.     trigger $glass2
  457.     $helicopter time .1
  458.     $helicopter notsolid
  459.     $helicopter moveto $roofhelistart
  460.     *1 hide
  461.     $heligun show
  462.     $roofblade show
  463.     fadein 1 0 0 0
  464.     hud 0
  465.     freezeplayer
  466.     thread roofheli_thread
  467.     $roofcam jumpcut
  468.     $roofcam moveto $roofcamstart
  469.     $roofcam lookat $roofblade
  470.     freezeplayer
  471.     cuecamera $roofcam
  472.     $roofblade thread roofblade_thread
  473.     $roofcam follow $roofcamstart $roofblade
  474.     wait 6
  475.     $roofcam follow $roofblade
  476.     waitFor $roofcam
  477.     game.intro_start = 1        // Telling bank what exit player took
  478.     //thread exit_level_thread
  479.      end
  480.  
  481. roofblade_thread:
  482.     thread exit_anyhow_roof
  483.     $roofblade anim 1hand_idle3
  484.     wait 3.5
  485.     local.self walkto $roofpath1
  486.     waitFor $roofblade
  487.     local.self walkto $roofpath2
  488.     wait 1
  489.     fadeout 1 0 0 0
  490.     waitFor $roofblade
  491.     *1 take heligun
  492.     level.intermissiontype = 1
  493.     thread LevelComplete    
  494.     local.WaitingForThread = parm.previousthread
  495.     waitForThread local.WaitingForThread
  496.     map bank$start1
  497.      end
  498.  
  499. exit_anyhow_roof:
  500.     wait 8
  501.     *1 take heligun
  502.     level.intermissiontype = 1
  503.     thread LevelComplete    
  504.     local.WaitingForThread = parm.previousthread
  505.     waitForThread local.WaitingForThread
  506.     map bank$start1
  507.      end
  508.  
  509. roofcam_skip:
  510.     noncinematic
  511.     fadeout    1 0 0 0
  512.     wait 1
  513.     *1 take heligun
  514.     level.intermissiontype = 1
  515.     thread LevelComplete    
  516.     local.WaitingForThread = parm.previousthread
  517.     waitForThread local.WaitingForThread
  518.     map bank$start1
  519.      end
  520.  
  521. //==========================================
  522. // Ground Cinematic - GROUND CINEMATIC
  523. //==========================================
  524. groundcam_thread:
  525.     // if the player's dead, don't play cinematic
  526.     level.PlayerKilled ifnotequal 0 end
  527.     level.CinematicStarted = 1
  528.  
  529.     cinematic
  530.     skipthread groundcam_skip
  531.     *1 hide
  532.     $heligun show
  533.     $helicopter notsolid
  534.     $groundblade show
  535.     $groundblade thread groundblade_thread
  536.     $groundcam follow $groundcam_start $groundblade
  537.     $groundcam jumpcut
  538.     freezeplayer
  539.     cuecamera $groundcam
  540.     fadein 1 0 0 0
  541.     wait 4
  542.     $groundcam follow $groundblade
  543.     game.intro_start = 2        // Telling bank what exit player took
  544.     //thread exit_level_thread
  545.     wait 10
  546.      end
  547.  
  548. groundblade_thread:
  549.     thread end_level2_nomatterwhat
  550.     $groundblade anim 1hand_idle3
  551.     wait 3.5
  552.     local.self walkto $groundpath1
  553.     waitFor $groundblade
  554.     local.self runto $groundpath2
  555.     waitFor $groundblade
  556.     $groundblade runto $groundpath7
  557.     waitFor $groundblade
  558.     thread end_level2
  559.     $groundblade runto $groundpath8
  560.     waitFor $groundblade
  561.      end
  562.  
  563. end_level2:
  564.     fadeout 1 0 0 0
  565.     wait 1.5
  566.     *1 take heligun
  567.     level.intermissiontype = 2
  568.     thread LevelComplete    
  569.     local.WaitingForThread = parm.previousthread
  570.     waitForThread local.WaitingForThread
  571.     map bank$start2
  572.      end
  573.  
  574. end_level2_nomatterwhat:    // Exit level anyhow if blade dosen't reach pathnodes.
  575.     wait 10
  576.     fadeout 1 0 0 0
  577.     wait 1
  578.     *1 take heligun
  579.     level.intermissiontype = 2
  580.     thread LevelComplete    
  581.     local.WaitingForThread = parm.previousthread
  582.     waitForThread local.WaitingForThread
  583.     map bank$start2
  584.      end
  585.  
  586. groundcam_skip:
  587.     noncinematic
  588.     fadeout 1 0 0 0
  589.     wait 1
  590.     *1 take heligun
  591.     level.intermissiontype = 2
  592.     thread LevelComplete    
  593.     local.WaitingForThread = parm.previousthread
  594.     waitForThread local.WaitingForThread
  595.     map bank$start2
  596.      end
  597.  
  598. //******************************************
  599. //==========================================
  600. // End of Cinematic section
  601. //==========================================
  602. //******************************************
  603.  
  604.  
  605. //******************************************
  606. //==========================================
  607. // Other level threads
  608. //==========================================
  609. //******************************************
  610.  
  611. //==========================================
  612. // Banktime Console
  613. //==========================================
  614. banktimecon:
  615.     $banktime    time    10
  616.     $banktime    rotateY    10
  617.     level.hour = 3
  618.     level.tens = 1
  619.     level.mins = 2
  620.  
  621. banktimeconprint:
  622.     level.digit1 = level.tens
  623.     level.digit2 = level.mins
  624.  
  625.     local.PrintString string "xl 0 jcy fc 1 1 1 1.0 string \""
  626.     level.hour ifequal 1  local.PrintString append " 1:\" xl 60 jcy fc 1 1 1 1.0 string \""
  627.     level.hour ifequal 2  local.PrintString append " 2:\" xl 60 jcy fc 1 1 1 1.0 string \""
  628.     level.hour ifequal 3  local.PrintString append " 3:\" xl 60 jcy fc 1 1 1 1.0 string \""
  629.     level.hour ifequal 4  local.PrintString append " 4:\" xl 60 jcy fc 1 1 1 1.0 string \""
  630.     level.hour ifequal 5  local.PrintString append " 5:\" xl 60 jcy fc 1 1 1 1.0 string \""
  631.     level.hour ifequal 6  local.PrintString append " 6:\" xl 60 jcy fc 1 1 1 1.0 string \""
  632.     level.hour ifequal 7  local.PrintString append " 7:\" xl 60 jcy fc 1 1 1 1.0 string \""
  633.     level.hour ifequal 8  local.PrintString append " 8:\" xl 60 jcy fc 1 1 1 1.0 string \""
  634.     level.hour ifequal 9  local.PrintString append " 9:\" xl 60 jcy fc 1 1 1 1.0 string \""
  635.     level.hour ifequal 10 local.PrintString append "10:\" xl 60 jcy fc 1 1 1 1.0 string \""
  636.     level.hour ifequal 11 local.PrintString append "11:\" xl 60 jcy fc 1 1 1 1.0 string \""
  637.     level.hour ifequal 12 local.PrintString append "12:\" xl 60 jcy fc 1 1 1 1.0 string \""
  638.  
  639.     level.digit1 ifequal 0 local.PrintString append "0\" xl 80 jcy fc 1 1 1 1.0 string \""
  640.     level.digit1 ifequal 1 local.PrintString append "1\" xl 80 jcy fc 1 1 1 1.0 string \""
  641.     level.digit1 ifequal 2 local.PrintString append "2\" xl 80 jcy fc 1 1 1 1.0 string \""
  642.     level.digit1 ifequal 3 local.PrintString append "3\" xl 80 jcy fc 1 1 1 1.0 string \""
  643.     level.digit1 ifequal 4 local.PrintString append "4\" xl 80 jcy fc 1 1 1 1.0 string \""
  644.     level.digit1 ifequal 5 local.PrintString append "5\" xl 80 jcy fc 1 1 1 1.0 string \""
  645.     level.digit1 ifequal 6 local.PrintString append "6\" xl 80 jcy fc 1 1 1 1.0 string \""
  646.     level.digit1 ifequal 7 local.PrintString append "7\" xl 80 jcy fc 1 1 1 1.0 string \""
  647.     level.digit1 ifequal 8 local.PrintString append "8\" xl 80 jcy fc 1 1 1 1.0 string \""
  648.     level.digit1 ifequal 9 local.PrintString append "9\" xl 80 jcy fc 1 1 1 1.0 string \""
  649.  
  650.     level.digit2 ifequal 0 local.PrintString append "0\""
  651.     level.digit2 ifequal 1 local.PrintString append "1\""
  652.     level.digit2 ifequal 2 local.PrintString append "2\""
  653.     level.digit2 ifequal 3 local.PrintString append "3\""
  654.     level.digit2 ifequal 4 local.PrintString append "4\""
  655.     level.digit2 ifequal 5 local.PrintString append "5\""
  656.     level.digit2 ifequal 6 local.PrintString append "6\""
  657.     level.digit2 ifequal 7 local.PrintString append "7\""
  658.     level.digit2 ifequal 8 local.PrintString append "8\""
  659.     level.digit2 ifequal 9 local.PrintString append "9\""
  660.  
  661.     %introcon    conlayout    local.PrintString
  662.  
  663.     wait 60        // Wait time
  664.  
  665.     level.mins += 1
  666.     level.mins ifequal 10 goto uptens
  667.     goto banktimeconprint
  668.  
  669. uptens:
  670.     level.mins *= 0
  671.     level.tens += 1
  672.     level.tens ifequal 6 goto uphour
  673.     goto banktimeconprint
  674.  
  675. uphour:
  676.     level.tens *= 0
  677.     level.hour += 1
  678.     level.hour ifequal 13 goto switch
  679.     goto banktimeconprint
  680.  
  681. switch:
  682.     level.hour = 1
  683.     goto banktimeconprint
  684.      end
  685.  
  686. //==========================================
  687. // Neat stuff
  688. //==========================================
  689. t1000_secret:
  690.     $t1000origin    notsolid
  691.     $t1000origin    hide
  692.     $t1000 bind $t1000origin
  693.     wait .1
  694.     $t1000origin jumpto $t1000way1
  695.     $t1000 ignoreall
  696.     $t1000 anim sitting
  697.     //    $motorcycle    time    .2
  698.     //    $motorcycle    rotateYdown    180
  699.     //    waitFor $motorcycle
  700.     wait .1
  701.     $t1000 bind $motorcycle
  702.     wait .1
  703.     $t1000 group all +envmapped
  704.     $motorcycle    jumpto    $motoway2
  705.     $motorcycle    ontrigger start_t1000_secret
  706.     pause
  707.  
  708. start_t1000_secret:
  709.     $motoremove1 remove
  710.     $motoportal open
  711.     thread dialog::blade_what_the
  712.     trigger    $motobigexpl1
  713.     $motobreak1 shatter "0 180 0" 150 10 40 .4 0
  714.     $motobreak1 playsound    impact/comp_explode/cmpmx3.wav 4 8 -1
  715.     $motobreak1 remove
  716.     wait 2
  717.     $motorcycle    playsound    vehicle/atv/strt.wav 4 8 -1
  718.     wait 2
  719.     $motorcycle    playsound    vehicle/humvee/skid.wav 4 8 -1
  720.     $motorcycle followpath $motospline
  721.     waitFor $motorcycle
  722.     $motorcycle shatter "1 1 1" 20 10 40 .1 0
  723.     $motorcycle remove
  724.     $t1000 remove
  725.     trigger $motoexploder
  726.     level.found_secrets += 1
  727.     thread global/universal_script.scr::secret
  728.      end
  729.  
  730. tree_counter:
  731.     level.tree_death_toll += 1
  732.     //    print level.tree_death_toll
  733.     level.tree_death_toll ifequal 3 trigger $motorcycle
  734.      end
  735.  
  736. //==========================================
  737. // Goofy Alley sign getting shot thread
  738. //==========================================
  739. shootsign:
  740.     $shootsign1 ondamage sign_message
  741.     pause
  742.  
  743. sign_message:
  744.     $shootsign1 nodamage
  745.     thread dialog::jc_what_are_you_shooting_at1
  746.     local.waitforthread = parm.previousthread
  747.     waitForThread parm.previousthread
  748.     thread dialog::blade_can_it_jc
  749.      end
  750.  
  751. //==========================================
  752. // Turret Skill level settings
  753. //==========================================
  754. SkillLevelSettings:
  755.     local.skilllevel getcvar skill
  756.     //easy
  757.     local.skilllevel ifequal 0 $turret1 rocketrate 10
  758.     local.skilllevel ifequal 0 $turret2 rocketrate 8
  759.     local.skilllevel ifequal 0 $turret3 rocketrate 10
  760.     local.skilllevel ifequal 0 $turret1 health 500
  761.     local.skilllevel ifequal 0 $turret2 health 500
  762.     local.skilllevel ifequal 0 $turret3 health 800
  763.     //medium
  764.     local.skilllevel ifequal 1 $turret1 rocketrate 8
  765.     local.skilllevel ifequal 1 $turret2 rocketrate 6
  766.     local.skilllevel ifequal 1 $turret3 rocketrate 8
  767.     local.skilllevel ifequal 1 $turret1 health 1400
  768.     local.skilllevel ifequal 1 $turret2 health 1000
  769.     local.skilllevel ifequal 1 $turret3 health 1200
  770.     //hard
  771.     local.skilllevel ifequal 2 $turret1 rocketrate 4
  772.     local.skilllevel ifequal 2 $turret2 rocketrate 4
  773.     local.skilllevel ifequal 2 $turret3 rocketrate 4
  774.     local.skilllevel ifequal 2 $turret1 health 1500
  775.     local.skilllevel ifequal 2 $turret2 health 1500
  776.     local.skilllevel ifequal 2 $turret3 health 1600
  777.     $turret1    lagtime    1
  778.     $turret2    lagtime    1
  779.     $turret3    lagtime    1
  780.      end
  781.  
  782. //==========================================
  783. // Mission Status
  784. //==========================================
  785. MissionComputer:
  786. //0 nd 1 succeed 2 fail
  787. // level.PObjective1 --> Destroy Rocket Turrets
  788. // level.PObjective2 --> Eliminate All Enemy Forces
  789. // level.PObjective3 --> Gain Entry Into The Bank
  790. // level.SObjective1 --> Minimize Civilian Casualties
  791. %missioncon conlayout "xv -72 yv 76 fc 0.6 0.6 1 1 string \"Air Assault On FCB\""
  792. %missioncon conapplayout "xv -120 yv 60 fc 0.4 0.4 0.8 1 string \"Primary Objective(s):\""
  793. level.PObjective1 ifequal 0 %missioncon conapplayout "xv -118 yv 48 spicn b_blank 0.5 0.5 xv -116 yv 48 fc 0.7 0.7 0.7 1 string \" Destroy Rocket Turrets\""
  794. level.PObjective2 ifequal 0 %missioncon conapplayout "xv -118 yv 36 spicn b_blank 0.5 0.5 xv -116 yv 36 fc 0.7 0.7 0.7 1 string \" Eliminate All Enemy Forces\""
  795. level.PObjective3 ifequal 0 %missioncon conapplayout "xv -118 yv 24 spicn b_blank 0.5 0.5 xv -116 yv 24 fc 0.7 0.7 0.7 1 string \" Gain Entry Into The Bank\""
  796.  
  797. level.PObjective1 ifequal 1 %missioncon conapplayout "xv -118 yv 48 spicn b_checked 0.5 0.5 xv -116 yv 48 fc 0.3 0.3 0.3 1 string \" Destroy Rocket Turrets\""
  798. level.PObjective2 ifequal 1 %missioncon conapplayout "xv -118 yv 36 spicn b_checked 0.5 0.5 xv -116 yv 36 fc 0.3 0.3 0.3 1 string \" Eliminate All Enemy Forces\""
  799. level.PObjective3 ifequal 1 %missioncon conapplayout "xv -118 yv 24 spicn b_checked 0.5 0.5 xv -116 yv 24 fc 0.3 0.3 0.3 1 string \" Gain Entry Into The Bank\""
  800.  
  801. level.PObjective1 ifequal 2 %missioncon conapplayout "xv -118 yv 48 spicn b_notchecked 0.5 0.5 xv -116 yv 48 fc 0.3 0.3 0.3 1 string \" Destroy Rocket Turrets\""
  802. level.PObjective2 ifequal 2 %missioncon conapplayout "xv -118 yv 36 spicn b_notchecked 0.5 0.5 xv -116 yv 36 fc 0.3 0.3 0.3 1 string \" Eliminate All Enemy Forces\""
  803. level.PObjective3 ifequal 2 %missioncon conapplayout "xv -118 yv 24 spicn b_notchecked 0.5 0.5 xv -116 yv 24 fc 0.3 0.3 0.3 1 string \" Gain Entry Into The Bank\""
  804.  
  805. %missioncon conapplayout "xv -120 yv 0 fc 0.4 0.4 0.8 1 string \"Secondary Objective(s):\""
  806. level.SObjective1 ifequal 0 %missioncon conapplayout "xv -118 yv -12 spicn b_blank 0.5 0.5 xv -116 yv -12 fc 0.7 0.7 0.7 1 string \" Minimize Hardcorp Casualties\""
  807. level.SObjective1 ifequal 1 %missioncon conapplayout "xv -118 yv -12 spicn b_checked 0.5 0.5 xv -116 yv -12 fc 0.3 0.3 0.3 1 string \" Minimize Hardcorp Casualties\""
  808. level.SObjective1 ifequal 2 %missioncon conapplayout "xv -118 yv -12 spicn b_notchecked 0.5 0.5 xv -116 yv -12 fc 0.3 0.3 0.3 1 string \" Minimize Hardcorp Casualties\""
  809. end
  810.  
  811. //==========================================
  812. // Billboard destroyed thread1
  813. //==========================================
  814. billboard_thread:
  815.     $billboard hide
  816.     $billboard2 bind $billboard
  817.     $fountain_flood time .1
  818.     $fountain_flood moveDown 10
  819.     waitFor $fountain_flood
  820.     game.intro_billboard_fall ifequal 0 game.intro_billboard_fall = 1
  821.     $billboard_left ondamage billboard_fall_sequence_left
  822.     $billboard_right ondamage billboard_fall_sequence_right
  823.     pause
  824.  
  825. billboard_fall_sequence_left:
  826.     $billboard_left nodamage
  827.     $billboard_right nodamage
  828.     game.intro_billboard_fall = 2
  829.     wait .3
  830.     $billboard time .4
  831.     $billboard rotateXdown 56
  832.     $billboard moveWest 64
  833.     $billboard moveDown 30
  834.     waitFor $billboard
  835.     $billboard time .7
  836.     $billboard rotateXdown 98
  837.     $billboard rotateZup 5
  838.     $billboard moveDown 495
  839.     $billboard moveSouth 16
  840.     $billboard moveWest 128
  841.     waitFor $billboard
  842.     $billboard time .5
  843.     $billboard rotateXdown 85
  844.     $billboard rotateZup 5
  845.     $billboard moveDown 495
  846.     $billboard moveSouth 16
  847.     $billboard moveWest 128
  848.     waitFor $billboard
  849.     $billboard time .4
  850.     $billboard rotateXdown 71
  851.     $billboard rotateZup 5
  852.     $billboard moveDown 490
  853.     $billboard moveSouth 16
  854.     $billboard moveWest 107
  855.     waitFor $billboard
  856.     $billboard playsound impact/crates/crate3.wav 3.0
  857.     $glass1 remove
  858.     $glass2 shatter "0 0 0" 25 10 75 .5 0
  859.     $glass3 remove
  860.     $glass2 remove
  861.     $window_bar1 time .5
  862.     $window_bar1 moveDown 368
  863.     $window_bar1 rotateXup 22
  864.     $window_bar1 rotateYup 30
  865.     $window_bar1 moveWest 16
  866.     waitFor $window_bar1
  867.      goto bottom1
  868.  
  869.  
  870. //==========================================
  871. // Billboard destroyed thread2
  872. //==========================================
  873. billboard_fall_sequence_right:
  874.     $billboard_left nodamage
  875.     $billboard_right nodamage
  876.     game.intro_billboard_fall = 3
  877.     wait .3
  878.     $billboard time .4
  879.     $billboard rotateXdown 56
  880.     $billboard moveWest 64
  881.     $billboard moveDown 30
  882.     waitFor $billboard
  883.     $billboard time .7
  884.     $billboard rotateXdown 98
  885.     $billboard rotateZup 5
  886.     $billboard moveDown 495
  887.     $billboard moveSouth 16
  888.     $billboard moveWest 128
  889.     waitFor $billboard
  890.     $billboard time .5
  891.     $billboard rotateXdown 85
  892.     $billboard rotateZup 5
  893.     $billboard moveDown 495
  894.     $billboard moveSouth 16
  895.     $billboard moveWest 128
  896.     waitFor $billboard
  897.     $billboard time .4
  898.     $billboard rotateXdown 71
  899.     $billboard rotateZup 5
  900.     $billboard moveDown 490
  901.     $billboard moveSouth 16
  902.     $billboard moveWest 107
  903.     waitFor $billboard
  904.     $billboard playsound impact/crates/crate3.wav 3.0
  905.     $glass2 shatter "0 0 0" 25 10 75 .5 0
  906.     $glass1 remove
  907.     $glass2 remove
  908.     $glass3 remove
  909.     wait .2
  910.     $billboard time .7
  911.     $window_bar1 time .7
  912.     $window_bar2 time .7
  913.     $window_bar1 moveDown 368
  914.     $window_bar1 rotateXup 22
  915.     $window_bar1 rotateYdown 15
  916.     $window_bar1 moveWest 16
  917.     $window_bar2 moveDown 368
  918.     $window_bar2 rotateXup 22
  919.     $window_bar2 rotateYup 30
  920.     $window_bar2 moveWest 16
  921.     $billboard moveDown 356
  922.     $billboard rotateXup 20
  923.     $billboard rotateZdown 20
  924.     waitFor $billboard
  925.     $fountain_flood time 15
  926.     $fountain_flood moveUp 15
  927.     thread bottom2
  928.     waitFor $fountain_flood
  929.      end
  930.  
  931. bottom1:
  932.       thread dialog::jc_dead_billboard1
  933.     local.waitforthread = parm.previousthread
  934.     waitForThread parm.previousthread
  935.      end
  936.  
  937. bottom2:
  938.     thread dialog::jc_dead_billboard1
  939.     local.waitforthread = parm.previousthread
  940.     waitForThread parm.previousthread
  941.      end
  942.  
  943.  
  944. //==========================================
  945. // Awning at entrance setup thread
  946. //==========================================
  947. bank_entrance_thread:
  948.     $pillar time .6
  949.     $awning1 time .6
  950.     $awning2 time .6
  951.     $awning3 time .6
  952.     $pillar ontrigger bank_entrance_collapse
  953.     pause
  954.  
  955. bank_entrance_collapse:
  956.     $pillar notrigger
  957.     $awning2 shatter "0 0 0" 25 10 75 .10 0
  958.     $pillar rotateZdown 45
  959.     waitFor $pillar
  960.     $pillar rotateZdown 45
  961.     $awning1 rotateZup 45
  962.     $awning2 moveDown 128
  963.     waitFor $awning2
  964.     $awning3 moveDown 100
  965.     $awning1 moveDown 128
  966.     $awning2 moveDown 128
  967.     $awning1 moveSouth 32
  968.     $awning2 rotateZdown 15
  969.     waitFor $awning2
  970.      end
  971.  
  972. pillar:
  973.     $awning2    ondamage start_pillar
  974.     $awning1    ondamage start_pillar
  975.     $pillar ondamage start_pillar
  976.     pause
  977.  
  978. start_pillar:
  979.     $pillar    nodamage
  980.     $awning2    nodamage
  981.     $awning1    nodamage
  982.     trigger $pillar
  983.         level.piller = 2
  984.     level.SObjective1 = 1
  985.     thread MissionComputer
  986.     thread global/universal_script.scr::SObjectiveComplete
  987.      end
  988.  
  989. //==========================================
  990. // Ammo box #1
  991. //==========================================
  992. ammo1_thread:
  993.     $ammo1_roof time 1
  994.     $ammo1 ondamage ammo1_sequence
  995.     pause
  996.  
  997. ammo1_sequence:
  998.     $ammo1 nodamage
  999.     trigger $ammo1_explode
  1000.     $ammo1 shatter "0 0 0" 75 10 75 .2 0
  1001.     wait .2
  1002.     $ammo1 notsolid
  1003.     $ammo1 hide
  1004.     $ammo1_roof rotateXdown 15
  1005.     $ammo1_roof rotateZdown 15
  1006.     waitFor $ammo1_roof
  1007.     $ammo1_roof moveDown    128
  1008.     waitFor $ammo1_roof
  1009.      end
  1010.  
  1011. //==========================================
  1012. // Ammo box #2
  1013. //==========================================
  1014. ammo2_thread:
  1015.     game.intro_roof_break1 ifequal 0 game.intro_roof_break1 = 1
  1016.     $ammo2_roof time .5
  1017.     $ammo2_wall1 time 1.2
  1018.     $ammo2_wall2 time 1.2
  1019.     $ammo2 ondamage ammo2_sequence
  1020.     pause
  1021.  
  1022. ammo2_sequence:
  1023.     $ammo2 nodamage
  1024.     game.intro_roof_break1 = 2
  1025.     trigger $ammo2_explode
  1026.     $ammo2 shatter "0 0 0" 75 10 75 .2 0
  1027.     wait .2
  1028.     $ammo2 notsolid
  1029.     $ammo2 hide
  1030.     $ammo2_roof rotateXdown 15
  1031.     $ammo2_roof rotateZdown 15
  1032.     waitFor $ammo2_roof
  1033.     $ammo2_roof moveDown    128
  1034.     waitFor $ammo2_roof
  1035.      end
  1036.  
  1037. //------------------------------------------
  1038. //******************************************
  1039. //==========================================
  1040. // ALL HELICOPTER STUFF
  1041. //==========================================
  1042. //******************************************
  1043. //------------------------------------------
  1044.  
  1045. //==========================================
  1046. // Helicopter setup thread
  1047. //==========================================
  1048. helicopter_setup_thread:
  1049.     $rotors_brush notsolid            // Rotor origin
  1050.     $rotors_brush hide            // Rotor origin
  1051.     $rotors_brush bind $helicopter
  1052.     $heligun_origin bind $helicopter
  1053.     $blade2 bind $heligun_origin
  1054.     $heligun bind $heligun_origin
  1055.     $heli_fuckshitup bind $helicopter    // Random sound emitter
  1056.     wait .1
  1057.     $rotors bind $rotors_brush
  1058.     wait .1
  1059.     $rotors_brush time 1            // Start rotors spinning
  1060.     $rotors_brush rotateY 720
  1061.      end
  1062.  
  1063. //==========================================
  1064. // Random sounds played from heli
  1065. //==========================================
  1066. random_sounds:
  1067.     wait 10
  1068.  
  1069. random_sound_loop:
  1070.     wait 10
  1071.     local.rndsnd randomint 5
  1072.     local.rndsnd ifequal 1 goto combat_one
  1073.     local.rndsnd ifequal 2 goto combat_two
  1074.     local.rndsnd ifequal 3 goto combat_five
  1075.     local.rndsnd ifequal 4 goto combat_six
  1076.     local.rndsnd ifequal 5 goto combat_seven
  1077.      end
  1078.  
  1079. combat_one:
  1080.     parm.actor1    string    "$heli_fuckshitup"
  1081.     thread dialog::combat_one
  1082.     local.waitforthread = parm.previousthread
  1083.     waitForThread parm.previousthread
  1084.     goto random_sound_loop
  1085.      end
  1086.  
  1087. combat_two:
  1088.     parm.actor1    string    "$heli_fuckshitup"
  1089.     thread dialog::combat_two
  1090.     local.waitforthread = parm.previousthread
  1091.     waitForThread parm.previousthread
  1092.     goto random_sound_loop
  1093.      end
  1094.  
  1095. combat_five:
  1096.     parm.actor1    string    "$heli_fuckshitup"
  1097.     thread dialog::combat_five
  1098.     local.waitforthread = parm.previousthread
  1099.     waitForThread parm.previousthread
  1100.     goto random_sound_loop
  1101.      end
  1102.  
  1103. combat_six:
  1104.     parm.actor1    string    "$heli_fuckshitup"
  1105.     thread dialog::combat_six
  1106.     local.waitforthread = parm.previousthread
  1107.     waitForThread parm.previousthread
  1108.     goto random_sound_loop
  1109.      end
  1110.  
  1111. combat_seven:
  1112.     parm.actor1    string    "$heli_fuckshitup"
  1113.     thread dialog::combat_seven
  1114.     local.waitforthread = parm.previousthread
  1115.     waitForThread parm.previousthread
  1116.     goto random_sound_loop
  1117.      end
  1118.  
  1119. //==========================================
  1120. // Helicopter damage dialog thread
  1121. //==========================================
  1122. heli_damage_dialog:
  1123.     level.helidamage ifgreater 500 goto nextmessage1
  1124.     wait 1
  1125.     goto heli_damage_dialog
  1126.  
  1127. nextmessage1:
  1128.     thread dialog::pilot_hit2
  1129.  
  1130. nextmessage1a:
  1131.     level.helidamage ifgreater 900 goto nextmessage2
  1132.     wait 1
  1133.     goto nextmessage1a
  1134.  
  1135. nextmessage2:
  1136.     thread dialog::pilot_hit1
  1137.  
  1138. nextmessage2a:
  1139.     level.helidamage ifgreater 1250 goto nextmessage3
  1140.     wait 1
  1141.     goto nextmessage2a
  1142.  
  1143. nextmessage3:
  1144.     thread dialog::pilot_hit3
  1145.  
  1146. nextmessage3a:
  1147.     level.helidamage ifgreater 1550 goto nextmessage4
  1148.     wait 1
  1149.     goto nextmessage3a
  1150.  
  1151. nextmessage4:
  1152.     thread dialog::pilot_sec_airsupport
  1153.  
  1154. nextmessage4a:
  1155.     level.helidamage ifgreater 1800 goto nextmessage5
  1156.     wait 1
  1157.     goto nextmessage4a
  1158.  
  1159. nextmessage5:
  1160.     thread dialog::jc_chopper_repair
  1161.  
  1162. nextmessage5a:
  1163.     level.helidamage ifgreater 2000 goto nextmessage6
  1164.     wait 1
  1165.     goto nextmessage5a
  1166.  
  1167. nextmessage6:
  1168.     thread dialog::pilot_going_down
  1169.  
  1170. nextmessage6a:
  1171.     level.helidamage ifgreater 2500 goto fucked
  1172.     wait 1
  1173.     goto nextmessage6a
  1174.  
  1175. fucked:
  1176.     // don't kill the player during a cinematic
  1177.     level.CinematicStarted ifnotequal 0 end
  1178.     level.PlayerKilled = 1
  1179.     level.PObjective1 = 2
  1180.     level.PObjective2 = 2
  1181.     level.PObjective3 = 2
  1182.     level.SObjective1 = 2
  1183.     thread MissionComputer
  1184.     thread global/universal_script.scr::PObjectiveFailed
  1185.     cueplayer
  1186.     *1 playerkill
  1187.     wait 2.5
  1188.     *1 respawn    // brings up the load game menu
  1189.      end
  1190.  
  1191. //==========================================
  1192. // Helicopter Damage sounds
  1193. //==========================================
  1194. heli_hit:
  1195.     level.hitme_hit ifequal 1 goto heli_already_hit
  1196.     level.hitme_hit = 1
  1197.     $rotors playsound misc/null.wav 1 7
  1198.     wait .1
  1199.     $rotors playsound vehicle/helicopt/hit1.wav 2 7
  1200.     wait 3.8
  1201.     $rotors playsound vehicle/helicopt/flyloop.wav 2 7
  1202.     level.hitme_hit = 0
  1203.      end
  1204.  
  1205. heli_already_hit:
  1206.     end
  1207.  
  1208. //==========================================
  1209. // Helicopter Start moving
  1210. //==========================================
  1211. helicopter_ride_thread:            // This is called by thugs talking
  1212.     thread helicopter_setup_thread
  1213.     waitForThread parm.previousthread
  1214.  
  1215. start_copter:                // Copter coming from around the corner
  1216.     wait 2
  1217.     $helicopter followpath $path1_startintro
  1218.     wait 3
  1219.     $rotors playsound vehicle/helicopt/flyloop.wav 2 7
  1220.     waitFor $helicopter
  1221.      end
  1222.  
  1223. start_action_thread:
  1224.     hud 1
  1225.     //releaseplayer
  1226.     $helicopter lock
  1227.     $helicopter doUse *1
  1228.     $blade2    remove
  1229.     $heligun hide
  1230.     $cinematic_thug1    remove
  1231.     $cinematic_thug2    remove
  1232.     thread move_dudes_up
  1233.     releaseplayer
  1234.     fadein 1 0 0 0
  1235.     wait 1
  1236.     music normal
  1237.     thread thugs_attacked_dialog1
  1238.     thread blade_talksmack1
  1239.  
  1240. //==========================================
  1241. // Kill both thugs setup thread
  1242. // This is where the game should jump to
  1243. // if the cinematic is killed
  1244. //==========================================
  1245. kill_cinematic_thugs:
  1246.     thread hover_path
  1247.     local.deathindex = 0
  1248.     level.hoverpathover = 0
  1249.  
  1250. kill_cinematic_thugs_loop:
  1251.     $thug_death_counter ontrigger counterup
  1252.     pause
  1253.  
  1254. counterup:
  1255.     local.deathindex += 1
  1256.     local.deathindex ifequal 2 goto start_level_loop
  1257.     goto kill_cinematic_thugs_loop
  1258.      end
  1259.  
  1260. move_dudes_up:            // Lift real thugs up quake1 style :]
  1261.     $remove_me_for_guys    remove
  1262.     $move_guys_up    time    .1
  1263.     $move_guys_up    moveUp    112
  1264.     waitFor $move_guys_up
  1265.      end
  1266.  
  1267. //==========================================
  1268. // Helicopter Hover loop
  1269. //==========================================
  1270. hover_path:
  1271.     $helicopter followpath $hover_path
  1272.     waitFor $helicopter
  1273.  
  1274.     level.hoverpathover ifequal 1 goto start_heli_loop
  1275.     level.hoverpathover ifequal 0 goto hover_path
  1276.      end
  1277.  
  1278.     start_level_loop:
  1279.     level.hoverpathover = 1
  1280.      end
  1281.  
  1282. heli_loop_dialog_start:
  1283.     thread global/universal_script.scr::StatusUpdated
  1284.     local.waitforthread = parm.previousthread
  1285.     waitForThread parm.previousthread
  1286.     thread dialog::jc_remember_boss
  1287.      end
  1288.  
  1289. //==========================================
  1290. // Start helicopter main loop
  1291. //==========================================
  1292. start_heli_loop:
  1293.     thread heli_loop_dialog_start
  1294.     thread main_level_spawn_loop    // Start up main level bad guy spawn loop
  1295.     $helicopter followpath $down_path
  1296.     waitFor $helicopter
  1297.  
  1298. //==========================================
  1299. // Loop copter, check damage, etc.
  1300. //==========================================
  1301. helicopter_loop_sequence:
  1302.     $helicopter followpath $loop_path
  1303.     waitFor $helicopter
  1304.  
  1305.     level.turretsdead ifequal 5 goto helicopter_land_roof
  1306.     level.complete ifgreaterequal 2 goto helicopter_land_roof
  1307.     level.helidamage iflessequal 2000 goto helicopter_loop_sequence
  1308.  
  1309. //==========================================
  1310. // Helicopter Crashing on ground start
  1311. //==========================================
  1312. $helicopter followpath $road_path
  1313.  
  1314.     thread copter_goin_down
  1315.  
  1316.     waitFor $helicopter
  1317.     $rotors playsound misc/null.wav 1 7
  1318.     wait .1
  1319.     $rotors playsound vehicle/helicopt/hidown.wav 1.0 7
  1320.  
  1321.     thread dialog::pilot_were_down_whew_close
  1322.     $helicopter unlock
  1323.     hud 0
  1324.     trigger $rotors_brush
  1325.     fadeout 1 0 0 0
  1326.     wait 1
  1327.     //thread dialog2        // Dialog not available
  1328.     thread groundcam_thread        // Start end ground cinematic
  1329.     goto heli_end
  1330.  
  1331. //==========================================
  1332. // Helicopter lands on roof
  1333. //==========================================
  1334. helicopter_land_roof:
  1335.     level.PObjective3 = 1
  1336.     thread global/universal_script.scr::PObjectiveComplete
  1337.     thread MissionComputer
  1338.  
  1339.       $helicopter followpath $roof_path
  1340.     waitFor $helicopter
  1341.  
  1342.     thread land_roof_dialogue2_thread
  1343.  
  1344.     $helicopter stopsound
  1345.     $helicopter playsound vehicle/helicopt/hidown.wav 1.0 7
  1346.     thread roofcam_thread    // Start end roof cinematic
  1347.     trigger $rotors_brush
  1348.  
  1349. heli_end:
  1350.      end
  1351.  
  1352. //==========================================
  1353. // Helicopter monitor damage thread
  1354. //==========================================
  1355. helicopter_damage_thread:
  1356.  
  1357. helicopter_damage_start:
  1358.     $helicopter ondamage heli_damage_sequence
  1359.     $rotors ondamage heli_damage_sequence
  1360.     pause
  1361.  
  1362. heli_damage_sequence:
  1363.     $helicopter nodamage
  1364.     $rotors nodamage
  1365.     thread heli_hit        // Helicopter damage sounds
  1366.     level.helidamage += local.damage
  1367.     goto helicopter_damage_start
  1368.      end
  1369.  
  1370. //==========================================
  1371. // Helicopter Rotor Spindown
  1372. //==========================================
  1373. rotors_spin_down_thread:
  1374.     level.rotors_speed = 720
  1375.     $rotors_brush ontrigger rotors_spin_down_loop_begin
  1376.     pause
  1377.  
  1378. rotors_spin_down_loop_begin:
  1379.     $rotors_brush notrigger
  1380.     rotors_spin_down_loop:
  1381.     level.rotors_speed -= 5
  1382.     $rotors_brush rotateY level.rotors_speed
  1383.     wait .1
  1384.     level.rotors_speed ifgreater 0 goto rotors_spin_down_loop
  1385.      end
  1386.  
  1387. //==========================================
  1388. // Helicopter Goto Roof
  1389. //==========================================
  1390. roofheli_thread:
  1391.     wait 1
  1392.     $helicopter followpath $roofhelistart
  1393.     waitFor $helicopter
  1394.      end
  1395. //******************************************
  1396. //==========================================
  1397. // End of Helicopter section
  1398. //==========================================
  1399. //******************************************
  1400.  
  1401.  
  1402.  
  1403. //------------------------------------------
  1404. //******************************************
  1405. //==========================================
  1406. // LEVEL DIALOG THREADS
  1407. //==========================================
  1408. //******************************************
  1409. //------------------------------------------
  1410.  
  1411. //==========================================
  1412. // Thugs Talking at start of action
  1413. //==========================================
  1414. thugs_attacked_dialog1:
  1415.     parm.thug1    string    "$dialog_airattack"
  1416.     thread dialog::thug_air_attack
  1417.      end
  1418.  
  1419. thugs_attacked_dialog2:
  1420.     parm.thug1    string    "$dialog_runforcover"
  1421.     thread dialog::thug_get_to_launchers1
  1422.  
  1423. blade_talksmack1:
  1424.     wait 2
  1425.     thread dialog::blade_not_so_fast
  1426.      end
  1427.  
  1428. //==========================================
  1429. // Pilot says "copter goin down!"
  1430. //==========================================
  1431. copter_goin_down:
  1432.     thread dialog::pilot_controls_arent_responding
  1433.     local.waitforthread = parm.previousthread
  1434.     waitForThread parm.previousthread
  1435.     thread dialog::blade_uh_oh
  1436.     wait 2
  1437.     thread dialog::pilot_hang_on1
  1438.      end
  1439.  
  1440. dialog2:
  1441.     wait 3
  1442.     thread dialog::jc_get_in_there
  1443.      end
  1444.  
  1445. land_roof_dialogue1_thread:
  1446.     wait 2
  1447.     thread dialog::jc_rooftop_landin
  1448.     local.waitforthread = parm.previousthread
  1449.     waitForThread parm.previousthread
  1450.      end
  1451.  
  1452. land_roof_dialogue2_thread:
  1453.     thread dialog::pilot_drop_and_dust
  1454.      end
  1455.  
  1456. //------------------------------------------
  1457. //******************************************
  1458. //==========================================
  1459. // LEVEL GAMEPLAY AND LOGIC
  1460. //==========================================
  1461. //******************************************
  1462. //------------------------------------------
  1463.  
  1464. //==========================================
  1465. // Temp scriptobject for turret death level variables
  1466. //==========================================
  1467. turret1_deathreport:
  1468.     $turret1_dead    ontrigger    1change
  1469.     pause
  1470.  
  1471. 1change:
  1472.     $turret1_dead    remove
  1473.     level.turret1_nuked = 1
  1474.      end
  1475.  
  1476. turret2_deathreport:
  1477.     $turret2_dead    ontrigger    2change
  1478.     pause
  1479.  
  1480. 2change:
  1481.     $turret2_dead    remove
  1482.     level.turret2_nuked = 1
  1483.      end
  1484.  
  1485. turret3_deathreport:
  1486.     $turret3_dead    ontrigger    3change
  1487.     pause
  1488.  
  1489. 3change:
  1490.     $turret3_dead    remove
  1491.     level.turret3_nuked = 1
  1492.      end
  1493.  
  1494. //==========================================
  1495. // Main level Loop (for spawning characters.
  1496. // and randomly choosing stuff to happen in
  1497. // the streets)
  1498. //==========================================
  1499. main_level_spawn_loop:
  1500.     level.complete ifgreater 0 thread spawn_levelisdone
  1501.     level.complete ifgreater 0 goto end_main
  1502.     thread spawn_check_bad_guys
  1503.     wait 3
  1504.     goto main_level_spawn_loop
  1505.  
  1506. end_main:
  1507.      end
  1508.  
  1509. //==========================================
  1510. // Psyco spawn BAD GUY checking thread
  1511. //==========================================
  1512. spawn_check_bad_guys:
  1513.     level.count_bad_guys ifequal 3 goto spawn_check_end
  1514.     goto spawn_roof_check
  1515.      end
  1516.  
  1517.     //Spawn guys on roof randomness
  1518. spawn_roof_check:
  1519.     local.rndroof randomint 100
  1520.     local.rndroof iflessequal 33 goto turret1_startspawn
  1521.     local.rndroof ifgreater 33 goto more_roof_rnd
  1522.  
  1523. more_roof_rnd:
  1524.     local.rndroof iflessequal 66 goto turret2_startspawn
  1525.     local.rndroof ifgreater 66 goto turret3_startspawn
  1526.      end
  1527.  
  1528. turret1_startspawn:
  1529.     level.turret1_active ifequal 1 goto spawn_guythere
  1530.     level.turret1_nuked ifequal 1 goto spawn_guythere
  1531.     level.turret1_active ifequal 0 thread spawn_guy_at_turret1
  1532.      end
  1533.  
  1534. turret2_startspawn:
  1535.     level.turret2_active ifequal 1 goto spawn_guythere
  1536.     level.turret2_nuked ifequal 1 goto spawn_guythere
  1537.     level.turret2_active ifequal 0 thread spawn_guy_at_turret2
  1538.      end
  1539.  
  1540. turret3_startspawn:
  1541.     level.turret3_active ifequal 1 goto spawn_guythere
  1542.     level.turret3_nuked ifequal 1 goto spawn_guythere
  1543.     level.turret3_active ifequal 0 thread spawn_guy_at_turret3
  1544.      end
  1545.  
  1546. spawn_levelisdone:
  1547.     level.count_bad_guys ifequal 0 goto obj2_done
  1548.     wait 1
  1549.     goto spawn_levelisdone
  1550.  
  1551. obj2_done:
  1552.     level.complete += 1
  1553.     level.PObjective2 = 1
  1554.     thread MissionComputer
  1555.     thread global/universal_script.scr::PObjectiveComplete
  1556.     wait 1
  1557.     thread land_roof_dialogue1_thread    // Turrets dead, no more baddies
  1558.      end
  1559.  
  1560. spawn_check_end:    // Enough Bad guys
  1561.      end
  1562.  
  1563. spawn_guythere:        // Bad guy already there
  1564.      end
  1565.  
  1566. //==========================================
  1567. //==========================================
  1568. // Turret counter and level.complete state.
  1569. //==========================================
  1570. turret_death_wait:
  1571.     local.turret_death_index = 0
  1572.  
  1573. turret_death_loop:
  1574.     $turret_death_counter    ontrigger    count_turret
  1575.     pause
  1576.  
  1577. count_turret:
  1578.     $turret_death_counter    notrigger
  1579.     local.turret_death_index += 1
  1580.     local.turret_death_index ifequal 3 goto turrets_dead
  1581.     local.turret_death_index ifequal 1 thread dialog::pilot_nice_shooting
  1582.     local.turret_death_index ifequal 2 thread dialog::jc_way_to_hit
  1583.     goto turret_death_loop
  1584.  
  1585. turrets_dead:
  1586.     level.turretsdead = 5
  1587.     level.PObjective1 = 1
  1588.     thread MissionComputer
  1589.     thread global/universal_script.scr::PObjectiveComplete
  1590.     level.complete += 1
  1591.      end
  1592.  
  1593. //==========================================
  1594. // Spawn People in to turrets
  1595. //==========================================
  1596. // Removed window guys Spawn code 9/29
  1597. //==========================================
  1598. spawn_guy_at_turret1:        // Thug1 dude
  1599.     trigger $spawner1
  1600.     level.count_bad_guys += 1
  1601.     level.turret1_active = 1
  1602.     wait .1
  1603.     $thug1    thread thug1_setstates
  1604.     wait 2
  1605.     trigger $thug1
  1606.      end
  1607.  
  1608. thug1_setstates:
  1609.     local.self    ignore    runtoarea
  1610.     local.self    ignore    doorsound mutantsound voicesound machinesound radiosound
  1611.     local.self    ignore    weaponsound movementsound painsound deathsound breakingsound
  1612.     local.self    ignore    attackentity use sightenemy
  1613.  
  1614.     local.self    definestate    activate    thug1_activated
  1615.     local.self    definestate    killed    thug1_killed
  1616.     local.self    definestate    idle    thug1_idle
  1617.  
  1618.     local.self    state    idle
  1619.  
  1620.     pause
  1621.  
  1622. thug1_idle:
  1623.     local.self    anim    idle
  1624.     waitFor local.self
  1625.     pause
  1626.     goto thug1_idle
  1627.  
  1628. thug1_activated:
  1629.     $door1    open $thug1
  1630.     local.self      ignore  activate
  1631.     local.self    runto    $turret1_path1
  1632.     waitFor local.self
  1633.     local.self    runto    $turret1_path2
  1634.     waitFor local.self
  1635.     $turret1    activate
  1636.     local.self    anim    manrocket1
  1637.     pause
  1638.      end
  1639.  
  1640. thug1_killed:
  1641.     $turret1    deactivate
  1642.     level.turret1_active = 0
  1643.     level.count_bad_guys -= 1
  1644.      end
  1645.  
  1646. spawn_guy_at_turret2:        // Thug2 dude
  1647.     trigger $spawner2
  1648.     level.count_bad_guys += 1
  1649.     level.turret2_active = 1
  1650.     wait .1
  1651.     $thug2    thread thug2_setstates
  1652.     wait 2
  1653.     trigger $thug2
  1654.      end
  1655.  
  1656. thug2_setstates:
  1657.     local.self    ignore    runtoarea
  1658.     local.self    ignore    doorsound mutantsound voicesound machinesound radiosound
  1659.     local.self    ignore    weaponsound movementsound painsound deathsound breakingsound
  1660.     local.self    ignore    attackentity use sightenemy
  1661.  
  1662.     local.self    definestate    activate    thug2_activated
  1663.     local.self    definestate    killed    thug2_killed
  1664.     local.self    definestate    idle    thug2_idle
  1665.  
  1666.     local.self    state    idle
  1667.  
  1668.     pause
  1669.  
  1670. thug2_idle:
  1671.     local.self    anim    idle
  1672.     waitFor local.self
  1673.     pause
  1674.     goto thug2_idle
  1675.  
  1676. thug2_activated:
  1677.     $door2    open $thug2
  1678.     local.self      ignore  activate
  1679.     local.self    runto    $turret2_path1
  1680.     waitFor local.self
  1681.     local.self    runto    $turret2_path2
  1682.     waitFor local.self
  1683.     $turret2    activate
  1684.     local.self    anim    manrocket1
  1685.     pause
  1686.      end
  1687.  
  1688. thug2_killed:
  1689.     $turret2    deactivate
  1690.     level.turret2_active = 0
  1691.     level.count_bad_guys -= 1
  1692.     //thread spawn_guy_at_turret2
  1693.     end
  1694.  
  1695. spawn_guy_at_turret3:        // Thug3 dude
  1696.     trigger $spawner3
  1697.     level.count_bad_guys += 1
  1698.     level.turret3_active = 1
  1699.     wait .1
  1700.     $thug3    thread thug3_setstates
  1701.     wait 2
  1702.     trigger $thug3
  1703.      end
  1704.  
  1705. thug3_setstates:
  1706.     local.self    ignore    runtoarea
  1707.     local.self    ignore    doorsound mutantsound voicesound machinesound radiosound
  1708.     local.self    ignore    weaponsound movementsound painsound deathsound breakingsound
  1709.     local.self    ignore    attackentity use sightenemy
  1710.  
  1711.     local.self    definestate    activate    thug3_activated
  1712.     local.self    definestate    killed    thug3_killed
  1713.     local.self    definestate    idle    thug3_idle
  1714.  
  1715.     local.self    state    idle
  1716.  
  1717.     pause
  1718.  
  1719. thug3_idle:
  1720.     local.self    anim    idle
  1721.     waitFor local.self
  1722.     pause
  1723.     goto thug3_idle
  1724.  
  1725. thug3_activated:
  1726.     $door3    open $thug3
  1727.     local.self      ignore  activate
  1728.     local.self    runto    $turret3_path1
  1729.     waitFor local.self
  1730.     local.self    runto    $turret3_path2
  1731.     waitFor local.self
  1732.     $turret3    activate
  1733.     local.self    anim    manrocket1
  1734.     pause
  1735.      end
  1736.  
  1737. thug3_killed:
  1738.     $turret3    deactivate
  1739.     level.turret3_active = 0
  1740.     level.count_bad_guys -= 1
  1741.     //thread spawn_guy_at_turret3
  1742.      end
  1743.  
  1744. precache:
  1745.   cachesound "environment/alarm/police/siren2.wav"
  1746.   cachesound "environment/alarm/police/siren2down.wav"
  1747.   cachesound "impact/comp_explode/cmpmx3.wav"
  1748.   cachesound "impact/crates/crate3.wav"
  1749.   cachesound "misc/null.wav"
  1750.   cachesound "vehicle/helicopt/hit1.wav"
  1751.   cachesound "vehicle/helicopt/flyloop.wav"
  1752.   cachesound "vehicle/helicopt/hidown.wav"
  1753.   cachesound "vehicle/atv/strt.wav"
  1754.   cachesound "vehicle/humvee/skid.wav"
  1755. end
  1756.  
  1757. LevelComplete:
  1758. // Clears any items in the player's inventory that need to be removed
  1759. thread global/universal_script.scr::ClearInventory
  1760.  
  1761. // Any objectives that haven't been set to Success or Fail should be set
  1762. // here. This usually is for things like "Eliminate All Hostile Forces"
  1763. // All Objectives need to be set to Success or Fail by the end of the
  1764. // map. This should be automatic for the most part but if you
  1765. // Find any that aren't, we need to figure out what to do with them.
  1766. level.SObjective1 ifnotequal 1 level.SObjective1 = 2
  1767. level.PObjective1 ifnotequal 1 level.PObjective1 = 2
  1768. level.PObjective2 ifnotequal 1 level.PObjective2 = 2
  1769. level.PObjective3 ifnotequal 1 level.PObjective3 = 1
  1770.  
  1771. // Set up the Primary Objectives
  1772. local.IMString string "oxl 2 oyt -32 fc 0.53 0.53 0.83 1 string \"Primary Objective(s):\""
  1773.  
  1774. level.PObjective1 ifequal 1 local.IMString append "oxl 6 oyt -42 spicn b_checked 0.5 0.5 oxl 18 oyt -42 fc 0.6 0.6 0.6 1 string \"Destroy Rocket Turrets\""
  1775. level.PObjective2 ifequal 1 local.IMString append "oxl 6 oyt -52 spicn b_checked 0.5 0.5 oxl 18 oyt -52 fc 0.6 0.6 0.6 1 string \"Eliminate All Enemy Forces\""
  1776. level.PObjective3 ifequal 1 local.IMString append "oxl 6 oyt -62 spicn b_checked 0.5 0.5 oxl 18 oyt -62 fc 0.6 0.6 0.6 1 string \"Gain Entry Into The Bank\""
  1777.  
  1778. level.PObjective1 ifequal 2 local.IMString append "oxl 6 oyt -42 spicn b_notchecked 0.5 0.5 oxl 18 oyt -42 fc 0.6 0.6 0.6 1 string \"Destroy Rocket Turrets\""
  1779. level.PObjective2 ifequal 2 local.IMString append "oxl 6 oyt -52 spicn b_notchecked 0.5 0.5 oxl 18 oyt -52 fc 0.6 0.6 0.6 1 string \"Eliminate All Enemy Forces\""
  1780. level.PObjective3 ifequal 2 local.IMString append "oxl 6 oyt -62 spicn b_notchecked 0.5 0.5 oxl 18 oyt -62 fc 0.6 0.6 0.6 1 string \"Gain Entry Into The Bank\""
  1781.  
  1782.  
  1783. // Set up the Secondary Objectives
  1784. local.IMString append "oxl 2 oyt -82 fc 0.53 0.53 0.83 1 string \"Secondary Objective(s):\""
  1785.  
  1786. level.SObjective1 ifequal 1 local.IMString append "oxl 6 oyt -92 spicn b_checked 0.5 0.5 oxl 18 oyt -92 fc 0.6 0.6 0.6 1 string \"Minimize Hardcorp Casualties\""
  1787.  
  1788. level.SObjective1 ifequal 2 local.IMString append "oxl 6 oyt -92 spicn b_notchecked 0.5 0.5 oxl 18 oyt -92 fc 0.6 0.6 0.6 1 string \"Minimize Hardcorp Casualties\""
  1789.  
  1790. // Send over the information that Scott needs to load the proper intermission
  1791. level.intermissiontype ifequal 1 loadintermission "layouts/im_layouts/intro_to_bank_B"
  1792. level.intermissiontype ifequal 2 loadintermission "layouts/im_layouts/intro_to_bank_A"
  1793. intermissionlayout local.IMString
  1794. end