Distinguish- friend or foe ::: put npcs, buildings and players in teams

Hi!

I could only find so much in the tutorial things and most videos etc are made off 1v1 or 1vALL scenarios.

So whats the best way to distinguish between 2 teams if I have multiple players, npcs and actors fighting eachother (creating a moba style game)

(so I can exclude minionaggro for allied minions and that stuff)

I thought about a few ways but id like to get that right from the start so I wont have to redo a ton of work later.

First way I thought about was giving all the minions, players and buildings an int variable.
With that (seemingly simple solution) I still have some questions -
Upon creation (the minions are spawned by an actor blueprint per “spawn actor” node) Can I take the return value of the node cast to it and then change the variable of the minion based on the spawnpoints teamside?

On the (minions) npcs “enemy detection” task, Im using get all actors of class, how would I go about filtering and returning only enemies?

i actually figured it out with the help of a redditor

i used tags

https://www.google.com/search?q=tags&ie=utf-8&oe=utf-8#q=ue4+tags

u can then filter arrays for tags wich is great for the get by class thing :smiley: