Jump to content
  • 0
Sign in to follow this  
gregnator

Faction based enemies

Question

Hello! 

I just wanted to ask a question, as I'm currently for a while not able to access my PC, but I'd like to know if my thought process on this is correct.

 

Let's say we have 3 factions. Red, blue and green. 

Once a player starts he or she is neutral and the NPCs of said colors are set to friendly. 

If I'd give the player the option to join a faction (Changing player variable), would this allow me to have NPCs of the other factions automatically register the player as an enemy? Again through variables.

So npc friendly condition is set if player "faction" variable = 1 (neutral)

And then also add the same where 1 = x the number of said faction.

 

Am I correct in this? 

But is there a way to have npc auto attack other NPCs of a different faction, or is the only way right now, to enable npc to attack other NPCs if hit (accidentally) by set npc? 

Thanks

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
On 4/15/2019 at 1:00 AM, gregnator said:

Hello! 

I just wanted to ask a question, as I'm currently for a while not able to access my PC, but I'd like to know if my thought process on this is correct.

 

Let's say we have 3 factions. Red, blue and green. 

Once a player starts he or she is neutral and the NPCs of said colors are set to friendly. 

If I'd give the player the option to join a faction (Changing player variable), would this allow me to have NPCs of the other factions automatically register the player as an enemy? Again through variables.

So npc friendly condition is set if player "faction" variable = 1 (neutral)

And then also add the same where 1 = x the number of said faction.

 

Am I correct in this? 

But is there a way to have npc auto attack other NPCs of a different faction, or is the only way right now, to enable npc to attack other NPCs if hit (accidentally) by set npc? 

Thanks

 

You are on the correct lines yes. I have a faction tutorial on the cards from my game which I will hopefully post over the weekend :)

 

Also if you have a look at my alignment system, I did my factions based on player alignment: Good / Neutral / Evil

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×