Ideas on this plz

Hey guys I wanted to see if anyone can help with finding out the most efficient way to get this done. So I have two enums made for “Relations” and “Factions”. I have multiple character actors that I set these two enums with. So each character NpC is a part of a faction and the relation is either neutral, an ally, or enemy. So basically I want to ask you all how would I go about making it to where for example I attack an NPC of a certain faction, then I make all the other actors of that faction change the relation to enemy.

I’m thinking somewhere along the line of make dispatchers but that would be a lot of calling on each BP

Any ideas?!

You may want to save that information on the PlayerState. You could create a struct to hold the faction+relation, and just edit an array of that on the PlayerState.

Whenever the NPC is deciding to attack, he can query the player to see where his allegiances lie. The player just returns a bool on whether he should be attacked or not by that particular npc. the NPC should check each time he wants to get aggressive. That way you only have to update the player struct variable and not worry about triggering updates to every actor.