Author Topic: PW's for PW Builders  (Read 804 times)

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
PW's for PW Builders
« Reply #15 on: July 23, 2011, 03:30:13 am »


               Fooey had to swicth to standard form to post the lines in question is all you need:

 
    object oPercep = GetLastPerceived();
    int iHD = GetHitDice (oPercep);
    //the below lines were added to the default perception
       if ((GetLocalInt (OBJECT_SELF,"Bounty") == 1) && (GetIsPC(oPercep)))
    {
    ChangeToStandardFaction (OBJECT_SELF,STANDARD_FACTION_HOSTILE);
    DelayCommand (1.0, ActionAttack (oPercep));
    }
    //the above lines were added to the npc's perception

So the bounty npc only turns hostile when they percevie the PC.  Of course if you attack them they turn hostile but not to nearby npc's. Now other npc's can join in the fight still but I don't find that to be a difficulty since it only happens if a PC is nearby and that is their persistent target.  See if that helps.