home *** CD-ROM | disk | FTP | other *** search
/ 100 Pусских Uгр / 980121_2306.iso / SUPER3D / RAMPAGER.ZIP / BILLY.CON next >
Text File  |  1997-07-16  |  11KB  |  558 lines

  1. /* BILLY RAY */
  2.  
  3. // BILLYWALK       4096
  4. // BILLYDIE        4136
  5. // BILLYCOCK       4147
  6. // BILLYRAY        4162
  7. // BILLYSHOOT      4162
  8. // BILLYRAYSTAYPUT 4163
  9. // BILLYBUT        4188
  10. // BILLYSCRATCH    4191
  11. // BILLYSNIFF      4195
  12. // BILLYWOUND      4202
  13. // BILLYGORE       4228
  14. // BILLYRAYAMBUSH  4250
  15.  
  16. // Define actions
  17. action ABILLYWALK      -66   8  5  1 11
  18. action ABILLYRUN       -66   8  5  1 11
  19. action ABILLYSHOOT       0   5  5  1 28
  20. action ABILLYCOCK      -15   3  5  1 26
  21. action ABILLYSTAND       0   1  1  1 40
  22. action ABILLYDYING     -26  11  1  1 11
  23. action ABILLYHIT        40   5  5  1 26
  24. action ABILLYDEAD      -16   1  1  1  1
  25. action ABILLYTRKDEAD    71   1  1  1  1
  26. action ABILLYITCH       26   3  1  1 18
  27. action ABILLYSCRATCH    29   3  1  1 18
  28. action ABILLYSNIFF      32   7  1  1 11
  29. action ABILLYJIBONE     66   1  1  1  1
  30. action ABILLYJIBTWO     66   5  1  1 12
  31. action ABILLYJIBDEAD    70   1  1  1  1
  32.  
  33. // Define movements
  34. move BILLYWALKVELS 72
  35. move BILLYRUNVELS 108
  36. move BILLYSTOPPED
  37.  
  38. // Define AI states
  39. ai AIBILLYSEEKENEMY  ABILLYWALK    BILLYWALKVELS seekplayer
  40. ai AIBILLYSHOOTENEMY ABILLYSHOOT   BILLYSTOPPED  faceplayer
  41. ai AIBILLYFLEEENEMY  ABILLYWALK    BILLYWALKVELS fleeenemy
  42. ai AIBILLYSHOOT      ABILLYSHOOT   BILLYSTOPPED  faceplayer
  43. ai AIBILLYDODGE      ABILLYRUN     BILLYRUNVELS  dodgebullet
  44. ai AIBILLYCHARGE     ABILLYRUN     BILLYRUNVELS  seekplayer
  45. ai AIBILLYDYING      ABILLYDYING   BILLYSTOPPED  faceplayer
  46. ai AIBILLYTRKDYING   ABILLYDYING   BILLYSTOPPED  faceplayer
  47. ai AIBILLYHIT        ABILLYHIT     BILLYSTOPPED  faceplayer
  48. ai AIBILLYITCH       ABILLYITCH    BILLYSTOPPED  faceplayer
  49. ai AIBILLYSCRATCH    ABILLYSCRATCH BILLYSTOPPED  faceplayer
  50. ai AIBILLYSNIFF      ABILLYSNIFF   BILLYSTOPPED  faceplayer
  51. ai AIBILLYJIBONE     ABILLYJIBONE  BILLYSTOPPED  faceplayer
  52. ai AIBILLYJIBTWO     ABILLYJIBTWO  BILLYSTOPPED  faceplayer
  53.  
  54.  
  55. // States (subroutines) ******************************
  56. state billy_jibs
  57.   guts JIBS2 1
  58.   guts JIBS3 2
  59.   guts JIBS4 3
  60.   guts BILLYJIBA 1
  61.   guts BILLYJIBB 2
  62.   ifrnd 6
  63.   {
  64.     guts JIBS1 1
  65.     spawn BLOODPOOL
  66.   }         // spine
  67.   state jib_sounds
  68. ends
  69.  
  70. state billyitchstate
  71.   ifcount 18
  72.   {
  73.     ai AIBILLYSCRATCH
  74.     sound BR_SCRTH
  75.   }
  76. ends
  77.  
  78. state billyscratchstate
  79.   ifactioncount 18
  80.   {
  81.       ai AIBILLYSNIFF
  82.       sound BR_SNIFF
  83.   }
  84. ends
  85.  
  86. state billysniffstate
  87.   ifcount 18
  88.   {
  89.     ai AIBILLYSEEKENEMY
  90.   }
  91. ends
  92.  
  93.  
  94. state billyseekenemystate
  95.   ifactornotstayput
  96.   {
  97.      // Billy with set pal num 31 and 32
  98.      //  shoot less and seek more (32 is also deaf)
  99.      ifspritepal 31
  100.      {
  101.         ifrnd 8
  102.         {
  103.           ifp palive
  104.             ifcansee
  105.               ifcanshoottarget
  106.             {
  107.               ai AIBILLYSHOOTENEMY
  108.               break
  109.             }
  110.         }
  111.      }
  112.      else ifspritepal 32
  113.      {
  114.         ifrnd 8
  115.         {
  116.           ifp palive
  117.             ifcansee
  118.               ifcanshoottarget
  119.             {
  120.               ai AIBILLYSHOOTENEMY
  121.               break
  122.             }
  123.         }
  124.      }
  125.      // NN out of 256 times, if player is alive and billy can
  126.      // see player, switch ai to shoot
  127.      else ifrnd 32
  128.      {
  129.        ifp palive
  130.          ifcansee
  131.            ifcanshoottarget
  132.            {
  133.              ai AIBILLYSHOOTENEMY
  134.              break
  135.            }
  136.      }
  137.      else ifrnd 32
  138.      {
  139.         ifpdistg 3084
  140.         {
  141.           ai AIBILLYSEEKENEMY
  142.           break
  143.         }
  144.      }
  145.  
  146.      // NN out of 256 times, if we get down here in
  147.      // the code and we're not moving
  148.      // try opening a door to find player
  149.      ifrnd 8
  150.        ifnotmoving
  151.          operate
  152.  
  153.   }
  154.   // Else Billy Ray confined to home sector
  155.   else
  156.   {
  157.     ifrnd 32
  158.       ifp palive
  159.         ifcansee
  160.           ifcanshoottarget
  161.         {
  162.           ai AIBILLYSHOOTENEMY
  163.           break
  164.         }
  165.  
  166.     ifcount 48
  167.     {
  168.       ifrnd 8
  169.         ifp palive
  170.           ifcansee
  171.             ifcanshoottarget
  172.           {
  173.             ifrnd 192
  174.               ai AIBILLYSHOOTENEMY
  175.             else
  176.               ai AIBILLYFLEEENEMY
  177.             break
  178.           }
  179.     }
  180.   }
  181. ends
  182.  
  183.  
  184. state billyshootenemystate
  185.     {
  186.  
  187.         ifrnd 2
  188.           ifrnd 16
  189.           {
  190.               ai AIBILLYSCRATCH
  191.               break
  192.           }
  193.  
  194.         // Logic means when count = 12, and ifcanshoottarget
  195.         //    shoot SHOTGUN
  196.         ifcount 12
  197.             { }
  198.         else ifcount 11
  199.         {
  200.           ifcansee
  201.             ifcanshoottarget
  202.             {
  203.               sound SHOT6
  204.               shoot SHOTGUN
  205.               shoot SHOTGUN
  206.               shoot SHOTGUN
  207.               shoot SHOTGUN
  208.               shoot SHOTGUN
  209.             }
  210.             else
  211.                 ai AIBILLYSEEKENEMY
  212.         }
  213.  
  214.         // Logic means when count = 25, cock shotgun
  215.         ifcount 25
  216.             { }
  217.         else ifcount 24
  218.         {
  219.             action ABILLYCOCK
  220.             sound GUNCHANG
  221.  
  222.         }
  223.  
  224.         // Billy with set pal num 31 and 32
  225.         //  shoot less and seek more (32 is also deaf)
  226.         ifcount 46
  227.             { }
  228.         else ifcount 45
  229.         {
  230.             ifspritepal 31
  231.             {
  232.                 action ABILLYWALK
  233.                 ifpdistl 768
  234.                     ai AIBILLYFLEEENEMY
  235.                 else
  236.                     ai AIBILLYSEEKENEMY
  237.                 break
  238.             }
  239.             else ifspritepal 32
  240.             {
  241.                 action ABILLYWALK
  242.                 ifpdistl 768
  243.                     ai AIBILLYFLEEENEMY
  244.                 else
  245.                     ai AIBILLYSEEKENEMY
  246.                 break
  247.             }
  248.         }
  249.  
  250.         // Logic means when count = 48, and ifcanshoottarget
  251.         //    shoot SHOTGUN
  252.         ifcount 48
  253.             { }
  254.         else ifcount 47
  255.         {
  256.           ifcansee
  257.             ifcanshoottarget
  258.             {
  259.                 sound SHOT6
  260.                 shoot SHOTGUN
  261.                 shoot SHOTGUN
  262.                 shoot SHOTGUN
  263.                 shoot SHOTGUN
  264.                 shoot SHOTGUN
  265.             }
  266.             else
  267.                 ai AIBILLYSEEKENEMY
  268.         }
  269.  
  270.         // Logic means when count = 60, cock shotgun
  271.         ifcount 60
  272.         { }
  273.         else ifcount 59
  274.         {
  275.             action ABILLYCOCK
  276.             sound GUNCHANG
  277.         }
  278.  
  279.         // Logic means when count > 72,
  280.         // NN out of 256 times resetcount
  281.         // else either flee, or seek enemy
  282.         ifcount 72
  283.         {
  284.             ifrnd 64
  285.                 resetcount
  286.             else
  287.             {
  288.                 ifpdistl 768
  289.                     ai AIBILLYFLEEENEMY
  290.                 else
  291.                     ai AIBILLYSEEKENEMY
  292.                 break
  293.             }
  294.         }
  295.  
  296.         ifaction ABILLYCOCK
  297.             ifactioncount 2
  298.                 action ABILLYSHOOT
  299.  
  300.  
  301.     }
  302. ends
  303.  
  304. state billyfleeenemystate
  305.   ifactioncount 8
  306.   {
  307.     ifrnd 32
  308.     {
  309.       ai AIBILLYITCH
  310.       sound BR_ITCH
  311.     }
  312.     else
  313.       ai AIBILLYSEEKENEMY
  314.   }
  315.   else
  316.     ifnotmoving
  317.       ai AIBILLYITCH
  318. ends
  319.  
  320. state checkbillyhitstate
  321.   spawn BLOOD
  322.   ifdead
  323.   {
  324.     state random_wall_jibs
  325.     // state drop_shotgun
  326.     addkills 1
  327.     ifwasweapon SHOTGUN
  328.     {
  329.       state drop_shotgun
  330.     }
  331.     ifwasweapon SHOTSPARK1
  332.     {
  333.       state drop_shotgun
  334.     }
  335.     ifwasweapon RIFLE
  336.     {
  337.       state drop_shotgun
  338.     }
  339.     ifwasweapon CIRCLESAW {
  340.       state drop_shotgun
  341.     }
  342.     ifwasweapon RADIUSEXPLOSION
  343.     {
  344.        state drop_shotgun
  345.        sound SQUISHED
  346.        spawn BLOODPOOL
  347.        state nf
  348.        ai AIBILLYJIBONE
  349.        state billy_jibs
  350.        state jib_sounds
  351.        break
  352.     }
  353.     else
  354.       ifwasweapon CROSSBOW
  355.       {
  356.         state drop_shotgun
  357.         sound SQUISHED
  358.         state billy_jibs
  359.         killit
  360.       }
  361.     else
  362.     {
  363.       ai AIBILLYDYING
  364.     }
  365.     sound BR_DTH
  366.   }
  367.   else
  368.   {
  369.     sound BR_PAIN
  370.     state random_wall_jibs
  371.  
  372.     ifrnd 64
  373.         ai AIBILLYHIT
  374.     else
  375.       ifrnd 64
  376.         ai AIBILLYSHOOTENEMY
  377.     else
  378.       ifrnd 64
  379.       {
  380.         ai AIBILLYFLEEENEMY
  381.         action ABILLYWALK
  382.       }
  383.   }
  384. ends
  385.  
  386. state billydyingstate
  387.   ifactioncount 11
  388.   {
  389.     ifrnd 64
  390.       spawn BLOODPOOL
  391.     state bf
  392.     iffloordistl 8
  393.       sound THUD
  394.     action ABILLYDEAD
  395.     move BILLYSTOPPED
  396.     break
  397.   }
  398. ends
  399.  
  400. state billytrkdyingstate
  401.   ifactioncount 5
  402.   {
  403.     spawn BLOODPOOL
  404.     state nf
  405.     iffloordistl 8
  406.       sound THUD
  407.     action ABILLYTRKDEAD
  408.     move BILLYSTOPPED
  409.     break
  410.   }
  411. ends
  412.  
  413. state billyjibbedstate
  414.   ifai AIBILLYJIBTWO
  415.     ifactioncount 5
  416.     {
  417.       iffloordistl 8
  418.         sound THUD
  419.       action ABILLYJIBDEAD
  420.       move BILLYSTOPPED
  421.       break
  422.     }
  423. ends
  424.  
  425. // Actors ********************************************
  426. actor BILLYRAYSTAYPUT BILLYRAYSTRENGTH ABILLYSTAND
  427.   ai AIBILLYSEEKENEMY
  428.   cactor BILLYRAY
  429. enda
  430.  
  431. actor BILLYRAY BILLYRAYSTRENGTH ABILLYSTAND
  432.   fall
  433.  
  434.   state checksquished
  435.   ifaction ABILLYSTAND
  436.     ai AIBILLYSEEKENEMY
  437.   else ifaction ABILLYDEAD
  438.   {
  439.     strength 0
  440.     ifhitweapon
  441.       ifwasweapon RADIUSEXPLOSION
  442.       {
  443.         sound SQUISHED
  444.         state billy_jibs
  445.         killit
  446.       }
  447.     break
  448.   }
  449.   else ifaction ABILLYJIBONE
  450.   {
  451.     strength 0
  452.  
  453.     ifactioncount 30
  454.     {
  455.       ai AIBILLYJIBTWO
  456.       break
  457.     }
  458.     ifhitweapon
  459.       ifwasweapon RADIUSEXPLOSION
  460.       {
  461.         sound SQUISHED
  462.         state billy_jibs
  463.         killit
  464.       }
  465.       break
  466.   }
  467.   else ifaction ABILLYJIBDEAD
  468.   {
  469.     strength 0
  470.     ifhitweapon
  471.       ifwasweapon RADIUSEXPLOSION
  472.       {
  473.         sound SQUISHED
  474.         state billy_jibs
  475.         killit
  476.       }
  477.       break
  478.   }
  479.   else ifaction ABILLYTRKDEAD
  480.   {
  481.     strength 0
  482.     ifhitweapon
  483.       ifwasweapon RADIUSEXPLOSION
  484.       {
  485.         sound SQUISHED
  486.         state billy_jibs
  487.         killit
  488.       }
  489.       break
  490.   }
  491.   else ifai AIBILLYDYING
  492.     state billydyingstate
  493.   else ifai AIBILLYTRKDYING
  494.     state billytrkdyingstate
  495.   else ifai AIBILLYJIBONE
  496.     state billyjibbedstate
  497.   else ifai AIBILLYJIBTWO
  498.     state billyjibbedstate
  499.   else ifai AIBILLYHIT
  500.   {
  501.     ifactioncount 3
  502.     ai AIBILLYSEEKENEMY
  503.   }
  504.   else
  505.   {
  506.     ifai AIBILLYSEEKENEMY
  507.       state billyseekenemystate
  508.     else ifai AIBILLYDODGE
  509.       state billyseekenemystate
  510.     else ifai AIBILLYSHOOTENEMY
  511.       state billyshootenemystate
  512.     else ifai AIBILLYFLEEENEMY
  513.       state billyfleeenemystate
  514.     else ifai AIBILLYCHARGE
  515.       state billyseekenemystate
  516.     else ifai AIBILLYITCH
  517.     {
  518.       ifcount 18
  519.       {
  520.         ai AIBILLYSCRATCH
  521.         sound BR_SCRTH
  522.       }
  523.     }
  524. //      state billyitchstate
  525.     else ifai AIBILLYSCRATCH
  526.       state billyscratchstate
  527.     else ifai AIBILLYSNIFF
  528.     {
  529.       ifcount 18
  530.       {
  531.         ai AIBILLYSEEKENEMY
  532.       }
  533.     }
  534. //    state billysniffstate
  535.  
  536.     ifhittruck
  537.     {
  538.       ai AIBILLYTRKDYING
  539.       break
  540.     }
  541.     else ifhitweapon
  542.       state checkbillyhitstate
  543.  
  544.     ifrnd 1
  545.     {
  546.       ifrnd 32
  547.         soundonce BR_ROAM1
  548.       else ifrnd 64
  549.         soundonce BR_ROAM2
  550.       else
  551.         soundonce BR_ROAM3
  552.     }
  553.  
  554.   }
  555. enda
  556.  
  557.  
  558.