How to split 2 teams for a FPS death match game in Unity?

by Bezari0us   Last Updated July 12, 2019 15:13 PM

I'm making a playable one level only FPS death match game in Unity. I'm in the part where the AIs now can find and shoot their own target and keep looping to find targets until nothing left. Every AIs and including player were tagged with tag "Target" for the AIs to randomly find their target. (I already excluded self finding).

Now I want to split them in 2 teams. And here is the thing that I keep wondering. Should I use 2 tags for 2 teams (like team red, team blue for ex) then make and attach 2 scripts separately for each AI in the team (the logic in the script will be like "team red" will find game object with tag "team blue" and vice versa). Is that how it works? Is there more efficient way or should I say, "smarter" way to work around this problem?

Here is the script if you need to know more about what I am trying to say

Related Questions

Unity C#: Accurate MachineGun Firerate at lower FPS

Updated August 21, 2018 13:13 PM

How to attach a weapon to a player in unity?

Updated June 11, 2017 13:13 PM

How To Fire Balls At Crusor Location

Updated November 01, 2017 14:13 PM