Jump to content
  • 0

Faction based enemies


gregnator

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

Link to comment
Share on other sites

2 answers 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

Link to comment
Share on other sites

  • 0

Of course. Firstly, you could make it so NPC's of a faction would kill other NPC's of a faction with NPC hostility and even team them with removing NPC hostility for the the monsters in the same faction. You CAN also make it so it does. There in the top right of the NPC editor are some condition lists. One of them is "player friend and/or protector" or something along the same lines. If the enemy is in faction 1 for instance, make a condition in that list as a condition which says "if faction = 1" then it wouldn't attack you and you can't attack it if you were faction one.

Link to comment
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
×
×
  • Create New...