I have two teams; one on each side. When the players select a dialog item, it then spawns an unit for them and issue a command to that unit, but how do I determin what team the players are on. I was thinking of having two seperate triggers, one for each team so I could just adjust the spawn and attack order to the correct places, but how do I actually find out what player is on what team, so I can send his units the right place. I can't use "Triggering player == 1" or so, for that wont work if it's a 2v2 or 3v3 and not 4v4 ..
And same with the units already on the field, I dont want to force split the teams set in lobby by sending one that way, one that way, one that way....
Not sure what he's speaking off, but you could add all players to a player array variable named after their respective team on map initialization, then use a conditional in your trigger to check if the player is equal to what they should be in the said player array. I'm thinking of using an array instead of a group because I'm pretty sure it would save you from having to adjust your trigger each time a player leaves the game, or if the game starts without max players.
Edit: Ok, simpler way. Use the Comparison Condition, set Value 1 to Allies/Enemies of Player, Alliance:Alliance, Triggering Player, operator to ==, and Value 2 to Players On Team, Team X.