home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Messiah / data1.cab / Program_Executable_Files / messiahscripts / bob5.hxx next >
Text File  |  1999-11-29  |  8KB  |  341 lines

  1.  
  2.  
  3. /*
  4. Actors:
  5. Bob1
  6. Halo
  7. */
  8.  
  9.  
  10. ///////////////////////////////////
  11.  
  12.  
  13.  
  14. #define    _WeakAssBaby    8
  15.  
  16. Actor(Bob1)
  17. {
  18.         file(bobHeader);
  19.         startstate(statenormal);
  20.         startaction(BobIdle);
  21.         rank(_WeakAssBaby);
  22.  
  23.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  24.         float(_declare,AIControl,0);
  25.         float(_declare,AIHideControl,0);
  26.         float(_declare,AIUsage,0);
  27.         float(_declare,AIAbility,_AIAJump|_AIAClimb);
  28.         float(_declare,AIManPowerThreshold,300);
  29.         float(_declare,AIPowerRatingThreshold,50);
  30.         float(_declare,AIGrenadeThrowThreshold,10);
  31.  
  32. //        if(vkey==key_a)
  33. //        {
  34. //            vector(_set,Gactorpos,-2137,717,7203);
  35. //            vector(_setactorpos,Gactorpos);
  36. //        }
  37.  
  38.         #include    "messiahscripts\BobGen.hxx"
  39.  
  40. }
  41.  
  42. Actor(EvilBob)
  43. {
  44.         file(EvilBobHeader);
  45.         startstate(statenormal);
  46.         startaction(BobIdle);
  47.         rank(_WeakAssBaby);
  48.  
  49.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  50.         float(_declare,AIControl,0);
  51.         float(_declare,AIHideControl,_AIHCInRoute);
  52.         float(_declare,AIUsage,_AIUAlwaysRun|_AIUFindHost);
  53.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAPossesion);
  54.         float(_declare,AIManPowerThreshold,300);
  55.         float(_declare,AIPowerRatingThreshold,50);
  56.         float(_declare,AIGrenadeThrowThreshold,10);
  57.  
  58.         float(_declare,firefeet,0);
  59.  
  60.         float(_declare,ScaleEBob,1);        //evil bob only
  61.  
  62.  
  63.         printi("Evilbob target:        ",VAIhastarget);
  64.         printih("Evilbob targetclass:   ",VAItargetclass);
  65.         if(VAItargetclass==_AIclassAngel)
  66.         {
  67.             print("clearing target");
  68.             call(AIclrtarget);
  69.         }
  70.  
  71.  
  72.         #include    "messiahscripts\enemies\CopGen.hxx"
  73.  
  74.         if(VActiveTime==1)
  75.         {
  76.             spawnactor(EvilHalo,0,0,0);
  77.             call(CheckForPickup,4,_ClassPickup);
  78.  
  79.             ChangeMaterialFlags(_or,7,_SXMChromaKey,255);
  80.  
  81.             //call(SubtractHealth,0,-3000);        //bob full health after a depossess (just for now)
  82.         }
  83.  
  84.  
  85.  
  86.         if(Vaction==EBobHeelTap)
  87.         {
  88.             if(VFrame>=25)
  89.             {
  90.                 call(SetParticleSetID,"s1r8");
  91.                 float(_sub,ScaleEBob,0.13);
  92.                 scalebonematrix(0,ScaleEBob,_SXBoneAttAbsolute);
  93.             }
  94.             if(VFrame==32)
  95.             {
  96.                 KillActor();
  97.             }
  98.         }
  99.  
  100.  
  101.         if(VTrigger!=_DIRwalking)
  102.         {
  103.             if(VTrigger==_DIRforward||Vtrigger==_DIRleft||Vtrigger==_DIRright||Vtrigger==_DIRsideleft||Vtrigger==_DIRsideright||Vtrigger==_DIRbackward)
  104.             {
  105.                 spawnparticle(fx_evilfire,20,emptyvector,EmptyVector,-1);
  106.                 if(firefeet==0)
  107.                 {
  108.                     sample(SFXGenericBurn,-1,25);
  109.                 }
  110.                 float(_set,firefeet,1);
  111.             }
  112.             else
  113.             {
  114.                 if(firefeet==1)
  115.                 {
  116.                     samplestop(SFXGenericBurn);
  117.                 }
  118.                 float(_set,firefeet,0);
  119.             }
  120.         }
  121.         else
  122.         {
  123.             if(firefeet==1)
  124.             {
  125.                 samplestop(SFXGenericBurn);
  126.             }
  127.             float(_set,firefeet,0);
  128.         }
  129. }
  130.  
  131. Actor(chotdwarf)
  132. {
  133.         file(ChotdwarfHeader);
  134.  
  135.         rank(_RankSergeantL);
  136.  
  137.         startstate(statenormal);
  138.         startaction(BobIdle);
  139.  
  140.         //AI variables. All characters using copgen.hxx needs these defined to work properly
  141.         float(_declare,AIControl,0);
  142.         float(_declare,AIHideControl,_AIHCInRoute);
  143.         float(_declare,AIUsage,_AIUAlwaysRun|_AIUCrowdAroundLeader);
  144.         float(_declare,AIAbility,_AIAJump|_AIAClimb|_AIAFlashVisors|_AIASpecialSecondaryWeapon);
  145.         float(_declare,AIManPowerThreshold,300);
  146.         float(_declare,AIPowerRatingThreshold,50);
  147.         float(_declare,AIGrenadeThrowThreshold,10);
  148.  
  149.         #include    "messiahscripts\enemies\CopGen.hxx"
  150. }
  151.  
  152.  
  153. Actor(Halo)
  154. {
  155.         file(HaloHeader);
  156.         startaction(nomove);
  157.  
  158.         //float(_declare,HaloTrans,30);
  159.         vector(_declare,HaloPos,0,25,0);
  160.         vector(_declare,HaloPos1,0,0,0);
  161.         vector(_declare,HaloPos2,0,0,0);
  162.         vector(_declare,HaloPos3,0,0,0);
  163.         vector(_declare,HaloPos4,0,0,0);
  164.         float(_declare,RndAngle,0);
  165.         vector(_declare,HaloOuterPos,0,0,0);
  166.  
  167.         vector(_copy,HaloPos4,HaloPos3);
  168.         vector(_copy,HaloPos3,HaloPos2);
  169.         vector(_copy,HaloPos2,HaloPos1);
  170.         vector(_settoactorpos,HaloPos1);
  171.  
  172.         if(VSniperMode==0 && VFirstPerson==0)
  173.         {
  174.             call(ChangeAlpha,40);
  175.             //call(ReDrawActor,halopos1);
  176.             //call(ChangeAlpha,30);
  177.             //call(ReDrawActor,halopos2);
  178.             //call(ChangeAlpha,20);
  179.             //call(ReDrawActor,halopos3);
  180.             //call(ChangeAlpha,10);
  181.         }
  182.  
  183.  
  184. //limit length of halo trail ----->
  185. /*
  186.         vector(_declare,halot,0,0,0);        //tmp pos
  187.         vector(_declare,halon,0,0,0);        //new pos
  188.         vector(_declare,halod,-1,-1,-1);    //delta
  189.  
  190.         vector(_copy,halot,halopos1);
  191.         vector(_sub,halot,halopos2);
  192.         vector(_normalize,halot);            //yarK
  193.  
  194.         vector(_copy,halon,halot);
  195.         vector(_mul,halon,halod);
  196.         vector(_add,halon,halopos1);
  197.         //call(ChangeAlpha,10);
  198.         call(ReDrawActor,halon);
  199.  
  200.         //vector(_set,halod,-1,-1,-1);
  201.         //vector(_copy,halon,halot);
  202.         //vector(_mul,halon,halod);
  203.         //vector(_add,halon,halopos1);
  204.  
  205.         //call(ChangeAlpha,20);
  206.         //call(ReDrawActor,halon);
  207.  
  208.         //vector(_set,halod,0,0,0);
  209.         //vector(_copy,halon,halot);
  210.         //vector(_mul,halon,halod);
  211.         //vector(_add,halon,halopos1);
  212.  
  213.         //call(ChangeAlpha,30);
  214.         //call(ReDrawActor,halon);
  215. */
  216. //<------limit length of halo trail
  217.  
  218.  
  219.         if(vrnd<50 && VSniperMode==0 && VFirstPerson==0)
  220.         {
  221.             float(_rnd,RndAngle,4096);
  222.             vector(_vectorfromangle,HaloOuterPos,RndAngle,20);
  223.             vector(_add,HaloOuterPos,HaloPos);
  224.             SpawnParticle(fx_Halo,0,HaloOuterPos,emptyVector,-1);
  225.         }
  226.  
  227.         if(vtrigger==_DIRdepossesion)
  228.         {
  229.             killactor();
  230.         }
  231.  
  232.         if(VRank==_WeakAssBaby)
  233.         {
  234.             if(Vstate!=StateOnFire)
  235.             {
  236.                 //vector(_declare,bbbcolor,120,75,000);
  237.                 vector(_declare,bbbcolor,10,20,30);
  238.                 SpawnLight(LomnilightAllSets,0,EmptyVector,bbbcolor,EmptyVector,250);
  239.             }
  240.         }
  241. }
  242.  
  243. Actor(EvilHalo)
  244. {
  245.         file(EvilHaloHeader);
  246.         startaction(nomove);
  247.  
  248.         //float(_declare,HaloTrans,30);
  249.         vector(_declare,HaloPos,0,25,0);
  250.         vector(_declare,HaloPos1,0,0,0);
  251.         vector(_declare,HaloPos2,0,0,0);
  252.         vector(_declare,HaloPos3,0,0,0);
  253.         vector(_declare,HaloPos4,0,0,0);
  254.         float(_declare,RndAngle,0);
  255.         vector(_declare,HaloOuterPos,0,0,0);
  256.  
  257.         vector(_copy,HaloPos4,HaloPos3);
  258.         vector(_copy,HaloPos3,HaloPos2);
  259.         vector(_copy,HaloPos2,HaloPos1);
  260.         vector(_settoactorpos,HaloPos1);
  261.  
  262.         if(VSniperMode==0 && VFirstPerson==0)
  263.         {
  264.             call(ChangeAlpha,80);
  265.             //call(ReDrawActor,halopos1);
  266.             //call(ChangeAlpha,30);
  267.             //call(ReDrawActor,halopos2);
  268.             //call(ChangeAlpha,20);
  269.             //call(ReDrawActor,halopos3);
  270.             //call(ChangeAlpha,10);
  271.         }
  272.  
  273.  
  274. //limit length of halo trail ----->
  275. /*
  276.         vector(_declare,halot,0,0,0);        //tmp pos
  277.         vector(_declare,halon,0,0,0);        //new pos
  278.         vector(_declare,halod,-1,-1,-1);    //delta
  279.  
  280.         vector(_copy,halot,halopos1);
  281.         vector(_sub,halot,halopos2);
  282.         vector(_normalize,halot);            //yarK
  283.  
  284.         vector(_copy,halon,halot);
  285.         vector(_mul,halon,halod);
  286.         vector(_add,halon,halopos1);
  287.         //call(ChangeAlpha,10);
  288.         call(ReDrawActor,halon);
  289.  
  290.         //vector(_set,halod,-1,-1,-1);
  291.         //vector(_copy,halon,halot);
  292.         //vector(_mul,halon,halod);
  293.         //vector(_add,halon,halopos1);
  294.  
  295.         //call(ChangeAlpha,20);
  296.         //call(ReDrawActor,halon);
  297.  
  298.         //vector(_set,halod,0,0,0);
  299.         //vector(_copy,halon,halot);
  300.         //vector(_mul,halon,halod);
  301.         //vector(_add,halon,halopos1);
  302.  
  303.         //call(ChangeAlpha,30);
  304.         //call(ReDrawActor,halon);
  305. */
  306. //<------limit length of halo trail
  307.  
  308.  
  309.         if(vrnd<50 && VSniperMode==0 && VFirstPerson==0)
  310.         {
  311.             float(_rnd,RndAngle,4096);
  312.             vector(_vectorfromangle,HaloOuterPos,RndAngle,20);
  313.             vector(_add,HaloOuterPos,HaloPos);
  314.             SpawnParticle(fx_Halo,0,HaloOuterPos,emptyVector,-1);
  315.         }
  316.  
  317.         if(vtrigger==_DIRdepossesion)
  318.         {
  319.             killactor();
  320.         }
  321.  
  322.         if(VRank==_WeakAssBaby)
  323.         {
  324.             if(Vstate!=StateOnFire)
  325.             {
  326.                 //vector(_declare,bbbcolor,120,75,000);
  327.                 vector(_declare,bbbcolor,10,20,30);
  328.                 SpawnLight(LomnilightAllSets,0,EmptyVector,bbbcolor,EmptyVector,250);
  329.             }
  330.         }
  331. }
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.