Hey, I'm developing a mmo game , and I wanted to ask you how to random choose whether the player goes to red team/blue team depending on the players ammount. psuedo codes will be awesome.
Well, you could do something like this: Code (csharp): var probability = redPlayers / totalPlayers : float; if (Random.value > probability) // the player gets the red color else // the player gets the blue color This means that if there is a similar number of players in both teams, the new player will go to any team absolutely randomly. However, if in one of the teams there are more players, the probability to get into this team is less (and if the number differs a lot, the probability is very small).