I have no idea what you are asking. I'll explain it briefly, perhaps that will answer your question.
There are three teams - Friendly, Enemy, and Neutral. Only Friendly and Enemy units can fight each other. This might sound limiting, but it's not. You can set up as many teams as you like with your own code, and if two units from opposite teams get close to each other, you just change their AI opposite each other and they'll fight. Then, any other units that walk up can automatically join the same team as their already engaged partners.
Ultimately, you have complete control over how units interact with each other. Like anything else, you have to be creative in your approach.
Come see the WIP!