BadGuy1 Script

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
Nighthawk_0973
Posts: 234
Joined: Tue Apr 19, 2011 2:08 am
Location: In front of my computer.

BadGuy1 Script

Post by Nighthawk_0973 » Wed Jun 29, 2011 4:12 am

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
https://sites.google.com/site/theneverendinguniverse/ <-- Infinite Universe Website. It's a 2D MMORPG I'm releasing into beta near the late summer (I hope :D) note: RF isn't an MMO maker. Not yet anyways.

megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: BadGuy1 Script

Post by megatop » Wed Jun 29, 2011 4:39 am

be sure to give credit t me for making the script and fixing it

User avatar
Nighthawk_0973
Posts: 234
Joined: Tue Apr 19, 2011 2:08 am
Location: In front of my computer.

Re: BadGuy1 Script

Post by Nighthawk_0973 » Wed Jun 29, 2011 5:01 am

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
https://sites.google.com/site/theneverendinguniverse/ <-- Infinite Universe Website. It's a 2D MMORPG I'm releasing into beta near the late summer (I hope :D) note: RF isn't an MMO maker. Not yet anyways.

User avatar
aicd99
Posts: 264
Joined: Mon Oct 10, 2011 11:17 am

Re: BadGuy1 Script

Post by aicd99 » Mon Jun 01, 2015 12:38 pm

The badguy1.act model is gone ?
What happened ?

Post Reply