Page 1 of 1

BadGuy1 Script

Posted: Wed Jun 29, 2011 4:12 am
by Nighthawk_0973
I made this post because people (including me :D) have been having trouble with it lately so here you go!

This script works with the model that can be found right here and it's called badguy1.act.

The script you want to use is:

Code: Select all

{
   Spawn[()
   {
      Console(false);
      AttributeOrder("enemy_health",150,"Die");
      FindTargetOrder(200,"Alert","health");
      SetFOV(360);
      HostilePlayer(true);
      HostileSame(false);
      HostileDifferent(false);
      SetGroup("Enemy");
   }]

   Die[()
   {
      AnimateStop("die",0,"");
      FadeOut(3,0);
      Remove(true);
   }]

   Alert[()
   {
      PlayerDistOrder(-800,"LostTarget");
      AnimateStop("idle",0,"");
      NewOrder("Attack");
   }]

   Attack[()
   {
      RotateToPlayer("walk",160,false,"");
      FireProjectile("pistol_shell","BIP01 R FOREARM",0,0,0,
      "health","");
      if(self.player_range>96)
      {
         MoveForward("walk",50,50,"");
      }
      else
      {
         Delay("hit",1,"");
      }
      RestartOrder();   
   }]

   LostTarget[()
   {
      BlendToAnimation("idle",1,true,"");
      FindTargetOrder(200,"Alert","health,");
   }]
}
next add this to the end of your pawn.ini file:

Code: Select all

[badguy1]
actorname = badguy1.act
actorrotation = 270 180 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle
shadowsize = 64
now you can use badguy1 in RFEditPro! Ask me if you have any questions. Special Thanks to megatop, I couldn't get this script to work until he gave me the working version of it :D

Re: BadGuy1 Script

Posted: Wed Jun 29, 2011 4:39 am
by megatop
be sure to give credit t me for making the script and fixing it

Re: BadGuy1 Script

Posted: Wed Jun 29, 2011 5:01 am
by Nighthawk_0973
Nighthawk0973 wrote:now you can use badguy1 in RFEditPro! Ask me if you have any questions. Special Thanks to megatop, I couldn't get this script to work until he gave me the working version of it

Re: BadGuy1 Script

Posted: Mon Jun 01, 2015 12:38 pm
by aicd99
The badguy1.act model is gone ?
What happened ?