12.11.2011, 11:12
Create a variable for each time, like Team1 and Team2
And every time you assign a player to a team add 1 to the variable and every time you remove a player from a team, subtract 1 from that specific team
And from there make sure there is in imbalance, so if you only want to let the teams have 2 more players than each other before auto balance commences then do something like
I hope that works, it's untested.
Bottom line is you need to run checks to compare them as a ratio.
EDIT: If mine doesn't work just follow the above Tutorial....
- Shoulen
Code:
new Team1; new Team2;
And from there make sure there is in imbalance, so if you only want to let the teams have 2 more players than each other before auto balance commences then do something like
Code:
new check = Team1 + 2; If(check > Team2) { // Autobalance } check = Team2 + 2; else if(check > Team1) { // Autobalance }
Bottom line is you need to run checks to compare them as a ratio.
EDIT: If mine doesn't work just follow the above Tutorial....
- Shoulen