Jump to content

My Faction is hostile to itself?


Recommended Posts

So I made a faction for a set of leveled NPCs I'm going to have the player interact with and I found that despite all being members of the same faction they spawned as hostile to each other. The only way I was able to make them stop shooting themselves was by setting the faction as its own ally. Is this the proper way to do things or did I miss something that would have kept them from behaving this way?

Link to comment
Share on other sites

There're only 3 parameters thar determine NPC's behavior.

 

1 - relationship between factions (neutral / ally / enemy)

 

2 - level of aggression (unaggressive / aggressive / very aggressive / frenzy)

 

3 - who they help (no one / allies / friends & allies)

Link to comment
Share on other sites

Yes you always have to set reciprocal faction relations even on itself, and with two factions just to be double safe I always force the calls on both factions;

pThisFaction.SetAlly(pThisFaction, false, false) ;ally
pThisFaction.SetAlly(pThatFaction, false, false) ;ally
pThatFaction.SetAlly(pThisFaction, false, false) ;ally

You have also hit the two neutral gotchas to look out for ... which is why I avoid neutral and only use deterministic friend, ally, enemy for spawns:

 

Aggression(2) Very Aggressive will attack Enemies and NEUTRALS on sight.

 

Aggro Radius will attack Enemies and NEUTRALS in radius

Link to comment
Share on other sites

Yes you always have to set reciprocal faction relations even on itself, and with two factions just to be double safe I always force the calls on both factions;

pThisFaction.SetAlly(pThisFaction, false, false) ;ally
pThisFaction.SetAlly(pThatFaction, false, false) ;ally
pThatFaction.SetAlly(pThisFaction, false, false) ;ally

You have also hit the two neutral gotchas to look out for ... which is why I avoid neutral and only use deterministic friend, ally, enemy for spawns:

 

Aggression(2) Very Aggressive will attack Enemies and NEUTRALS on sight.

 

Aggro Radius will attack Enemies and NEUTRALS in radius

Oh! I missed the neutrals. Thank you so much!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...