I decided to implement a trigger in my own map that went through the trouble of identifying alliances between players such that teams were converted into player groups for use within your triggers. The example here is from my own 4-team CTF map which you're free to download from my maps (very much a work in progress). This particular example is set up for four teams, they may be of any size.
In effect this takes the first player and makes them leader of the first team (Red team). Then it continues through the players, assigning them to the Red team until a player is not allied with the Red leader, in which case it makes them leader and member of the Yellow team, and creates their flag. This continues so forth checking alliances and creating teams or assigning members as necessary.
My specific trigger also announces to the player which team they've joined and changes their color to suit, obviously these are optional actions.
You will need to declare some unit group variables globally to use this trigger (unless you don't plan to use the unit groups outside the bounds of your trigger).
In my case these are Red Team, Yellow Team, Green Team and Blue Team.
if you have any questions, just ask! Improvements/criticism also appreciated :)
Hi all, I looked extensively for a way to directly reference teams or team members from within triggers without much success. Continuing on concepts from this thread: http://forums.sc2mapster.com/development/map-development/2276-detecting-teams-with-triggers-impossible/?page=3
I decided to implement a trigger in my own map that went through the trouble of identifying alliances between players such that teams were converted into player groups for use within your triggers. The example here is from my own 4-team CTF map which you're free to download from my maps (very much a work in progress). This particular example is set up for four teams, they may be of any size.
In effect this takes the first player and makes them leader of the first team (Red team). Then it continues through the players, assigning them to the Red team until a player is not allied with the Red leader, in which case it makes them leader and member of the Yellow team, and creates their flag. This continues so forth checking alliances and creating teams or assigning members as necessary.
My specific trigger also announces to the player which team they've joined and changes their color to suit, obviously these are optional actions.
You will need to declare some unit group variables globally to use this trigger (unless you don't plan to use the unit groups outside the bounds of your trigger).
In my case these are Red Team, Yellow Team, Green Team and Blue Team.
if you have any questions, just ask! Improvements/criticism also appreciated :)