home *** CD-ROM | disk | FTP | other *** search
/ PC & Mediji 1997 February / PCM_9702.iso / igre / rddemo / demo / coot.con < prev    next >
Text File  |  1997-01-20  |  9KB  |  425 lines

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