home *** CD-ROM | disk | FTP | other *** search
/ 100 Pусских Uгр / 980121_2306.iso / SUPER3D / RAMPAGER.ZIP / REDNECK.GRP / COOT.CON < prev    next >
Text File  |  1997-07-16  |  10KB  |  467 lines

  1. // COOT
  2.  
  3. // Tiles starting positions for Coot
  4. // COOT        5376  actor - Tile to be used in MAKEMAP
  5. // COOTSTAYPUT 5377  actor - Tile to be used in MAKEMAP
  6. // COOTSHOOT   5411
  7. // COOTDIE     5437
  8. // COOTDUCK    5481
  9. // COOTPAIN    5548
  10. // COOTTRANS   5568
  11. // COOTGETUP   5579
  12.  
  13. // Local defines
  14.  
  15. // Define actions
  16. action ACOOTDEFAULT     0  1  5  1    1
  17. action ACOOTWALKING     0  7  5  1   11
  18. action ACOOTSTAND      69  7  5  1   13
  19. action ACOOTRUNNING     0  7  5  1   11
  20. action ACOOTSHOOT      35  2  5  1   23
  21. action ACOOTRAISEGUN   45  2  5 -1   10
  22. action ACOOTLOWERGUN   55  2  5  1   10
  23. action ACOOTPAIN      172  4  5  1   22
  24. action ACOOTDYING      61  9  1  1   16
  25. action ACOOTLYINGDEAD  68  1  1  1    1
  26. action ACOOTFALLDOWN   61  7  1  1   16
  27. action ACOOTGETUP     148  3  5  1   13
  28. action ACOOTDUCKWALK  105  9  5  1   11
  29. action ACOOTCROUCHUP  192  2  5  1   10
  30. action ACOOTCROUCHDN  197  2  5 -1   10
  31.  
  32. // Define movements
  33. move   COOTDUCKWALKVEL    18
  34. move   COOTWALKVEL        35
  35. move   COOTRUNVEL         35
  36. move   COOTSTOP
  37.  
  38. // Define AI states
  39. ai AICOOTDUCKWALK     ACOOTDUCKWALK   COOTDUCKWALKVEL  dodgebullet geth
  40. ai AICOOTGETENEMY     ACOOTWALKING    COOTWALKVEL      seekplayer
  41. ai AICOOTDODGE        ACOOTRUNNING    COOTRUNVEL       dodgebullet
  42. ai AICOOTCHARGEENEMY  ACOOTRUNNING    COOTRUNVEL       seekplayer
  43. ai AICOOTFLEENEMY     ACOOTWALKING    COOTWALKVEL      fleeenemy
  44. ai AICOOTDYING        ACOOTDYING      COOTSTOP         faceplayer
  45. ai AICOOTSHOOT        ACOOTSHOOT      COOTSTOP         faceplayer
  46. ai AICOOTLOWERGUN     ACOOTLOWERGUN   COOTSTOP         faceplayer
  47. ai AICOOTRAISEGUN     ACOOTRAISEGUN   COOTSTOP         faceplayer
  48. ai AICOOTFALLDOWN     ACOOTFALLDOWN   COOTSTOP         faceplayer
  49. ai AICOOTGETUP        ACOOTGETUP      COOTSTOP         faceplayerslow
  50. ai AICOOTPAIN         ACOOTPAIN       COOTSTOP         faceplayerslow
  51. ai AICOOTSTAND        ACOOTSTAND      COOTSTOP         faceplayerslow
  52. ai AICOOTCROUCHUP     ACOOTCROUCHUP   COOTSTOP         faceplayerslow
  53. ai AICOOTCROUCHDN     ACOOTCROUCHDN   COOTSTOP         faceplayerslow
  54.  
  55.  
  56. // States (subroutines) ******************************
  57. state coot_jibs
  58.   guts JIBS2 1
  59.   guts JIBS3 2
  60.   guts JIBS4 3
  61.   guts COOTJIBA 1
  62.   guts COOTJIBB 1
  63.   guts COOTJIBC 2
  64.   ifrnd 6
  65.   {
  66.     guts JIBS1 1
  67.     spawn BLOODPOOL
  68.   }         // spine
  69.   state jib_sounds
  70. ends
  71.  
  72. state cootseekstate
  73.   // This coot type is usually put behind counters
  74.   // He duckwalks around and then pops up, if he
  75.   // can see you he'll shoot, then he ducks back
  76.   // down and duckwalks around
  77.   ifspritepal 31
  78.   {
  79.     ifp palive
  80.      ifcansee
  81.        ifcanshoottarget
  82.        {
  83.           ai AICOOTRAISEGUN
  84.           break
  85.        }
  86.   }
  87.   else
  88.   {
  89.     // If COOT is allowed to leave his home sector
  90. //    ifactornotstayput
  91. //    {
  92.       // if current COOT ai is charging enemy
  93.       ifai AICOOTCHARGEENEMY
  94.       {
  95.         // NN out of 256 times, if player distance > 3072
  96.         // and player is alive and COOT can
  97.         // see player, switch ai to shoot
  98.  
  99.          ifrnd 32
  100.            ifp palive
  101.              ifcansee
  102.                ifcanshoottarget
  103.              {
  104.                 ai AICOOTRAISEGUN
  105.                 break
  106.              }
  107.  
  108.          ifactioncount 3
  109.          {
  110.             ifrnd 8
  111.             {
  112.                ai AICOOTFLEENEMY
  113.                break
  114.             }
  115.  
  116.             ifrnd 8
  117.             {
  118.                ai AICOOTCROUCHDN
  119.                break
  120.             }
  121.          }
  122.       }
  123.       // if ai NOT charge, and distance > 1596
  124.       // switch ai so IS charge
  125.       else ifpdistg 1596
  126.       {
  127.          ai AICOOTCHARGEENEMY
  128.          break
  129.       }
  130.       else ifpdistl 1597
  131.       {
  132.         ifrnd 16
  133.         {
  134.           ai AICOOTSHOOT
  135.           break;
  136.         }
  137.       }
  138.  
  139.  
  140.       // NN out of 256 times, if we get down here in
  141.       // the code and we're not moving
  142.       // try opening a door to find player
  143.       ifrnd 4
  144.         ifnotmoving
  145.           operate
  146.       // else NN out of 256 times, if projectile near
  147.       else ifrnd 16
  148.         ifbulletnear
  149.         {
  150.           ai AICOOTDODGE
  151.         }
  152. //    }
  153.     // Else COOT confined to home sector
  154. //    else
  155. //    {
  156.       // if count > 16, 32 out of 256 times, move COOT at a
  157.       // random angle with current horizontal movement
  158. //      ifcount 16
  159. //        ifrnd 32
  160. //          move COOTWALKVEL randomangle geth
  161. //    }
  162.  
  163.   }  // end else not spritepal 31
  164.  
  165. // end COOTseekstate
  166. ends
  167.  
  168.  
  169. state cootfleestate
  170.  
  171.   // if count > NN
  172.   ifcount 10
  173.   {
  174.     // NN out of 256 times, if dist > NN, and player alive,
  175.     // and can see, switch ai to shoot
  176.     ifrnd 32
  177.     {
  178.       ifpdistg 2048
  179.         ifp palive
  180.           ifcansee
  181.             ifcanshoottarget
  182.               ai AICOOTRAISEGUN
  183.     }
  184.   }
  185.   // else count <= NN
  186.   else
  187.   {
  188.     iffloordistl 16
  189.     {
  190.       ifnotmoving
  191.         ai AICOOTGETENEMY
  192.     }
  193.     else
  194.       ai AICOOTGETENEMY
  195.     break
  196.   }
  197. // end COOTfleestate
  198. ends
  199.  
  200.  
  201. state checkcoothit
  202.   spawn BLOOD
  203.   ifdead
  204.   {
  205.     state random_wall_jibs
  206.     // state drop_ammo
  207.     addkills 1
  208.     ifwasweapon CROWBAR
  209.     {
  210.       state drop_pistol
  211.       spawn AMMO
  212.     }
  213.     ifwasweapon RIFLE
  214.     {
  215.       state drop_pistol
  216.     }
  217.     ifwasweapon SHOTGUN
  218.     {
  219.      state drop_pistol
  220.     }
  221.     ifwasweapon SHOTSPARK1
  222.     {
  223.      state drop_pistol
  224.     }
  225.     ifwasweapon CROSSBOW
  226.     {
  227.       state drop_ammo
  228.       sound SQUISHED
  229.       // state standard_jibs
  230.       state coot_jibs
  231.       killit
  232.     }
  233.     else
  234.       ifwasweapon RADIUSEXPLOSION
  235.     {
  236.       state drop_pistol
  237.       sound SQUISHED
  238.       spawn BLOODPOOL
  239.       // state standard_jibs
  240.       state coot_jibs
  241.       killit
  242.     }
  243.     else
  244.     {
  245.       // if wasn't blown up, leave body as
  246.       // solid so can be blown up
  247.       ai AICOOTDYING
  248.     }
  249.     sound CT_DIE
  250.   }
  251.   else
  252.   {
  253.     sound CT_PAIN
  254.     state random_wall_jibs
  255.  
  256.     // If this is other type of Coot,
  257.     //  Have him duck back down behind the counter
  258.     //  if he's been shot
  259.     ifspritepal 31
  260.     {
  261.       ai AICOOTCROUCHDN
  262.     }
  263.     else
  264.     {
  265.       ifrnd 64
  266.       {
  267.         ai AICOOTPAIN
  268.       }
  269.       else ifrnd 64
  270.         ai AICOOTSHOOT
  271.       else ifrnd 64
  272.         ai AICOOTFALLDOWN
  273.       else
  274.         ai AICOOTDODGE
  275.     }
  276.   }
  277. ends
  278.  
  279.  
  280. state cootdyingstate
  281.   ifaction ACOOTLYINGDEAD
  282.   {
  283.     strength 0
  284.     ifhitweapon
  285.       ifwasweapon RADIUSEXPLOSION
  286.       {
  287.         sound SQUISHED
  288.         // state standard_jibs
  289.         state coot_jibs
  290.         killit
  291.         break
  292.       }
  293.   }
  294.   else ifai AICOOTDYING
  295.   {
  296.     ifactioncount 6
  297.     {
  298.       ifrnd 64
  299.         spawn BLOODPOOL
  300.       state bf
  301.       iffloordistl 8
  302.         sound THUD
  303.       move COOTSTOP
  304.       action ACOOTLYINGDEAD
  305.       break
  306.     }
  307.   }
  308. ends
  309.  
  310.  
  311. state cootdodgestate
  312.   ifactioncount 33
  313.     ai AICOOTGETENEMY
  314. ends
  315.  
  316. state cootduckwalkstate
  317.   // Coots with special tags duckwalk more
  318.   // then Coots which wander around
  319.   ifspritepal 31
  320.   {
  321.     ifactioncount 23
  322.       ai AICOOTCROUCHUP
  323.   }
  324.   else
  325.   {
  326.     ifactioncount 13
  327.       ai AICOOTCROUCHUP
  328.   }
  329. ends
  330.  
  331. state cootshootstate
  332.     ifactioncount 5
  333.     {
  334.       ai AICOOTLOWERGUN
  335.       break
  336.     }
  337.     ifcount 11
  338.       nullop
  339.     else ifcount 10
  340.     {
  341.         sound CASUL_FIRE
  342.         shoot RIFLE
  343.  
  344.         resetcount
  345.     }
  346.  
  347. ends
  348.  
  349. // Actors ********************************************
  350. actor COOTSTAYPUT COOTSTRENGTH ACOOTDEFAULT
  351.         ai AICOOTGETENEMY
  352.         cactor COOT
  353. enda
  354.  
  355.  
  356. actor COOT COOTSTRENGTH ACOOTDEFAULT
  357.   fall
  358.   state checksquished
  359.  
  360.   ifai 0
  361.   {
  362.     cstator 257
  363.     ai AICOOTGETENEMY
  364.   }
  365.  
  366.   ifaction ACOOTLYINGDEAD
  367.   {
  368.     state cootdyingstate
  369.     break
  370.   }
  371.   else
  372.   {
  373.     ifai AICOOTGETENEMY
  374.     {
  375.       state cootseekstate
  376.     }
  377.     else ifai AICOOTCHARGEENEMY
  378.     {
  379.       state cootseekstate
  380.     }
  381.     else ifai AICOOTPAIN
  382.     {
  383.       ifcount 18
  384.         ai AICOOTGETENEMY
  385.     }
  386.     else ifai AICOOTDODGE
  387.     {
  388.         state cootdodgestate
  389.     }
  390.     else ifai AICOOTGETUP
  391.     {
  392.         ifactioncount 2
  393.            ai AICOOTGETENEMY
  394.     }
  395.     else ifai AICOOTFALLDOWN
  396.     {
  397.         ifactioncount 2
  398.            ai AICOOTGETUP
  399.     }
  400.     else ifai AICOOTCROUCHUP
  401.     {
  402.         ifactioncount 2
  403.            ai AICOOTGETENEMY
  404.     }
  405.     else ifai AICOOTCROUCHDN
  406.     {
  407.         ifactioncount 2
  408.            ai AICOOTDUCKWALK
  409.     }
  410.     else ifai AICOOTDUCKWALK
  411.     {
  412.         state cootduckwalkstate
  413.     }
  414.     else ifai AICOOTRAISEGUN
  415.     {
  416.       ifactioncount 2
  417.         ai AICOOTSHOOT
  418.     }
  419.     else ifai AICOOTLOWERGUN
  420.     {
  421.       ifactioncount 2
  422.       {
  423.         // If tagged Coot, duck back down behind
  424.         // counter when done shooting
  425.         ifspritepal 31
  426.         {
  427.            ai AICOOTCROUCHDN
  428.         }
  429.         // else get enemy
  430.         else
  431.           ai AICOOTGETENEMY
  432.       }
  433.     }
  434.     else ifai AICOOTFLEENEMY
  435.     {
  436.         state cootfleestate
  437.     }
  438.     else ifai AICOOTDYING
  439.     {
  440.         state cootdyingstate
  441.     }
  442.     else ifai AICOOTSHOOT
  443.     {
  444.         state cootshootstate
  445.     }
  446.   }
  447.  
  448.   ifhittruck
  449.   {
  450.       ai AICOOTDYING
  451.   }
  452.   else ifhitweapon
  453.       state checkcoothit
  454.  
  455.   // ifrnd 3
  456.   ifrnd 3
  457.   {
  458.       ifrnd 16
  459.         soundonce CT_LAF2
  460.       else ifrnd 16
  461.         soundonce CT_LAND
  462.   }
  463. enda
  464.  
  465. // End of Use COOT
  466.  
  467.