For your question: Yes if there is 10 players there might be 2 teams or more, or even be like: number of players per team if there is 10 online: (0,1,0,1,5,2,1,0) remind the default total is 9 teams, but if it's a custom room it can have custom players per teams amounts, BUT you can ignore that last part if its to hard, i can't even imagine a way to do that.
I forgot to tell that "Time" is "Team" in english that is a instance variable for each player that works fine. If they are the same team there is no friendly fire.
And the rest of the Function is just the Trigger:
_On entered the room
____Is Host__Enable "Host" Group___Go to a random team (Doesn't metter, there is no other players)
____Else___Enable "Peer" Group___ Call "teamin" function with Param(0)=0 {Start the Loop looking for a team}