home *** CD-ROM | disk | FTP | other *** search
/ PowerPlay 1998 July / PowerPlay0798.bin / Demos / incoming.exe / asc / moon / moon_action.mdl < prev    next >
Text File  |  1998-04-07  |  62KB  |  2,935 lines

  1. drag_coeff    0.01        
  2. gravity        1.0
  3.  
  4. #=====================================================
  5. # Weapons ODL
  6.  
  7. ;GREEN ENERGY LASER    hitpoints    30
  8. ;GREEN LASER         hitpoints    32
  9. ;BLUE LASER            hitpoints    16
  10. ;RED LASER            hitpoints    24
  11. ;PURPLE LASER        hitpoints    12
  12.  
  13. ;PLASMA BOLT 1        hitpoints    30
  14. ;PLASMA BOLT 2        hitpoints    25
  15. ;PLASMA BOLT 3        hitpoints    15
  16. ;PLASMA BOLT 4        hitpoints    20
  17.  
  18. ;ROCKET 1            hitpoints    150
  19. ;ROCKET 2            hitpoints    500
  20. ;GUIDED MISSILE        hitpoints    120
  21. ;TRACER SHOT 1        hitpoints    110
  22.  
  23. ;BOMB 1                hitpoints    500
  24. ;DESIGNATOR            hitpoints    0
  25. ;FOAM                hitpoints    0
  26.  
  27. ;ENERGY 1            hitpoints    150
  28. ;ENERGY 2            hitpoints    50
  29.  
  30. ;BIG SHELL            hitpoints    32
  31. #=====================================================
  32.  
  33. ;-------------------------------------------------------
  34. refuel_pads
  35.     "AH1"
  36.     "AH2"
  37.  
  38.  
  39. create hero "bug"
  40.     label "P1hero"
  41.     position 28317.6 -78 14188.3
  42.     forward -0.79 0 -0.61 up 0 1 0
  43.     armed_with "GREEN LASER"    rate 4
  44.     secondary_armed_with "ENERGY 1" rate 16 rounds 20
  45.     task
  46.         wait_until flag 0 set
  47.         playercontrols
  48.             break_task_if flag 31 set
  49.         stop
  50.  
  51.         wait_until flag 31 clear
  52.  
  53.         position 28317.6 -78 14188.3
  54.     end
  55.  
  56.  
  57. create "mobspgun"
  58.     label "laser1"
  59.     position 23614 -503 15269 
  60.     forward 0.8 0 0.5 up 0 1 0
  61.     armed_with "GREEN LASER" rate 3
  62.     inert
  63.  
  64. create "mobsprack"
  65.     position 23681 -506 14084 
  66.     forward 0.5 0 0.8 up 0 1 0
  67.     armed_with "GUIDED MISSILE"    rate 32
  68.     task
  69.         slave_to "laser1"
  70.     end
  71.  
  72. create "mobspgun"
  73.     label "laser2"
  74.     position 34426 -1499 13853
  75.     forward 0.5 0 0.8 up 0 1 0
  76.     armed_with "GREEN LASER" rate 3
  77.     inert
  78.  
  79. create "mobsprack"
  80.     label "P8rack"
  81.     position 34491 -1497 12739
  82.     forward 0.5 0 0.8 up 0 1 0
  83.     armed_with "GUIDED MISSILE"    rate 32
  84.     inert
  85.  
  86. ;-----------------small shields---------------------------
  87. createstatic "sshield"
  88. no_colide "ssgen1"
  89. die_with "ssgen1"
  90. position 29480.2 on ground 37826
  91.  
  92. createstatic "sshield"
  93. no_colide "ssgen3"
  94. die_with "ssgen3"
  95. position 40500.7 on ground 53144.5
  96.  
  97. createstatic "sshield"
  98. no_colide "ssgen4"
  99. die_with "ssgen4"
  100. position 39676.7 on ground 50949.5
  101.  
  102. createstatic "sshield"
  103. no_colide "ssgen5"
  104. die_with "ssgen5"
  105. position 38239.7 on ground 52529.5
  106.  
  107. createstatic "sshield"
  108. no_colide "ssgen6"
  109. die_with "ssgen6"
  110. position 47237 on ground 23138
  111.  
  112. createstatic "sshield"
  113. no_colide "ssgen7"
  114. die_with "ssgen7"
  115. position 48237 on ground 20938
  116.  
  117. createstatic "sshield"
  118. no_colide "ssgen8"
  119. die_with "ssgen8"
  120. position 46237 on ground 20938
  121.  
  122. ;-----------------big shields---------------------------
  123. createstatic "bshield"
  124. no_colide "bsgen1"
  125. die_with "bsgen1"
  126. position 31933.8 on ground 41342.7
  127.  
  128. createstatic "bshield"
  129. no_colide "bsgen2"
  130. die_with "bsgen4"
  131. position 31933.8 on ground 34102.7
  132.  
  133. createstatic "bshield"
  134. no_colide "bsgen3"
  135. die_with "bsgen3"
  136. position 34921.8 on ground 37720.7
  137.  
  138. createstatic "bshield"
  139. no_colide "bsgen4"
  140. die_with "bsgen2"
  141. position 20193.7 on ground 53659.2
  142.  
  143. createstatic "vbshield"
  144. no_colide "bsgen5"
  145. die_with "bsgen5"
  146. position 48847.8 on ground 53587.7
  147.  
  148. createstatic "bshield"
  149. no_colide "bsgen7"
  150. die_with "bsgen7"
  151. position 44309.5 on ground 47462.7
  152.  
  153. createstatic "bshield"
  154. no_colide "bsgen8"
  155. die_with "bsgen8"
  156. position 49081 on ground 36238.2
  157.  
  158. set_inert "ssgen1"
  159. set_inert "ssgen3"
  160. set_inert "ssgen4"
  161. set_inert "ssgen5"
  162. set_inert "ssgen6"
  163. set_inert "ssgen7"
  164. set_inert "ssgen8"
  165.  
  166. set_inert "bsgen1"
  167. set_inert "bsgen2"
  168. set_inert "bsgen3"
  169. set_inert "bsgen4"
  170. set_inert "bsgen5"
  171. set_inert "bsgen7"
  172. set_inert "bsgen8"
  173.  
  174. set_inert "Aport"
  175.  
  176.  
  177. ;-------------------------------------------------------
  178. ;PHASE 1
  179. ;-------------------------------------------------------
  180.  
  181. phasestart
  182. playcdtrack 5
  183. clear_flag all
  184.  
  185. auto_aim "hero"
  186.  
  187. critical_group "ccentre"
  188.  
  189. #....................................................................
  190.     phasemessage 61 60
  191.     play_speech "defend installation"
  192. #....................................................................
  193.  
  194. hud off
  195. camera
  196.     position 600 -300 -600 relative to "hero"
  197.     pointing_at "hero"
  198.     dolly 0
  199.     pause 1
  200.  
  201. procedure "P1e"
  202.     set_waypoint nearest "aland"
  203. end_procedure
  204.  
  205. procedure "P1a"
  206.     create "atank"
  207.         position 19067.7 on ground 22866.4
  208.  
  209.         towards "hero"
  210.         armed_with "ROCKET 1" rate 64
  211.         task
  212.             goto 23950.8 on ground 17849.9
  213.             do
  214.                 goto 26130.4 on ground 14266.9
  215.                 shoot "command4"
  216.                 goto 28348.1 on ground 13026.8
  217.                 shoot "command3"
  218.                 goto 27681.8 on ground 10495.8
  219.                 shoot "command1"
  220.                 goto 25091.8 on ground 11318.9
  221.                 shoot "command2"
  222.             forever
  223.         end
  224.     pause 75
  225. end_procedure terminate after 4 loops
  226.  
  227. pause 60
  228. set_flag 0
  229.  
  230. camera cockpit
  231.  
  232. #....................................................................
  233.     phasemessage 25 60
  234.     play_speech "incoming alien craft"
  235. #....................................................................
  236.  
  237.  
  238. #==================================
  239.  
  240. procedure "P1b"
  241.     wait_until number_of "aair"<2
  242.  
  243.     create "lfighter"
  244.         position 100 -3200 15000 local toxz "hero"
  245.         towards "hero"
  246.         armed_with "RED LASER" rate 16
  247.         task
  248.             attack "hero"
  249.                 break_task_if number_of "aland"=0
  250.             attack "command1"
  251.             attack "hero"
  252.         end
  253.     pause 100
  254. end_procedure terminate after 4 loops
  255.  
  256.  
  257. procedure "P1c"
  258.     wait_until number_of "fighters"=0
  259.     create "hfighter"
  260.         position -5000 -3700 17000 local toxz "hero"
  261.         towards "hero"
  262.         armed_with "PLASMA BOLT 3" rate 32
  263.         task
  264.             do
  265.                 patrol
  266.                     point 0 -2000 0 relative to closest "aland"
  267.                         break_task_if distance_between me and "hero" <4000
  268.                             or number_of "aland"=0
  269.                 stop
  270.                 shoot "hero"
  271.             until number_of "aland" = 0
  272.             attack "hero"
  273.         end
  274.     pause 100
  275. do_procedure_until number_of "aland" = 0
  276.  
  277. wait_until proc "P1a" terminated
  278. wait_until number_of "aland" = 0
  279. end_procedure "P1e"
  280.  
  281. procedure "P1e"
  282.     set_waypoint "command1"
  283.     wait_until "command1" destroyed
  284.  
  285.     set_waypoint "command2"
  286.     wait_until "command2" destroyed
  287.  
  288.     set_waypoint "command3"
  289.     wait_until "command3" destroyed
  290.  
  291.     set_waypoint "command4"
  292.     wait_until "command4" destroyed
  293.     clear_waypoint
  294. end_procedure
  295.  
  296. #==================================
  297. wait_until proc "P1b" terminated
  298. wait_until proc "P1c" terminated
  299.  
  300. wait_until number_of "fighters" = 0
  301. wait_until number_of "aair" = 0
  302. end_procedure "P1e"
  303. clear_waypoint
  304.  
  305.  
  306. #....................................................................
  307.     phasemessage 26 60
  308.     play_speech "incoming alien fighters"
  309. #....................................................................
  310.  
  311.  
  312.  
  313. procedure "P1b"
  314.     create "lfighter"
  315.         position 100 -3200 -15000 local toxz "hero"
  316.         towards "hero"
  317.         armed_with "RED LASER" rate 16
  318.         task
  319.             attack "hero"
  320.         end
  321.     pause 50
  322. end_procedure terminate after 6 loops
  323.  
  324. wait_until proc "P1b" terminated
  325.  
  326. wait_until number_of "aair" = 0
  327.  
  328. #==================================
  329. set_flag 31
  330. set_inert "hero"
  331. #....................................................................
  332.     phasemessage 10 60
  333.     play_speech "phase complete"
  334. #....................................................................
  335.  
  336. uncritical_group "ccentre"
  337.  
  338. pause 20
  339.  
  340. hud off
  341. camera
  342.     attached_to "hero"
  343.     position 600 -300 -600
  344.     pointing_at "hero"
  345.     dolly 1
  346.     dollyspeed 0.1%
  347. pause 80
  348. clear_flag 31
  349.  
  350.  
  351. ;-------------------------------------------------------
  352. ;PHASE 2
  353. ;-------------------------------------------------------
  354.  
  355. phasestart
  356. clear_flag all
  357.  
  358. create "hovertank"
  359.     label "P2hero"
  360.     position 24871 on ground 10309.6
  361.     forward 0.57 0 0.82 up 0 1 0
  362.     armed_with "RED LASER"    rate 4
  363.     secondary_armed_with "TRACER SHOT 1" rate 32 rounds 20
  364.  
  365.  
  366. switch_hero "P2hero"
  367.     task
  368.         wait_until flag 0 set
  369.         playercontrols
  370.             break_task_if flag 10 set
  371.     end
  372.  
  373. kill "P1hero"
  374.  
  375. create "bug"
  376.     label "P2bug"
  377.     position 27227.2 -500 14517.8
  378.     towards "hero"
  379.     armed_with "GREEN LASER"    rate 4
  380.     secondary_armed_with "DESIGNATOR" rate 128 rounds 20
  381.     inert
  382.     task
  383.         do
  384.             patrol
  385.                 point 1000 -1800 0 relative to "hero"
  386.                 break_task_if distance_between me and closest "aair" <6000
  387.             stop
  388.             shoot group "aair"
  389.         until flag 10 set
  390.         goto 0 -2000 0 relative to "hero"
  391.     end
  392.  
  393. create "alnadubs"
  394.     label "gun3"
  395.     position 26882.1 on ground 40742.8
  396.     forward 0 0 -1 up 0 1 0
  397.     armed_with "GREEN ENERGY LASER" rate 24
  398.     task
  399.         attack
  400.     end
  401.  
  402. create "alnadubs"
  403.     label "gun8"
  404.     position 25026.1 on ground 49973.9
  405.     forward 0 0 1 up 0 1 0
  406.     armed_with "GREEN ENERGY LASER" rate 24
  407.     task
  408.         attack
  409.     end
  410.  
  411.  
  412. hud off
  413. camera
  414.     position 600 -300 -600 relative to "hero"
  415.     pointing_at "hero"
  416. dolly 0
  417. pause 1
  418.  
  419. pause 40
  420. set_flag 0
  421.  
  422. camera cockpit
  423.  
  424. #....................................................................
  425.     phasemessage 57 60
  426.     play_speech "destroy alien surface craft"
  427. #....................................................................
  428.  
  429.  
  430. #==================================
  431.  
  432. create "facraft"
  433.     position 22660.2 on ground 28148.3
  434.     towards "hero"
  435.     armed_with "RED LASER"    rate 16
  436.     task
  437.         wait_until distance_between me and "hero" < 7000
  438.         attack "hero"
  439.     end
  440.  
  441. create "facraft"
  442.     position 23689.4 on ground 22977
  443.     towards "hero"
  444.     armed_with "TRACER SHOT 1" rate 128
  445.     task
  446.         wait_until distance_between me and "hero" < 7000
  447.         attack "hero"
  448.     end
  449.  
  450.  
  451. create "facraft"
  452.     position 29410.6 on ground 23134.3
  453.     towards "hero"
  454.     armed_with "RED LASER"    rate 16
  455.     task
  456.         wait_until distance_between me and "hero" < 7000
  457.         attack "hero"
  458.     end
  459.  
  460. procedure "P2wp"
  461.     set_waypoint nearest "aland"
  462. end_procedure
  463.  
  464. procedure "P2a"
  465.     wait_until number_of "aair"=0
  466.     create "lfighter"
  467.         position 0 -3200 17000 relative to "hero"
  468.         towards "hero"
  469.         armed_with "RED LASER"    rate 32
  470.         task
  471.             attack "hero"
  472.         end
  473.  
  474.     pause 100
  475. end_procedure
  476.  
  477. wait_until distance_between "hero" and 26962.4 on ground 34777.2 <9000
  478. or number_of "aland"=0
  479.  
  480. procedure "P2b"
  481.     create "facraft"
  482.         position 12962.2 on ground 37364.2
  483.         towards "command1"
  484.         armed_with "RED LASER"    rate 16
  485.         task
  486.             goto 17585.1 on ground 31390.8
  487.             attack "hero"
  488.         end
  489.  
  490.     pause 150
  491. end_procedure terminate after 4 loops
  492.  
  493. wait_until proc "P2b" terminated
  494. wait_until number_of "aland" = 0
  495. end_procedure "P2wp"
  496. end_procedure "P2a"
  497. wait_until number_of "aair" = 0
  498.  
  499. #....................................................................
  500.     phasemessage 58 60
  501.     play_speech "destroy alien AT-AT guns"
  502. #....................................................................
  503.  
  504.  
  505. procedure "P2b"
  506.     set_waypoint nearest "agun"
  507. end_procedure
  508.  
  509. wait_until number_of "agun" = 0
  510. end_procedure "P2b"
  511. kill group "aair"
  512. clear_waypoint
  513. #==================================
  514. set_flag 10
  515. set_inert "hero"
  516. #....................................................................
  517.     phasemessage 10 60
  518.     play_speech "phase complete"
  519. #....................................................................
  520.  
  521.  
  522. camera cockpit
  523. pause 60
  524.  
  525. ;-------------------------------------------------------
  526. ;PHASE 3
  527. ;-------------------------------------------------------
  528.  
  529. phasestart
  530. playcdtrack 8
  531.  
  532. clear_flag all
  533. set_volatile "ssgen1"
  534.  
  535.  
  536. camera_task
  537.     hud off
  538.     cam_pos "hero"
  539.     cam_focus "P2bug"
  540.     dolly 1
  541.  
  542.     pause 150
  543.     cam_mode cockpit
  544.     set_flag 0
  545. end
  546.  
  547. switch_hero "P2bug"
  548.     task
  549.         goto 0 -3500 0 relative toxz "P2hero"
  550.             break_task_if flag 0 set
  551.         playercontrols
  552.             break_task_if flag 31 set
  553.  
  554.         wait_until flag 31 clear
  555.         kill
  556.     end
  557. wait_until flag 0 set
  558. auto_aim "hero"
  559. kill "P2hero"
  560.  
  561. #....................................................................
  562.     phasemessage 26 60
  563.     play_speech "incoming alien fighters"
  564. #....................................................................
  565.  
  566.  
  567. #==================================
  568. procedure "P3e"
  569.     wait_until "P2bld" destroyed
  570.  
  571.     camera_task
  572.         hud off
  573.         cam_pos -6000 -3500 0 attached_to "P2bld"
  574.         cam_focus "P2bld"
  575.         dolly 0
  576.         cam_goto 6000 -3500 0
  577.     end
  578.  
  579.     explode group "aliens"
  580.     pause 50
  581.     explode group "aliens"
  582.     pause 50
  583.     camera cockpit         
  584. end_procedure terminate after 1 loops
  585.  
  586.  
  587. procedure "P3a"
  588.  
  589.     wait_until number_of "bombers" =0
  590.     create "lbomber"
  591.         position 10000 -3500 1000 relative toxz "pad2"
  592.         towards "pad2"
  593.         armed_with "PLASMA BOLT 1"    rate 24
  594.         task
  595.             do
  596.                 goto 0 -3500 0 relative toxz "hero"
  597.                     break_task_if distance_between me and "hero" < 3000
  598.                 shoot "hero"
  599.             forever
  600.         end
  601.     pause 75
  602. end_procedure terminate after 2 loops
  603.  
  604.  
  605. procedure "P3b"
  606.     create "lfighter"
  607.         position 2000 -9000 5000 relative toxz "pad2"
  608.         towards "pad2"
  609.         armed_with "PLASMA BOLT 3"    rate 0
  610.         task
  611.             goto 0 -4200 0 relative toxz "pad2"
  612.             do
  613.                 goto 27051.9 -3430.29 30302.5
  614.                 shoot "hero"
  615.                 goto 25602.4 -3346.02 41119.4
  616.                 shoot "hero"
  617.                 goto 32723.3 -3155.91 46495.4
  618.                 shoot "hero"
  619.                 goto 40765 -3081.51 39478.8
  620.                 shoot "hero"
  621.             forever
  622.  
  623.         end
  624.     pause 150
  625. end_procedure terminate after 4 loops
  626.  
  627.  
  628. wait_until proc "P3a" terminated
  629. wait_until number_of "aair" = 0
  630. wait_until number_of "bombers" = 0
  631. end_procedure "P3b"
  632.  
  633.  
  634. ;----------------
  635. ;-------1st pad
  636. #....................................................................
  637.     phasemessage 53 60
  638.     play_speech "destroy shield generator"
  639. #....................................................................
  640.  
  641. set_volatile "bsgen4"
  642. set_waypoint "bsgen4"
  643. wait_until "bsgen4" destroyed
  644.  
  645. #....................................................................
  646.     phasemessage 52 60
  647.     play_speech "destroy alien installation"
  648. #....................................................................
  649.  
  650. set_waypoint "pad2"
  651.  
  652. procedure "P3a"
  653.     wait_until number_of "fighters" <4
  654.     create "hfighter"
  655.         position 32110 -845 34375
  656.         towards 29449 -2943 31420
  657.         armed_with "RED LASER"    rate 16
  658.         task
  659.             goto 29449 -2943 31420
  660.             attack "hero"
  661.         end
  662.     pause 75
  663. end_procedure
  664.  
  665. wait_until "pad2" destroyed
  666. end_procedure "P3a"
  667. clear_waypoint
  668. #....................................................................
  669.     phasemessage 55 60
  670.     play_speech "destroy all alien craft"
  671. #....................................................................
  672.  
  673. wait_until number_of "fighters"=0
  674.  
  675. ;----------------
  676. ;-------2nd pad
  677. #....................................................................
  678.     phasemessage 53 60
  679.     play_speech "destroy shield generator"
  680. #....................................................................
  681. set_volatile "bsgen1"
  682. set_waypoint "bsgen1"
  683. wait_until "bsgen1" destroyed
  684.  
  685. #....................................................................
  686.     phasemessage 52 60
  687.     play_speech "destroy alien installation"
  688. #....................................................................
  689. set_waypoint "pad1"
  690.  
  691. procedure "P3a"
  692.     wait_until number_of "aair" <4
  693.     create "lfighter"
  694.         position 31867.9 -708.997 41033.6
  695.         towards 25677.8 -2929 41445.6
  696.         armed_with "RED LASER"    rate 16
  697.         task
  698.             goto 25677.8 -2929 41445.6
  699.             attack "hero"
  700.         end
  701.     pause 40
  702. end_procedure
  703.  
  704. wait_until "pad1" destroyed
  705. end_procedure "P3a"
  706. clear_waypoint
  707. #....................................................................
  708.     phasemessage 55 60
  709.     play_speech "destroy all alien craft"
  710. #....................................................................
  711. wait_until number_of "aair"=0
  712.  
  713.  
  714. ;----------------
  715. ;-------3rd pad
  716. #....................................................................
  717.     phasemessage 53 60
  718.     play_speech "destroy shield generator"
  719. #....................................................................
  720. set_volatile "bsgen3"
  721. set_waypoint "bsgen3"
  722. wait_until "bsgen3" destroyed
  723.  
  724. #....................................................................
  725.     phasemessage 52 60
  726.     play_speech "destroy alien installation"
  727. #....................................................................
  728. set_waypoint "pad3"
  729.  
  730. create "lfighter"
  731.     position 34681.9 -791.55 37772.7
  732.     towards 31512 -2193.67 35731
  733.     armed_with "RED LASER"    rate 16
  734.     secondary_armed_with "ENERGY 2"    rate 128 rounds 1
  735.     task
  736.         goto 31512 -2193.67 35731
  737.         attack "hero"
  738.     end
  739. pause 20
  740.  
  741. procedure "P3a"
  742.     wait_until number_of "aair" <6
  743.     create "lfighter"
  744.         position 34681.9 -791.55 37772.7
  745.         towards 31512 -2193.67 35731
  746.         armed_with "RED LASER"    rate 16
  747.         task
  748.             goto 31512 -2193.67 35731
  749.             attack "hero"
  750.         end
  751.     pause 20
  752. end_procedure
  753.  
  754. wait_until "pad3" destroyed
  755. end_procedure "P3a"
  756. clear_waypoint
  757. #....................................................................
  758.     phasemessage 55 60
  759.     play_speech "destroy all alien craft"
  760. #....................................................................
  761. wait_until number_of "aair"=0
  762.  
  763. procedure "P3a"
  764.     wait_until number_of "aair" <6
  765.     create "lfighter"
  766.         position 17000 -32000 500 relative toxz "hub1"
  767.         armed_with "RED LASER"    rate 16
  768.         task
  769.             attack "hero"
  770.         end
  771.     pause 75
  772. end_procedure
  773.  
  774. #....................................................................
  775.     phasemessage 53 60
  776.     play_speech "destroy shield generator"
  777. #....................................................................
  778. set_volatile "bsgen2"
  779. set_waypoint "bsgen2"
  780. wait_until "bsgen2" destroyed
  781.  
  782. #....................................................................
  783.     phasemessage 52 60
  784.     play_speech "destroy alien installation"
  785. #....................................................................
  786. set_waypoint "hub1"
  787. wait_until "hub1" destroyed
  788.  
  789. if "ssgen1" not destroyed
  790. {
  791.     #....................................................................
  792.         phasemessage 53 60
  793.         play_speech "destroy shield generator"
  794.     #....................................................................
  795.     set_waypoint "ssgen1"
  796.     wait_until "ssgen1" destroyed
  797. }
  798. end_procedure "P3e"
  799.  
  800. if "P2bld" not destroyed
  801. {
  802.     #....................................................................
  803.         phasemessage 52 60
  804.         play_speech "destroy alien installation"
  805.     #....................................................................
  806.     set_waypoint "P2bld"
  807.     wait_until "P2bld" destroyed
  808. }
  809. clear_waypoint
  810. #....................................................................
  811.     phasemessage 55 60
  812.     play_speech "destroy all alien craft"
  813. #....................................................................
  814.  
  815. end_procedure "P3a"
  816.  
  817. wait_until number_of "aair"=0
  818.  
  819. #==================================
  820. set_flag 31
  821. set_inert "hero"
  822. #....................................................................
  823.     phasemessage 10 60
  824.     play_speech "phase complete"
  825. #....................................................................
  826.  
  827.  
  828. pause 20
  829.  
  830. hud off
  831. camera
  832.     attached_to "hero"
  833.     position 600 -300 -600
  834.     pointing_at "hero"
  835.     dolly 1
  836.     dollyspeed 0.1%
  837. pause 80
  838. clear_flag 31
  839. ;-------------------------------------------------------
  840. ;PHASE 4
  841. ;-------------------------------------------------------
  842.  
  843. clear_flag all
  844.  
  845. switch_hero "laser1"
  846.     task
  847.         wait_until flag 0 set
  848.         playercontrols
  849.             break_task_if flag 31 set
  850.     end
  851.  
  852. #==================================
  853.  
  854. create "lfighter"
  855.     label "P4alien1"
  856.     position 17000 -3200 0 relative toxz "H1"
  857.     armed_with "DESIGNATOR" rate 0
  858.     task
  859.         goto 7000 -2200 0 relative toxz "H1"
  860.         shoot "H1"
  861.         shoot "replen1"
  862.         goto -17000 -3200 0 relative toxz "H1"
  863.         kill
  864.     end
  865.  
  866. create "lfighter"
  867.     label "P4alien2"
  868.     position 17000 -3200 1500 relative toxz "H1"
  869.     armed_with "DESIGNATOR" rate 0
  870.     task
  871.         goto 3000 -2200 0 relative toxz "replen1"
  872.         shoot "replen1"
  873.         set_flag 0
  874.         goto -17000 -3200 0 relative toxz "H1"
  875.         kill
  876.     end
  877.  
  878. camera_task
  879.     hud off
  880.     cam_pos -1500 0 -1500 attached_to "P4alien1"
  881.     cam_focus "P4alien2"
  882.     dolly 0
  883.  
  884.     pause 100
  885.     cam_pos 1000 -1500 1500 attached_to "P4alien2"
  886.     cam_focus "P4alien1"
  887.     dolly 1
  888.  
  889.     pause 100
  890.  
  891.     cam_pos 0 -1000 0 relative to "hero"
  892.     cam_focus "command1"
  893.     cam_goto 7000 -1500 1000 relative to "command3"
  894. end
  895.  
  896. wait_until flag 0 set
  897. pause 150
  898.  
  899. camera
  900.     attached_to "hero"
  901.     position -600 -300 600
  902.     pointing_at "hero"
  903. dolly 0
  904. pause 40
  905.  
  906. camera cockpit
  907.  
  908. kill group "aair"
  909.  
  910. #....................................................................
  911.     phasemessage 61 60
  912.     play_speech "defend installation"
  913. #....................................................................
  914.  
  915.  
  916. #==================================
  917. phasestart
  918. clear_flag all
  919.  
  920. ;-------------------
  921. ;-------------wave 1
  922.  
  923. procedure "P4a"
  924.     create "lfighter"
  925.     position 18005.8 -2547.28 15095
  926.     towards "hero"
  927.     armed_with "RED LASER" rate 6
  928.     task
  929.         goto 25662.1 -2524.7 16144.9
  930.         goto 26377.9 -970.332 13115.6
  931.         shoot
  932.         goto 23453.2 -970.04 12283.5
  933.         shoot "hero"
  934.         goto 23629.6 -958.432 14836.3
  935.         attack "hero"
  936.             break_task_if vel < 2
  937.         explode
  938.     end
  939.     pause 50
  940. end_procedure terminate after 6 loops
  941.  
  942.  
  943. wait_until proc "P4a" terminated
  944. wait_until number_of "aair"<=3
  945.  
  946. ;-------------------
  947. ;-------------wave 2
  948. procedure "P4a"
  949.     create "lfighter"
  950.     position 23838.2 -160 22518.1
  951.     towards "hero"
  952.     armed_with "RED LASER" rate 6
  953.     task
  954.         goto 23795.5 -1197.95 20526.2
  955.         goto 23512.8 -1190.01 12990
  956.         goto 26952.5 -1173.41 9873.09
  957.         attack "command1"
  958.         attack "command2"
  959.         attack "command3"
  960.         attack "command4"
  961.         attack "hero"
  962.  
  963.     end
  964.     pause 50
  965. end_procedure terminate after 6 loops
  966.  
  967.  
  968. wait_until proc "P4a" terminated
  969. wait_until number_of "aair"<=3
  970.  
  971. ;;-------------------
  972. ;;-------------wave 3
  973. ;
  974. ;
  975. ;procedure "P4a"
  976. ;    create "atank"
  977. ;    position 39016 on ground 7518
  978. ;    towards "hero"
  979. ;    armed_with "RED LASER" rate 6
  980. ;    task
  981. ;        goto 31770 on ground 9736
  982. ;        shoot
  983. ;        goto 26688 on ground 13672
  984. ;        shoot "hero"
  985. ;        goto 25083 on ground 15841
  986. ;        shoot
  987. ;        goto 22046 on ground 20858
  988. ;        goto 17738 on ground 25989
  989. ;        kill
  990. ;    end
  991. ;    pause 50
  992. ;end_procedure terminate after 4 loops
  993. ;
  994. ;create "bug"
  995. ;    position 18005.8 -2547.28 15095
  996. ;    towards "hero"
  997. ;    armed_with "BLUE LASER" rate 6
  998. ;    task
  999. ;        goto 26358 -1500 13491
  1000. ;        pause 150
  1001. ;        do
  1002. ;            goto 29045 -1500 11323
  1003. ;            shoot
  1004. ;            goto 26358 -1500 13491
  1005. ;            shoot
  1006. ;        until number_of "aland"=0
  1007. ;        attack
  1008. ;        goto 18005.8 -2547.28 15095
  1009. ;        kill
  1010. ;    end
  1011. ;
  1012. ;
  1013. ;wait_until proc "P4a" terminated
  1014. ;wait_until number_of "aland"=0
  1015.  
  1016. #===============================
  1017.  
  1018. create "lfighter"
  1019.     label "P4badman"
  1020.     position 17000 -3200 0 relative toxz "H2"
  1021.     armed_with "DESIGNATOR" rate 0
  1022.     inert
  1023.     task
  1024.         goto 3000 -2200 0 relative toxz "H2"
  1025.         shoot "H2"
  1026.         pause 1
  1027.         set_flag 9
  1028.         shoot "replen2"
  1029.         goto 18005.8 -2547.28 15095
  1030.         kill
  1031.     end
  1032.  
  1033. wait_until flag 9 set
  1034. pause 20
  1035. set_volatile "P4badman"
  1036.  
  1037. wait_until number_of "aair"=0
  1038.  
  1039. ;-------------------
  1040. ;-------------wave 4
  1041. procedure "P4a"
  1042.     create "lfighter"
  1043.     position 17204.4 -613.22 6974.41
  1044.     towards "hero"
  1045.     armed_with "RED LASER" rate 6
  1046.     task
  1047.         goto 21011.5 -1112.41 8080.85
  1048.         goto 23930.8 -1112.25 12082.2
  1049.         goto 23609.7 -1110.4 17370.4
  1050.         goto 27687.2 -1476.38 19280.5
  1051.         attack "hero"
  1052.     end
  1053.     pause 50
  1054. end_procedure terminate after 6 loops
  1055.  
  1056. wait_until proc "P4a" terminated
  1057. wait_until number_of "aair"=0
  1058.  
  1059. ;-------------------
  1060. ;-------------wave 5
  1061. procedure "P4a"
  1062.     create "lfighter"
  1063.     position 37887.9 -1669.24 13338.5
  1064.     towards "hero"
  1065.     armed_with "RED LASER" rate 6
  1066.     task
  1067.         goto 35864.1 -2111 13519.3
  1068.         goto 28705.9 -730.743 13358.9
  1069.         attack "hero"
  1070.     end
  1071.     pause 50
  1072. end_procedure terminate after 6 loops
  1073.  
  1074. wait_until proc "P4a" terminated
  1075. wait_until number_of "aair"=0
  1076.  
  1077.  
  1078. ;-------------------
  1079. ;-------------wave 6
  1080. procedure "P4a"
  1081.     create "lfighter"
  1082.     position 23838.2 -160 22518.1
  1083.     towards "hero"
  1084.     armed_with "RED LASER" rate 6
  1085.     task
  1086.         goto 23795.5 -1197.95 20526.2
  1087.         goto 23512.8 -1190.01 12990
  1088.         goto 26952.5 -1173.41 9873.09
  1089.         attack "command1"
  1090.         attack "command2"
  1091.         attack "command3"
  1092.         attack "command4"
  1093.         attack "hero"
  1094.  
  1095.     end
  1096.     pause 50
  1097. end_procedure terminate after 6 loops
  1098.  
  1099.  
  1100. wait_until proc "P4a" terminated
  1101. wait_until number_of "aair"<=3
  1102.  
  1103.  
  1104. ;-------------------
  1105. ;-------------wave 7
  1106.  
  1107. procedure "P4a"
  1108.     create "lfighter"
  1109.     position 18005.8 -2547.28 15095
  1110.     towards "hero"
  1111.     armed_with "RED LASER" rate 6
  1112.     task
  1113.         goto 25662.1 -2524.7 16144.9
  1114.         goto 26377.9 -970.332 13115.6
  1115.         shoot
  1116.         goto 23453.2 -970.04 12283.5
  1117.         shoot "hero"
  1118.         goto 23629.6 -958.432 14836.3
  1119.         attack "hero"
  1120.             break_task_if vel < 2
  1121.         explode
  1122.     end
  1123.     pause 50
  1124. end_procedure terminate after 6 loops
  1125.  
  1126.  
  1127. wait_until proc "P4a" terminated
  1128. wait_until number_of "aair"<=3
  1129.  
  1130.  
  1131. ;-------------------
  1132. ;-------------wave 8
  1133. procedure "P4a"
  1134.     create "lfighter"
  1135.     position 37887.9 -1669.24 13338.5
  1136.     towards "hero"
  1137.     armed_with "RED LASER" rate 6
  1138.     task
  1139.         goto 35864.1 -2111 13519.3
  1140.         goto 28705.9 -730.743 13358.9
  1141.         attack "hero"
  1142.     end
  1143.     pause 50
  1144. end_procedure terminate after 6 loops
  1145.  
  1146. wait_until proc "P4a" terminated
  1147. wait_until number_of "aair"=0
  1148.  
  1149.  
  1150. ;-------------------
  1151. ;-------------wave 9
  1152. procedure "P4a"
  1153.     create "lfighter"
  1154.     position 17204.4 -613.22 6974.41
  1155.     towards "hero"
  1156.     armed_with "RED LASER" rate 6
  1157.     task
  1158.         goto 21011.5 -1112.41 8080.85
  1159.         goto 23930.8 -1112.25 12082.2
  1160.         goto 23609.7 -1110.4 17370.4
  1161.         goto 27687.2 -1476.38 19280.5
  1162.         attack "hero"
  1163.     end
  1164.     pause 50
  1165. end_procedure terminate after 6 loops
  1166.  
  1167. wait_until proc "P4a" terminated
  1168. wait_until number_of "aair"=0
  1169.  
  1170.  
  1171.  
  1172. #==================================
  1173. set_flag 31
  1174. set_inert "hero"
  1175. #....................................................................
  1176.     phasemessage 10 60
  1177.     play_speech "phase complete"
  1178. #....................................................................
  1179.  
  1180.  
  1181. pause 20
  1182.  
  1183. hud off
  1184. camera
  1185.     attached_to "hero"
  1186.     position 600 -300 -600
  1187.     pointing_at "hero"
  1188.     dolly 1
  1189.     dollyspeed 0.1%
  1190. pause 80
  1191.  
  1192. ;-------------------------------------------------------
  1193. ;PHASE 5
  1194. ;-------------------------------------------------------
  1195. clear_flag all
  1196. phasestart
  1197. playcdtrack 3
  1198.  
  1199. set_volatile "bsgen7"
  1200. set_volatile "ssgen3"
  1201. set_volatile "ssgen4"
  1202. set_volatile "ssgen5"
  1203.  
  1204. create "alnadubs"
  1205.     label "gun5"
  1206.     position 43966 on ground 40633
  1207.     forward 0 0 1 up 0 1 0
  1208.     armed_with "BLUE LASER" rate 16
  1209.     task
  1210.         attack
  1211.     end
  1212.  
  1213. create "lance"
  1214.     label "P5hero"
  1215.     position 28638.6 -15 10823.3
  1216.     forward -0.58 0 0.81 up 0 1 0
  1217.     armed_with "GREEN LASER" rate 4
  1218.     secondary_armed_with "GUIDED MISSILE" rate 32 rounds 20
  1219.     inert
  1220.  
  1221. switch_hero "P5hero"
  1222.     task
  1223.         wait_until flag 0 set
  1224.         playercontrols
  1225.             break_task_if flag 31 set
  1226.     end
  1227.  
  1228. auto_aim "hero"
  1229.  
  1230. hud off
  1231. camera
  1232.     position 600 -300 -600 local to "hero"
  1233.     pointing_at "hero"
  1234.     dolly 0
  1235. pause 40
  1236. camera cockpit
  1237. set_flag 0
  1238. #....................................................................
  1239.     phasemessage 62 60
  1240.     play_speech "defend allied craft"
  1241. #....................................................................
  1242.  
  1243.  
  1244.  
  1245. #==================================
  1246.  
  1247. create "Slowhovertank"
  1248.     label "P5ca"
  1249.     position 28780.1 on ground 16717.6
  1250.     towards 42535 on ground 30375.5
  1251.     armed_with "DESIGNATOR" rate 0
  1252.     inert
  1253.     mission_critical
  1254.     task
  1255.         goto 42535 on ground 30375.5
  1256.         goto 44032.9 on ground 41027.6
  1257.         goto 40512.6 on ground 45885.8
  1258.         shoot "bsgen7"
  1259.         shoot "bsgen7"
  1260.         #==================================
  1261.         goto 36498.5 on ground 49701.9
  1262.         shoot "ssgen4"
  1263.         shoot "ssgen5"
  1264.  
  1265.         #==================================
  1266.         goto 32536.2 on ground 55190.8
  1267.         goto 36616.2 on ground 55737.8
  1268.         goto 39239.4 on ground 57353.8
  1269.         shoot "ssgen3"
  1270.  
  1271.     end
  1272.  
  1273. create "Slowhovertank"
  1274.     position 0 0 -600 local to "P5ca"
  1275.     towards "P5ca"
  1276.     armed_with "DESIGNATOR" rate 0
  1277.     task
  1278.         goto 42535 on ground 30375.5
  1279.         goto 44032.9 on ground 41027.6
  1280.         goto 40512.6 on ground 45885.8
  1281.         shoot "bsgen7"
  1282.         shoot "bsgen7"
  1283.         #==================================
  1284.         goto 36498.5 on ground 49701.9
  1285.         shoot "ssgen4"
  1286.         shoot "ssgen5"
  1287.  
  1288.         #==================================
  1289.         goto 32536.2 on ground 55190.8
  1290.         goto 36616.2 on ground 55737.8
  1291.         goto 39239.4 on ground 58353.8
  1292.         shoot "ssgen3"
  1293.     end
  1294.  
  1295. create "Slowhovertank"
  1296.     position 0 0 -1200 local to "P5ca"
  1297.     towards "P5ca"
  1298.     armed_with "DESIGNATOR" rate 0
  1299.     task
  1300.         goto 42535 on ground 30375.5
  1301.         goto 44032.9 on ground 41027.6
  1302.         goto 40512.6 on ground 45885.8
  1303.         shoot "bsgen7"
  1304.         shoot "bsgen7"
  1305.         #==================================
  1306.         goto 36498.5 on ground 49701.9
  1307.         shoot "ssgen4"
  1308.         shoot "ssgen5"
  1309.  
  1310.         #==================================
  1311.         goto 32536.2 on ground 55190.8
  1312.         goto 36616.2 on ground 55737.8
  1313.         goto 39239.4 on ground 59353.8
  1314.         shoot "ssgen3"
  1315.     end
  1316.  
  1317.  
  1318. create "atank"
  1319.     label "P5ambush"
  1320.     position 39295.1 -878.048 30194.9
  1321.     towards "hero"
  1322.     armed_with "TRACER SHOT 1" rate 64
  1323.     task
  1324.         do
  1325.             goto -2000 0 2000 local to "P5ca"
  1326.             shoot
  1327.             goto -2000 0 -1000 local to "P5ca"
  1328.             shoot
  1329.             goto 2000 0 -1000 local to "P5ca"
  1330.             shoot
  1331.             goto 2000 0 2000 local to "P5ca"
  1332.             shoot
  1333.         forever
  1334.     end
  1335.  
  1336. create "atank"
  1337.     position 500 0 500 local to "P5ambush"
  1338.     towards "hero"
  1339.     armed_with "TRACER SHOT 1" rate 64
  1340.     task
  1341.         do
  1342.             goto 2000 0 3000 local to "P5ca"
  1343.             shoot
  1344.             goto 2000 0 -2000 local to "P5ca"
  1345.             shoot
  1346.             goto -2000 0 -2000 local to "P5ca"
  1347.             shoot
  1348.             goto -2000 0 3000 local to "P5ca"
  1349.             shoot
  1350.         forever
  1351.     end
  1352.  
  1353. create "atank"
  1354.     position 1500 0 1500 local to "P5ambush"
  1355.     towards "hero"
  1356.     armed_with "TRACER SHOT 1" rate 64
  1357.     task
  1358.         do
  1359.             goto -3000 0 4000 local to "P5ca"
  1360.             shoot
  1361.             goto -3000 0 -3000 local to "P5ca"
  1362.             shoot
  1363.             goto 3000 0 -3000 local to "P5ca"
  1364.             shoot
  1365.             goto 3000 0 4000 local to "P5ca"
  1366.             shoot
  1367.         forever
  1368.     end
  1369.  
  1370. #==================================
  1371. procedure "P5wp"
  1372.     set_waypoint nearest "aihover"
  1373. end_procedure
  1374.  
  1375. procedure "P5a"
  1376.     create "lfighter"
  1377.     position 39295.1 -878.048 30194.9
  1378.     towards "hero"
  1379.     armed_with "RED LASER" rate 16
  1380.     task
  1381.         goto 40522.4 -1897.23 28036.5
  1382.         attack "hero"
  1383.     end
  1384.     pause 50
  1385. end_procedure terminate after 8 loops
  1386.  
  1387. procedure "P5b"
  1388.     wait_until distance_between "P5ca" and "gun5" < 5000
  1389.     set_volatile "P5ca"
  1390. end_procedure
  1391.  
  1392.  
  1393. wait_until proc "P5a" terminated
  1394. wait_until number_of "aair"=0
  1395. wait_until number_of "aland"=0
  1396. end_procedure "P5wp"
  1397. end_procedure "P5b"
  1398. set_volatile "P5ca"
  1399.  
  1400.  
  1401. procedure "P5wp"
  1402.     set_waypoint nearest "agun"
  1403. end_procedure
  1404.  
  1405. #....................................................................
  1406.     phasemessage 58 60
  1407.     play_speech "destroy alien AT-AT guns"
  1408. #....................................................................
  1409.  
  1410. wait_until number_of "agun"=0
  1411. end_procedure "P5wp"
  1412.  
  1413. clear_flag 1
  1414.  
  1415. procedure "P5a"
  1416.  
  1417.     wait_until number_of "aair"<2
  1418.     wait_until flag 1 set or "bsgen7" not destroyed
  1419.  
  1420.     create "lfighter"
  1421.         position 17000 -3200 500 local toxz "hero"
  1422.         towards "hero"
  1423.         armed_with "RED LASER"    rate 16
  1424.         task
  1425.             attack "hero"
  1426.         end
  1427.     pause 20
  1428.     create "lfighter"
  1429.         position -17000 -3200 500 local toxz "hero"
  1430.         towards "hero"
  1431.         armed_with "RED LASER"    rate 16
  1432.         task
  1433.             attack "hero"
  1434.         end
  1435.     pause 50
  1436.     clear_flag 1
  1437. end_procedure
  1438.  
  1439. set_flag 1
  1440. wait_until "bsgen7" destroyed
  1441. set_flag 1
  1442.  
  1443. #....................................................................
  1444.     phasemessage 52 60
  1445.     play_speech "destroy alien installation"
  1446. #....................................................................
  1447. set_waypoint "chapel1"
  1448. wait_until "chapel1" destroyed
  1449. clear_waypoint
  1450.  
  1451. wait_until "ssgen4" destroyed
  1452. set_flag 1
  1453.  
  1454. #....................................................................
  1455.     phasemessage 52 60
  1456.     play_speech "destroy alien installation"
  1457. #....................................................................
  1458. set_waypoint "flat2"
  1459. wait_until "flat2" destroyed
  1460. clear_waypoint
  1461.  
  1462. wait_until "ssgen5" destroyed
  1463. set_flag 1
  1464.  
  1465. #....................................................................
  1466.     phasemessage 52 60
  1467.     play_speech "destroy alien installation"
  1468. #....................................................................
  1469. set_waypoint "flat3"
  1470. wait_until "flat3" destroyed
  1471. clear_waypoint
  1472.  
  1473. wait_until "ssgen3" destroyed
  1474. set_flag 1
  1475.  
  1476. mission_uncritical "P5ca"
  1477.  
  1478. #....................................................................
  1479.     phasemessage 52 60
  1480.     play_speech "destroy alien installation"
  1481. #....................................................................
  1482. set_waypoint "flat1"
  1483. wait_until "flat1" destroyed
  1484. clear_waypoint
  1485.  
  1486. wait_until number_of "aair"=0
  1487. end_procedure "P5a"
  1488.  
  1489.  
  1490. #....................................................................
  1491.     phasemessage 26 60
  1492.     play_speech "incoming alien fighters"
  1493. #....................................................................
  1494.  
  1495. procedure "P5a"
  1496.  
  1497.     create "lfighter"
  1498.         position 17000 -3200 500 local toxz "hero"
  1499.         towards "hero"
  1500.         armed_with "RED LASER"    rate 16
  1501.         task
  1502.             attack "hero"
  1503.         end
  1504.     pause 50
  1505. end_procedure terminate after 6 loops
  1506. wait_until proc "P5a" terminated
  1507. wait_until number_of "aair"=0
  1508.  
  1509. #==================================
  1510. set_flag 31
  1511. set_inert "hero"
  1512. #....................................................................
  1513.     phasemessage 10 60
  1514.     play_speech "phase complete"
  1515. #....................................................................
  1516.  
  1517.  
  1518. pause 20
  1519.  
  1520. hud off
  1521. camera
  1522.     attached_to "hero"
  1523.     position 600 -300 -600
  1524.     pointing_at "hero"
  1525.     dolly 1
  1526.     dollyspeed 0.1%
  1527. pause 80
  1528.  
  1529. ;-------------------------------------------------------
  1530. ;PHASE 6
  1531. ;-------------------------------------------------------
  1532. clear_flag all
  1533. phasestart
  1534. playcdtrack 6
  1535.  
  1536. #==================
  1537. # camera cuts here
  1538. #==================
  1539.  
  1540. create "plfight"
  1541.     label "P6hero"
  1542.     position 25961 -600 11107 
  1543.     forward 0.79 0 0.61 up 0 1 0
  1544.     armed_with "GREEN LASER"    rate 4
  1545.     secondary_armed_with "ENERGY 1" rate 16 rounds 20
  1546.  
  1547. switch_hero "P6hero"
  1548.     task
  1549.         wait_until flag 0 set
  1550.         playercontrols
  1551.             break_task_if flag 31 set
  1552.     end
  1553.  
  1554. hud off
  1555. camera
  1556.     position 600 -300 -600 local to "hero"
  1557.     pointing_at "hero"
  1558.     dolly 1
  1559.  
  1560. pause 80
  1561. camera cockpit
  1562. set_flag 0
  1563. kill "P5hero"
  1564. kill group "aihover"
  1565.  
  1566. #....................................................................
  1567.     phasemessage 23 60
  1568.     play_speech "incoming"
  1569. #....................................................................
  1570.  
  1571.  
  1572. #==================================
  1573.  
  1574. create "command"
  1575.     label "P6big"
  1576.     position 59696.2 -3440.08 54918.8
  1577.     armed_with "ENERGY 1" rate 2
  1578.     inert
  1579.     task
  1580.         patrol
  1581.             point 49432.4 -3800 53780.9
  1582.             point 21482.6 -3800 53904.9
  1583.             point 8672.39 -3800 45725
  1584.             point 28217.9 -3800 37727.3
  1585.             point 39510.2 -3800 20433.1
  1586.             point 34708.7 -3800 12347.9
  1587.             point 21956.1 -3800 14222.8
  1588.             point 25311 -3800 22406.9
  1589.         end
  1590.  
  1591. procedure "P6a"
  1592.     wait_until number_of "aair" <6
  1593.     create "lfighter"
  1594.         position 500 -3200 17000 local toxz "hero"
  1595.         towards "hero"
  1596.         armed_with "PLASMA BOLT 3"    rate 16
  1597.         task
  1598.             set_vel 4
  1599.             attack "hero"
  1600.                 break_task_if vel<2
  1601.             explode
  1602.         end
  1603.     pause 25
  1604. end_procedure terminate after 16 loops
  1605.  
  1606. wait_until proc "P6a" terminated
  1607. wait_until number_of "aair"=0
  1608.  
  1609. set_waypoint "P6big"
  1610.  
  1611. #....................................................................
  1612.     phasemessage 55 60
  1613.     play_speech "destroy all alien craft"
  1614. #....................................................................
  1615.  
  1616.  
  1617. create "lance"
  1618.     label "P6ha"
  1619.     position 500 3200 -17000 relative toxz "hero"
  1620.     forward -0.58 0 0.81 up 0 1 0
  1621.     armed_with "GREEN LASER" rate 2
  1622.     inert
  1623.     task
  1624.         do
  1625.             attack group "fighters"
  1626.         until flag 2 set
  1627.  
  1628.         armed_with "DESIGNATOR"
  1629.  
  1630.         do
  1631.             goto 6000 300 6000 local to "P6big"
  1632.             shoot "P6big"
  1633.         until "P6big" destroyed
  1634.     end
  1635.  
  1636. create "lance"
  1637.     label "P6hb"
  1638.     position 5000 3200 -17000 relative toxz "hero"
  1639.     forward -0.58 0 0.81 up 0 1 0
  1640.     armed_with "GREEN LASER" rate 2
  1641.     inert
  1642.     task
  1643.         do
  1644.             goto 5000 300 5000 local to "P6big"
  1645.             shoot group "aair"
  1646.             goto 5000 300 -5000 local to "P6big"
  1647.             shoot group "aair"
  1648.             goto -5000 300 -5000 local to "P6big"
  1649.             shoot group "aair"
  1650.             goto -5000 300 5000 local to "P6big"
  1651.             shoot group "aair"
  1652.         until flag 2 set
  1653.  
  1654.         armed_with "DESIGNATOR"
  1655.  
  1656.         do
  1657.             goto -6000 300 -6000 local to "P6big"
  1658.             shoot "P6big"
  1659.         until "P6big" destroyed
  1660.  
  1661.     end
  1662.  
  1663.  
  1664. procedure "P6a"
  1665.     wait_until number_of "fighters" <6
  1666.  
  1667.     create "hfighter"
  1668.         position 17000 0 500 local to "P6big"
  1669.         towards "hero"
  1670.         armed_with "PLASMA BOLT 3"    rate 0
  1671.         task
  1672.             do
  1673.                 goto 4000 300 4000 local to "P6big"
  1674.                     break_task_if vel<2
  1675.                 shoot      
  1676.                 goto 2000 300 -2000 local to "P6big"
  1677.                     break_task_if vel<2
  1678.                 shoot
  1679.                 goto -2000 300 -2000 local to "P6big"
  1680.                     break_task_if vel<2
  1681.                 shoot
  1682.                 goto -4000 300 4000 local to "P6big"
  1683.                     break_task_if vel<2
  1684.                 shoot
  1685.             until vel <2
  1686.             explode
  1687.         end
  1688.     pause 90
  1689. end_procedure terminate after 8 loops
  1690.  
  1691. wait_until distance_between "hero" and waypoint <8000
  1692.  
  1693. procedure "P6b"
  1694.     wait_until number_of "aair" <6
  1695.     create "lfighter"
  1696.         position 500 -3200 17000 local toxz "hero"
  1697.         towards "hero"
  1698.         armed_with "RED LASER"    rate 12
  1699.         task
  1700.             set_vel 4
  1701.             attack "hero"
  1702.                 break_task_if vel<2
  1703.             explode
  1704.         end
  1705.     pause 25
  1706. end_procedure terminate after 8 loops
  1707.  
  1708. wait_until proc "P6a" terminated
  1709. wait_until proc "P6b" terminated
  1710.  
  1711. wait_until number_of "aair"=0
  1712. wait_until number_of "fighters"=0
  1713.  
  1714.  
  1715. set_volatile "P6big"
  1716. set_volatile "P6ha"
  1717. set_volatile "P6hb"
  1718. mission_critical "P6ha"
  1719. mission_critical "P6hb"
  1720. set_flag 2
  1721.  
  1722.  
  1723. wait_until "P6big" destroyed
  1724. #==================================
  1725. set_flag 31
  1726. set_inert "hero"
  1727. #....................................................................
  1728.     phasemessage 10 60
  1729.     play_speech "phase complete"
  1730. #....................................................................
  1731.  
  1732.  
  1733. pause 20
  1734.  
  1735. hud off
  1736. camera
  1737.     attached_to "hero"
  1738.     position 600 -300 -600
  1739.     pointing_at "hero"
  1740.     dolly 1
  1741.     dollyspeed 0.1%
  1742. pause 80
  1743.  
  1744. ;-------------------------------------------------------
  1745. ;PHASE 7
  1746. ;-------------------------------------------------------
  1747. clear_flag all
  1748. phasestart
  1749.  
  1750. create "alnadubs"
  1751.     label "P7gun1"
  1752.     position 41822.6 on ground 26884.4
  1753.     forward 0 0 -1 up 0 1 0
  1754.     armed_with "GREEN ENERGY LASER"    rate 16
  1755.     task
  1756.         attack
  1757.     end
  1758.  
  1759.  
  1760. create "alnadubs"
  1761.     label "P7gun2"
  1762.     position 37559.1 on ground 29409.7
  1763.     forward 0 0 1 up 0 1 0
  1764.     armed_with "GREEN ENERGY LASER"    rate 16
  1765.     task
  1766.         attack
  1767.     end
  1768.  
  1769.  
  1770.  
  1771. create "hovercraft"
  1772.     label "P7hero"
  1773.     position 24871 on ground 10309.6
  1774.     forward 0.57 0 0.82 up 0 1 0
  1775.     armed_with "GREEN LASER"    rate 4
  1776.     secondary_armed_with "DESIGNATOR" rate 32 rounds 20
  1777.  
  1778.  
  1779. switch_hero "P7hero"
  1780.     task
  1781.         wait_until flag 0 set
  1782.         playercontrols
  1783.             break_task_if flag 31 set
  1784.     end
  1785.  
  1786. hud off
  1787. camera
  1788.     position 600 -300 -600 local to "hero"
  1789.     pointing_at "hero"
  1790.     dolly 0
  1791.  
  1792. pause 40
  1793. camera cockpit
  1794. set_flag 0
  1795. kill "P6hero"
  1796. kill "P6ha"
  1797. kill "P6hb"
  1798.  
  1799. #....................................................................
  1800.     phasemessage 57 60
  1801.     play_speech "destroy alien surface craft"
  1802. #....................................................................
  1803.  
  1804.  
  1805. #==================================
  1806.  
  1807. create "hovertank"
  1808.     position 28780.1 on ground 16717.6
  1809.     towards 42535 on ground 30375.5
  1810.     armed_with "TRACER SHOT 1" rate 64
  1811.     inert
  1812.     task
  1813.         wait_until flag 1 set
  1814. #....................................................................
  1815.     play_speech "f_On my way"
  1816. #....................................................................
  1817.  
  1818.  
  1819.         goto 40522.4 on ground 28036.5
  1820.         do
  1821.             shoot "P7gun1"
  1822.         until "P7gun1" destroyed
  1823.         do
  1824.             shoot "P7gun2"
  1825.         until "P7gun2" destroyed
  1826.  
  1827.         goto 28780.1 on ground 16717.6
  1828.         kill
  1829.     end
  1830.  
  1831. create "bug"
  1832.     label "P7bug"
  1833.     position 27227.2 -500 14517.8
  1834.     towards "hero"
  1835.     armed_with "GREEN LASER"    rate 4
  1836.     inert
  1837.     task
  1838.         do
  1839.             patrol
  1840.                 point 1000 -1800 0 relative to "hero"
  1841.                 break_task_if distance_between me and closest "aair" <6000
  1842.             stop
  1843.             shoot group "aair"
  1844.         until flag 2 set
  1845.     end
  1846.  
  1847.  
  1848. create "atank"
  1849.     position 26125.6 on ground 24593.9
  1850.     towards "hero"
  1851.     armed_with "RED LASER"    rate 12
  1852.     task
  1853.         attack "hero"
  1854.     end
  1855.  
  1856. create "facraft"
  1857.     position 38940.3 on ground 26042.2
  1858.     towards "hero"
  1859.     armed_with "RED LASER"    rate 12
  1860.     task
  1861.         attack "hero"
  1862.     end
  1863.  
  1864.  
  1865. create "atank"
  1866.     position 32541.7 on ground 28886.7
  1867.     towards "hero"
  1868.     armed_with "RED LASER"    rate 12
  1869.     task
  1870.         attack "hero"
  1871.     end
  1872.  
  1873. procedure "P7a"
  1874.     wait_until number_of "aair" = 0
  1875.     create "lfighter"
  1876.         position 500 -3200 17000 local toxz "hero"
  1877.         towards "hero"
  1878.         armed_with "PLASMA BOLT 3"    rate 16
  1879.         task
  1880.             set_vel 4
  1881.             attack "hero"
  1882.                 break_task_if vel<2
  1883.             explode
  1884.         end
  1885.     pause 25
  1886. end_procedure
  1887.  
  1888. procedure "P7c"
  1889.     set_waypoint nearest "aland"
  1890. end_procedure
  1891.  
  1892. procedure "P7d"
  1893.     wait_until distance_between "hero" and "laser2" <500
  1894.  
  1895.     set_task "laser2"
  1896.         attack
  1897.     end
  1898. end_procedure terminate after 1 loops
  1899.  
  1900. wait_until number_of "aland"=0
  1901. set_flag 1
  1902.  
  1903. procedure "P7b"
  1904.     create "atank"
  1905.         position 39295.1 on ground 30194.9
  1906.         towards "hero"
  1907.         armed_with "PLASMA BOLT 3"    rate 16
  1908.         task
  1909.             goto 40522.4 on ground 28036.5
  1910.             attack "hero"
  1911.         end
  1912.     pause 150
  1913. end_procedure terminate after 4 loops
  1914.  
  1915.  
  1916. wait_until proc "P7b" terminated
  1917. wait_until number_of "aland"=0
  1918. #==============================
  1919.  
  1920. end_procedure "P7c"
  1921.  
  1922. #....................................................................
  1923.     phasemessage 50 60
  1924.     play_speech "follow waypoint marker"
  1925. #....................................................................
  1926.  
  1927.  
  1928. set_volatile "ssgen6"
  1929. set_waypoint "ssgen6"
  1930. wait_until distance_between "hero" and waypoint <4000
  1931. #....................................................................
  1932.     phasemessage 52 60
  1933.     play_speech "destroy alien installation"
  1934. #....................................................................
  1935.  
  1936. wait_until "ssgen6" destroyed
  1937. set_waypoint "P7b1"
  1938. wait_until "P7b1" destroyed
  1939.  
  1940. set_volatile "ssgen7"
  1941. set_waypoint "ssgen7"
  1942. wait_until "ssgen7" destroyed
  1943. set_waypoint "P7b2"
  1944. wait_until "P7b2" destroyed
  1945.  
  1946. set_volatile "ssgen8"
  1947. set_waypoint "ssgen8"
  1948. wait_until "ssgen8" destroyed
  1949. set_waypoint "P7b3"
  1950. wait_until "P7b3" destroyed
  1951.  
  1952. end_procedure "P7a"
  1953. kill group "aair"
  1954. set_flag 2
  1955. clear_waypoint
  1956.  
  1957. #....................................................................
  1958.     phasemessage 30 60
  1959.     play_speech "incoming alien surface craft"
  1960. #....................................................................
  1961.  
  1962.  
  1963. procedure "P7a"
  1964.     create "atank"
  1965.         position 39295.1 on ground 30194.9
  1966.         armed_with "PLASMA BOLT 3"    rate 16
  1967.         task
  1968.             attack "hero"
  1969.         end
  1970.     pause 150
  1971. end_procedure terminate after 3 loops
  1972.  
  1973. wait_until proc "P7a" terminated
  1974. wait_until number_of "aland" = 0
  1975.  
  1976. set_waypoint 26438 on ground 11584.6
  1977. #....................................................................
  1978.     phasemessage 50 60
  1979.     play_speech "follow waypoint marker"
  1980. #....................................................................
  1981.  
  1982. wait_until distance_between "hero" and waypoint < 1000
  1983. clear_waypoint
  1984.  
  1985. end_procedure "P7d"
  1986.  
  1987. #==================================
  1988. set_flag 31
  1989. set_inert "hero"
  1990. #....................................................................
  1991.     phasemessage 10 60
  1992.     play_speech "phase complete"
  1993. #....................................................................
  1994.  
  1995.  
  1996. pause 20
  1997.  
  1998. hud off
  1999. camera
  2000.     attached_to "hero"
  2001.     position 600 -300 -600
  2002.     pointing_at "hero"
  2003.     dolly 1
  2004.     dollyspeed 0.1%
  2005. pause 80
  2006.  
  2007. ;-------------------------------------------------------
  2008. ;PHASE 8
  2009. ;-------------------------------------------------------
  2010. clear_flag all
  2011.  
  2012.  
  2013. set_volatile "P8rack"
  2014.  
  2015. set_task "P8rack"
  2016.     slave_to "laser2"
  2017. end
  2018.  
  2019. switch_hero "laser2"
  2020.     task
  2021.         position 34426 -1499 13853
  2022.         rotate_gun towards "replen1"
  2023.         wait_until flag 0 set
  2024.         playercontrols
  2025.             break_task_if flag 31 set
  2026.     end
  2027.  
  2028. create "lance"
  2029.     label "P8b-team1"
  2030.     mission_critical
  2031.     position 17000 -3200 500 relative toxz "hero"
  2032.     armed_with "RED LASER" rate 4
  2033.     secondary_armed_with "DESIGNATOR" rate 64 rounds 20
  2034.     task
  2035.         land 27320.9 on ground 13587.1
  2036.     end
  2037.  
  2038. create "lance"
  2039.     label "P8b-team2"
  2040.     mission_critical
  2041.     position 17000 -4000 3500 relative toxz "hero"
  2042.     armed_with "RED LASER" rate 8
  2043.     task
  2044.         land 27522.4 on ground 12766.9
  2045.  
  2046.     end
  2047.  
  2048. camera_task
  2049.     hud off
  2050.     cam_pos -1500 0 -1500 attached_to "P8b-team1"
  2051.     cam_focus "P8b-team2"
  2052.     dolly 0
  2053.  
  2054.     pause 100
  2055.     cam_pos 0 0 -1500 attached_to "P8b-team1"
  2056.     cam_focus "P8b-team1"
  2057.     dolly 1
  2058.  
  2059.     pause 100
  2060.     cam_pos -1500 0 -2500 attached_to "P8b-team1"
  2061.     dolly 1
  2062.  
  2063. #....................................................................
  2064.     phasemessage 47 60
  2065.     play_speech "reinforcements arrived"
  2066. #....................................................................
  2067.  
  2068.  
  2069.     pause 100
  2070.  
  2071.     cam_pos 27438 on ground 11584.6
  2072.     dolly 0
  2073.  
  2074.     pause 100
  2075.     cam_focus "P8b-team2"
  2076.     dolly 1
  2077.     pause 250
  2078.     set_flag 0
  2079. end
  2080.  
  2081.  
  2082. kill "P7hero"
  2083. kill "P7bug"
  2084.  
  2085. pause 100
  2086.  
  2087. create "bug"
  2088.     label "P8-bug1"
  2089.     mission_critical
  2090.     position 17000 -4000 3500 relative toxz "hero"
  2091.     armed_with "RED LASER" rate 4
  2092.     task
  2093.         land 28143 on ground 13332.4
  2094.     end
  2095.  
  2096. create "bug"
  2097.     label "P8-bug2"
  2098.     mission_critical
  2099.     position 17000 -3200 500 relative toxz "hero"
  2100.     armed_with "RED LASER" rate 4
  2101.     secondary_armed_with "DESIGNATOR" rate 64 rounds 20
  2102.     task
  2103.         land 26994.3 on ground 12888.5
  2104.     end
  2105.  
  2106. wait_until flag 0 set
  2107.  
  2108. camera
  2109.     position 600 -300 -600 local to "hero"
  2110.     pointing_at "hero"
  2111.     dolly 0
  2112.  
  2113. pause 40
  2114. camera cockpit
  2115. set_flag 0
  2116.  
  2117. #....................................................................
  2118.     phasemessage 61 60
  2119.     play_speech "defend installation"
  2120. #....................................................................
  2121.  
  2122.  
  2123. #==================================
  2124. #====wave 1
  2125. clear_flag all
  2126. phasestart
  2127.  
  2128. playcdtrack 7
  2129.  
  2130. procedure "P8a"
  2131.     create "lfighter"
  2132.         position 15812.1 -1593.82 13237.8
  2133.         armed_with "RED LASER" rate 6
  2134.         task
  2135.             goto 18535.1 -2513.7 13798.1
  2136.             goto 25286 -1193.4 10858.4
  2137.             shoot
  2138.             goto 32152.2 -2283.1 12271.2
  2139.             goto 37794 -2562.85 13432.1
  2140.             attack
  2141.  
  2142.         end
  2143.     pause 75
  2144.  
  2145. end_procedure terminate after 3 loops
  2146.  
  2147. procedure "P8b"
  2148.     create "lfighter"
  2149.         position 13231.1 -1993.94 17753.9
  2150.         armed_with "RED LASER" rate 6
  2151.         task
  2152.             goto 19260.8 -2283.67 16735.6
  2153.             goto 25948.2 -1073.37 13593.8
  2154.             shoot
  2155.             goto 32027.2 -2383.1 14218.4
  2156.             goto 34110.8 -3193.02 18597.4
  2157.             attack
  2158.         end
  2159.     pause 75
  2160. end_procedure terminate after 3 loops
  2161.  
  2162.  
  2163. wait_until proc "P8a" terminated
  2164. wait_until proc "P8b" terminated
  2165. wait_until number_of "aair" =0
  2166.  
  2167. pause 50
  2168.  
  2169. #==================================
  2170. #====wave 2
  2171.  
  2172. procedure "P8a"
  2173.     create "lfighter"
  2174.         position 38049 -573.974 15397.7
  2175.         towards "hero"
  2176.         armed_with "PLASMA BOLT 3" rate 16
  2177.         task
  2178.             land 38049 -2300 15397.7
  2179.             shoot "hero"
  2180.             goto 38150.4 -2300 15489.7
  2181.             goto 31404 -2379.15 14251.9
  2182.             goto 28588.1 -904.273 14892.6
  2183.             goto 28147.2 -613.805 12303.4
  2184.             attack
  2185.  
  2186.         end
  2187.     pause 25
  2188.  
  2189.     create "lfighter"
  2190.         position 36049 -573.974 15397.7
  2191.         towards "hero"
  2192.         armed_with "PLASMA BOLT 3" rate 16
  2193.         task
  2194.             land 36049 -1600 15397.7
  2195.             goto 36150.4 -2300 15489.7
  2196.             shoot "hero"
  2197.             goto 31404 -2379.15 14251.9
  2198.             goto 28588.1 -904.273 14892.6
  2199.             goto 28147.2 -613.805 12303.4
  2200.             attack
  2201.         end
  2202.     pause 25
  2203.  
  2204. end_procedure terminate after 5 loops
  2205.  
  2206. wait_until proc "P8a" terminated
  2207. wait_until number_of "aair" =0
  2208. #==================================
  2209. #====wave 3
  2210.  
  2211. procedure "P8a"
  2212.     create "lfighter"
  2213.         position 17967.1 -1502.95 8879.56
  2214.         armed_with "RED LASER" rate 6
  2215.         task
  2216.             goto 23400.7 -1525.91 8831.56
  2217.             shoot
  2218.             goto 29269.7 -1560.42 11202.8
  2219.             shoot
  2220.             goto 31317.3 -2486.77 15598
  2221.             shoot
  2222.             goto 28100.8 -2466.99 14082.7
  2223.             attack "hero"
  2224.  
  2225.         end
  2226.     pause 50
  2227.  
  2228. end_procedure terminate after 4 loops
  2229.  
  2230. procedure "P8b"
  2231.     pause 50
  2232.     create "lfighter"
  2233.         position 20095 -1490.92 3613.2
  2234.         armed_with "RED LASER" rate 6
  2235.         task
  2236.             goto 23400.7 -1525.91 8831.56
  2237.             shoot
  2238.             goto 29269.7 -1560.42 11202.8
  2239.             shoot
  2240.             goto 33744.9 -2473.03 9589.91
  2241.             shoot
  2242.             goto 30213.7 -2455.04 8853.45
  2243.             attack
  2244.  
  2245.         end
  2246. end_procedure terminate after 4 loops
  2247.  
  2248. wait_until proc "P8a" terminated
  2249. wait_until proc "P8b" terminated
  2250. wait_until number_of "aair" =0
  2251.  
  2252.  
  2253. #==================================
  2254. #====wave 4
  2255.  
  2256. procedure "P8a"
  2257.     create "lfighter"
  2258.         position 41350.2 -1007.2 8291.51
  2259.         armed_with "RED LASER" rate 6
  2260.         task
  2261.             goto 40705.9 -1811.59 8743.49
  2262.             shoot
  2263.             goto 37319.9 -2153.67 11656.5
  2264.             shoot
  2265.             goto 32353.1 -1953.11 15122.7
  2266.             goto 28092.2 -1016.93 13149
  2267.             attack
  2268.         end
  2269.     pause 25
  2270.  
  2271. end_procedure terminate after 6 loops
  2272.  
  2273.  
  2274. wait_until proc "P8a" terminated
  2275. wait_until number_of "aair" =0
  2276.  
  2277. create "hbomber"
  2278.     label "P8mother"
  2279.     position 15935 -527 15062
  2280.     towards "hero"
  2281.     armed_with "SATLASER" rate 256
  2282.     task
  2283.         land 15935 -3100 15062
  2284.  
  2285.         do
  2286.             patrol_towards
  2287.                 point 24092.7 -3100 15484.9
  2288.                 point 32402.1 -3100 14846.4
  2289.                 point 29976.4 -3100 10050.1
  2290.  
  2291.             shoot
  2292.         forever
  2293.     end
  2294.  
  2295. set_inert "hero"
  2296. if "P8rack" not destroyed
  2297.     set_inert "P8rack"
  2298.  
  2299. camera_task
  2300.     hud off
  2301.     cam_pos 0 -3000 3000 local to "P8mother"
  2302.     cam_focus "P8mother"
  2303.  
  2304.     pause 200
  2305.     cam_mode cockpit
  2306.     set_flag 25
  2307. end
  2308.  
  2309. wait_until flag 25 set
  2310. set_volatile "hero"
  2311. if "P8rack" not destroyed
  2312.     set_volatile "P8rack"
  2313.  
  2314.  
  2315. #....................................................................
  2316.     phasemessage 27 60
  2317.     play_speech "incoming alien mothership"
  2318. #....................................................................
  2319.  
  2320.  
  2321. wait_until "P8mother" destroyed
  2322. pause 50
  2323.  
  2324. #==================================
  2325. set_flag 31
  2326. set_inert "hero"
  2327. #....................................................................
  2328.     phasemessage 10 60
  2329.     play_speech "phase complete"
  2330. #....................................................................
  2331.  
  2332.  
  2333. pause 20
  2334.  
  2335. hud off
  2336. camera
  2337.     attached_to "hero"
  2338.     position 600 -300 -600
  2339.     pointing_at "hero"
  2340.     dolly 1
  2341.     dollyspeed 0.1%
  2342. pause 80
  2343.  
  2344.  
  2345. ;-------------------------------------------------------
  2346. ;PHASE 9
  2347. ;-------------------------------------------------------
  2348. clear_flag all
  2349. phasestart
  2350.  
  2351.  
  2352. set_inert "ring1"
  2353.  
  2354.  
  2355. mission_uncritical "P8b-team1"
  2356. mission_uncritical "P8b-team2"
  2357. mission_uncritical "P8-bug1"
  2358. mission_uncritical "P8-bug2"
  2359.  
  2360. set_inert "P8b-team2"
  2361. set_inert "P8-bug2"
  2362.  
  2363.  
  2364. switch_hero "P8b-team1"
  2365.     task
  2366.         position 27320.9 on ground 13587.1
  2367.         wait_until flag 0 set
  2368.         land  27320.9 -1250 13587.1
  2369.         wait_until flag 1 set
  2370.         playercontrols
  2371.             break_task_if flag 31 set
  2372.     end
  2373.  
  2374. auto_aim "hero"
  2375.  
  2376. set_task "P8-bug1"
  2377.     position 28143 on ground 13332.4
  2378.     wait_until flag 0 set
  2379.     land 28143 -1250 13332.4
  2380.     do
  2381.         wingman to "hero" at 3000 0 -2000
  2382.     until flag 9 set
  2383.     kill
  2384. end
  2385.  
  2386.  
  2387. camera_task
  2388.     hud off
  2389.     set_flag 0
  2390.     cam_pos 0 -200 3000 attached_to "hero"
  2391.     cam_focus  "P8-bug1"
  2392.     cam_goto -1000 -200 -300
  2393.  
  2394.     cam_pos 500 0 -500 attached_to "hero"
  2395.     cam_focus  "hero"
  2396.     dolly 1
  2397.     dollyspeed 0.1%
  2398.  
  2399.     pause 100
  2400.     cam_mode cockpit
  2401.     set_flag 1
  2402. end
  2403.  
  2404. wait_until flag 1 set
  2405.  
  2406. #....................................................................
  2407.     phasemessage 55 60
  2408.     play_speech "destroy all alien craft"
  2409. #....................................................................
  2410.  
  2411.  
  2412. #==================================
  2413.  
  2414. procedure "P9a"
  2415.     wait_until number_of "aair" <5
  2416.     create "lfighter"
  2417.         position 500 -3200 17000 local toxz "hero"
  2418.         towards "hero"
  2419.         armed_with "BLUE LASER"    rate 24
  2420.         task
  2421.             set_vel 4
  2422.             attack "hero"
  2423.                 break_task_if vel<2
  2424.             explode
  2425.         end
  2426.     pause 25
  2427. end_procedure terminate after 16 loops
  2428.  
  2429. wait_until proc "P9a" terminated
  2430. wait_until number_of "aair"<2
  2431.  
  2432. #....................................................................
  2433.     phasemessage 53 60
  2434.     play_speech "destroy shield generator"
  2435. #....................................................................
  2436. set_waypoint "bsgen8"
  2437. wait_until distance_between "hero" and waypoint < 8000
  2438. set_volatile "bsgen8"
  2439. wait_until "bsgen8" destroyed
  2440.  
  2441. #....................................................................
  2442.     phasemessage 52 60
  2443.     play_speech "destroy alien installation"
  2444. #....................................................................
  2445. set_waypoint "hub2"
  2446.  
  2447.  
  2448. procedure "P9a"
  2449.     wait_until number_of "aair" <5
  2450.     create "lfighter"
  2451.         position 500 -3200 17000 local toxz "hero"
  2452.         towards "hero"
  2453.         armed_with "BLUE LASER"    rate 24
  2454.         task
  2455.             set_vel 4
  2456.             attack "hero"
  2457.                 break_task_if vel<2
  2458.             explode
  2459.         end
  2460.     pause 25
  2461. end_procedure terminate after 12 loops
  2462.  
  2463. wait_until "hub2" destroyed
  2464. clear_waypoint
  2465. #....................................................................
  2466.     phasemessage 25 60
  2467.     play_speech "incoming alien craft"
  2468. #....................................................................
  2469.  
  2470. wait_until proc "P9a" terminated
  2471. wait_until number_of "aair" = 0
  2472.  
  2473.  
  2474. ;wait_until proc "P9a" terminated
  2475. wait_until number_of "aair"<2
  2476.  
  2477. #....................................................................
  2478.     phasemessage 53 60
  2479.     play_speech "destroy shield generator"
  2480. #....................................................................
  2481. set_volatile "bsgen5"
  2482. set_waypoint "bsgen5"
  2483. wait_until "bsgen5" destroyed
  2484.  
  2485. #....................................................................
  2486.     phasemessage 52 60
  2487.     play_speech "destroy alien installation"
  2488. #....................................................................
  2489.  
  2490. procedure "P9a"
  2491.     wait_until number_of "fighters" <9
  2492.     create "hfighter"
  2493.         position 0 -1100 0 local to "ring1"
  2494.         armed_with "BLUE LASER"    rate 24
  2495.         task
  2496.             land 0 -3500 0 local to "ring1"
  2497.             set_vel 70
  2498.             attack "hero"
  2499.                 break_task_if vel<2
  2500.             explode
  2501.         end
  2502.     
  2503.     pause 15
  2504.     wait_until number_of "fighters" <9
  2505.  
  2506.  
  2507.     create "hfighter"
  2508.         position 800 -1100 500 local to "ring1"
  2509.         towards "hero"
  2510.         armed_with "BLUE LASER"    rate 24
  2511.         task
  2512.             land 800 -3200 500 local to "ring1"
  2513.             set_vel 70
  2514.             attack "hero"
  2515.                 break_task_if vel<2
  2516.             explode
  2517.         end
  2518.  
  2519.     pause 15
  2520.     wait_until number_of "fighters" <9
  2521.  
  2522.     create "hfighter"
  2523.         position -800 -1100 -500 local to "ring1"
  2524.         armed_with "BLUE LASER"    rate 24
  2525.         task
  2526.             land -800 -2900 -500 local to "ring1"
  2527.             set_vel 70
  2528.             attack "hero"
  2529.                 break_task_if vel<2
  2530.             explode
  2531.         end
  2532.  
  2533.     pause 60
  2534.  
  2535. end_procedure terminate after 12 loops
  2536.  
  2537.  
  2538. set_waypoint "ring1"
  2539.  
  2540. pause 200
  2541. set_volatile "ring1"
  2542.  
  2543. wait_until "ring1" destroyed
  2544. clear_waypoint
  2545. end_procedure "P9a"
  2546.  
  2547.  
  2548. wait_until number_of "fighters" = 0
  2549.  
  2550. #==================================
  2551. set_flag 31
  2552. set_inert "hero"
  2553. #....................................................................
  2554.     phasemessage 10 60
  2555.     play_speech "phase complete"
  2556. #....................................................................
  2557.  
  2558.  
  2559. pause 20
  2560. set_flag 9
  2561.  
  2562. hud off
  2563. camera
  2564.     attached_to "hero"
  2565.     position 600 -300 -600
  2566.     pointing_at "hero"
  2567.     dolly 1
  2568.     dollyspeed 0.1%
  2569. pause 80
  2570.  
  2571. ;-------------------------------------------------------
  2572. ;PHASE 10
  2573. ;-------------------------------------------------------
  2574. clear_flag all
  2575. playcdtrack 4
  2576. phasestart
  2577.  
  2578. switch_hero "P8-bug2"
  2579.     task
  2580.         secondary_armed_with "DESIGNATOR" rate 64 rounds 80
  2581.         position 0 -150 0 relative to "P10H"
  2582.         playercontrols
  2583.             break_task_if flag 31 set
  2584.     end
  2585.  
  2586. camera_task
  2587.     hud off
  2588.     cam_pos 600 -200 -600 attached_to "hero"
  2589.     cam_focus "hero"
  2590.     dolly 0
  2591.     set_flag 0
  2592.  
  2593.     cam_goto -600 -200 -600
  2594.     wait_until distance_between "hero" and "P10H" > 800
  2595.  
  2596.     cam_mode cockpit
  2597. end
  2598.  
  2599. #....................................................................
  2600.     phasemessage 26 60
  2601.     play_speech "incoming alien fighters"
  2602. #....................................................................
  2603.  
  2604.  
  2605. auto_aim "hero"
  2606.  
  2607. kill "P8b-team1"
  2608. kill "P8b-team2"
  2609.  
  2610. create "bug"
  2611.     position 17000 -3200 500 relative to "P10H"
  2612.     armed_with "GREEN LASER" rate 8
  2613.     task
  2614.         defend "hero"
  2615.     end
  2616.  
  2617. create "bug"
  2618.     position -17000 -3200 500 relative to "P10H"
  2619.     armed_with "GREEN LASER" rate 8
  2620.     task
  2621.         defend "hero"
  2622.     end
  2623.  
  2624. generation_points
  2625.     position 45106.2 -1990 133338 
  2626.     position 43416.3 -1710 125449 
  2627.     position 55289.5 -1810 134714 
  2628.     position 60423.3 -1900 127578 
  2629.  
  2630. createstatic "vbshield"
  2631.     position 0 0 0 relative to "P10B1"
  2632.     label "P10shield"
  2633.  
  2634. set_inert "P10shield"
  2635.  
  2636. procedure "P10make"
  2637.     create "alnadubs"
  2638.         position at generation point
  2639.         armed_with "RED LASER" rate 16
  2640.         task
  2641.             attack
  2642.         end
  2643. end_procedure terminate after 4 loops
  2644.  
  2645. wait_until proc "P10make" terminated
  2646.  
  2647.  
  2648. create "command"
  2649.     position 0 -5000 34000 relative to "P10H"
  2650.     towards "hero"
  2651.     armed_with "RED LASER" rate 32
  2652.     task
  2653.         do
  2654.             move_towards 0 -5000 0 relative to "P10H"
  2655.             shoot
  2656.         until distance_between "P10H" and me <8000
  2657.         stop
  2658.  
  2659.         armed_with "DESIGNATOR" rate 256
  2660.         do
  2661.             shoot
  2662.         forever
  2663.     end
  2664.  
  2665.  
  2666. create "command"
  2667.     position 0 -5000 -44000 relative to "P10H"
  2668.     towards "hero"
  2669.     armed_with "RED LASER" rate 32
  2670.     task
  2671.         do
  2672.             move_towards 0 -5000 0 relative to "P10H"
  2673.             shoot
  2674.         until distance_between "P10H" and me <8000
  2675.         stop
  2676.  
  2677.         armed_with "DESIGNATOR" rate 256
  2678.         do
  2679.             shoot
  2680.         forever
  2681.     end
  2682.  
  2683. #==============================================================================================
  2684. generation_points
  2685.     position 0 -3200 17000 local toxz "hero"
  2686.     position -8000 -3200 -17000 local toxz "hero"
  2687.     position 8000 -3200 17000 local toxz "hero"
  2688.  
  2689. procedure "P10a"
  2690.  
  2691.     wait_until number_of "aair"< 6
  2692.     create "lfighter"
  2693.         position at generation point
  2694.         towards "hero"
  2695.         armed_with "RED LASER" rate 16
  2696.         task
  2697.             if rand & 1 = 0
  2698.                 attack "hero"
  2699.             else
  2700.             {
  2701.                 secondary_armed_with "ENERGY 2" rate 64 rounds 1
  2702.                 attack "P10H"
  2703.             }
  2704.  
  2705.             attack
  2706.         end
  2707.     pause 25
  2708.  
  2709. end_procedure terminate after 12 loops
  2710.  
  2711. pause 100
  2712. #....................................................................
  2713.     phasemessage 27 60
  2714.     play_speech "incoming alien mothership"
  2715. #....................................................................
  2716.  
  2717.  
  2718. wait_until proc "P10a" terminated
  2719.  
  2720. wait_until number_of "aair" = 0
  2721.  
  2722. #==============================================================================================
  2723.  
  2724. procedure "P10a"
  2725.  
  2726.  
  2727.     if "P10shield" not destroyed
  2728.     {
  2729.         wait_until number_of "Abld" <6
  2730.  
  2731.         pause 100
  2732.         set_volatile "P10shield"
  2733.         explode "P10shield"
  2734.  
  2735.  
  2736.         create "command"
  2737.             position 0 -5000 -34000 relative to "hero"
  2738.             towards "hero"
  2739.             armed_with "RED LASER" rate 16
  2740.             task
  2741.                 do
  2742.                     move_towards 0 -5000 0 relative to "P10B1"
  2743.                     shoot
  2744.                 until distance_between "P10B1" and me <20000
  2745.  
  2746. #....................................................................
  2747.     phasemessage 27 60
  2748.     play_speech "incoming alien mothership"
  2749. #....................................................................
  2750.  
  2751.                 do
  2752.                     move_towards 0 -5000 0 relative to "P10B1"
  2753.                     shoot
  2754.                 until distance_between "P10B1" and me <6000
  2755.  
  2756.  
  2757.  
  2758.                 stop
  2759.  
  2760.                 armed_with "ENERGY 2" rate 128
  2761.                 do
  2762.                     shoot "hero"
  2763.                 forever
  2764.             end
  2765.  
  2766. #....................................................................
  2767.     phasemessage 25 60
  2768.     play_speech "incoming alien craft"
  2769. #....................................................................
  2770.  
  2771.  
  2772.     }
  2773.  
  2774.     if "P10B1" not destroyed
  2775.     {
  2776.         wait_until number_of "aair" <9
  2777.         create "lfighter"
  2778.             position -1700 -4100 0 local toxz "hero"
  2779.             armed_with "RED LASER"    rate 16
  2780.             task
  2781.                 set_vel 70
  2782.                 attack "hero"
  2783.             end
  2784.         
  2785.         pause 50
  2786.  
  2787.         wait_until number_of "fighters" <9
  2788.  
  2789.         create "hfighter"
  2790.             position 800 -1100 500 local to "P10B1"
  2791.             towards "hero"
  2792.             armed_with "RED LASER"    rate 16
  2793.             task
  2794.                 land 800 -3200 500 local to "P10B1"
  2795.                 set_vel 70
  2796.                 attack "hero"
  2797.                     break_task_if vel<2
  2798.                 explode
  2799.             end
  2800.  
  2801.         pause 50
  2802.         wait_until number_of "aair" <9
  2803.  
  2804.         create "lfighter"
  2805.             position -800 -1100 -500 local to "P10B1"
  2806.             armed_with "RED LASER"    rate 16
  2807.             task
  2808.                 land -800 -2900 -500 local to "P10B1"
  2809.                 set_vel 70
  2810.                 attack "hero"
  2811.                     break_task_if vel<2
  2812.                 explode
  2813.             end
  2814.  
  2815.         pause 60
  2816.     }
  2817.  
  2818. end_procedure
  2819.  
  2820. #....................................................................
  2821.     phasemessage 50 60
  2822.     play_speech "follow waypoint marker"
  2823. #....................................................................
  2824.  
  2825.  
  2826. set_waypoint "P10B7"
  2827.  
  2828. wait_until distance_between "hero" and waypoint < 10000
  2829. #....................................................................
  2830.     phasemessage 52 60
  2831.     play_speech "destroy alien installation"
  2832. #....................................................................
  2833.  
  2834.  
  2835. wait_until "P10B7" destroyed
  2836.  
  2837. if "P10B3" not destroyed
  2838. {
  2839.     set_waypoint "P10B3"
  2840.  
  2841. #=========================================
  2842.  
  2843.     wait_until "P10B3" destroyed
  2844. }
  2845.  
  2846. if "P10B4" not destroyed
  2847. {
  2848.     set_waypoint "P10B4"
  2849.     wait_until "P10B4" destroyed
  2850. }
  2851.  
  2852. if "P10B5" not destroyed
  2853. {
  2854.     set_waypoint "P10B5"
  2855.     wait_until "P10B5" destroyed
  2856. }
  2857.  
  2858. if "P10B6" not destroyed
  2859. {
  2860.     set_waypoint "P10B6"
  2861.     wait_until "P10B6" destroyed
  2862. }
  2863.  
  2864. if "P10B2" not destroyed
  2865. {
  2866.     set_waypoint "P10B2"
  2867.     wait_until "P10B2" destroyed
  2868. }
  2869.  
  2870. if "P10B1" not destroyed
  2871. {
  2872.     set_waypoint "P10B1"
  2873.     wait_until "P10B1" destroyed
  2874. }
  2875.  
  2876. clear_waypoint
  2877.  
  2878. end_procedure "P10a"
  2879.  
  2880. wait_until number_of "aair" = 0
  2881. wait_until number_of "fighters" = 0
  2882. wait_until number_of "amother" = 0
  2883. pause 50
  2884. #....................................................................
  2885.     phasemessage 26 60
  2886.     play_speech "incoming alien fighters"
  2887. #....................................................................
  2888.  
  2889.  
  2890. generation_points
  2891.     position 0 -3200 -17000 local toxz "hero"
  2892.     position 0 -3200 17000 local toxz "hero"
  2893.     position -17000 -3200 0 local toxz "hero"
  2894.     position 17000 -3200 0 local toxz "hero"
  2895.  
  2896.  
  2897. procedure "P10a"
  2898.  
  2899.     create "lfighter"
  2900.         position at generation point
  2901.         towards "hero"
  2902.         armed_with "RED LASER" rate 16
  2903.         task
  2904.             attack
  2905.         end
  2906.     pause 25
  2907.  
  2908. end_procedure terminate after 8 loops
  2909. wait_until proc "P10a" terminated
  2910.  
  2911. wait_until number_of "aair" = 0
  2912.  
  2913. #=================================
  2914. set_flag 31
  2915. set_inert "hero"
  2916. #....................................................................
  2917.     phasemessage 9 60
  2918.     play_speech "scenario complete"
  2919. #....................................................................
  2920.  
  2921.  
  2922. pause 20
  2923.  
  2924. hud off
  2925. camera
  2926.     attached_to "hero"
  2927.     position 600 -300 -600
  2928.     pointing_at "hero"
  2929.     dolly 1
  2930.     dollyspeed 0.1%
  2931. pause 80
  2932.  
  2933. ;-------------------------------------------------------
  2934. ;END OF SCENARIO
  2935.