I am trying to make teams that have a limit of 1 entity on them, for example, a game of hide and seek, where there is 1 seeker and 5 hiders. I need to have some of the teams in my world to have a limit of 1, somewhat incorporating a random selection process to select random players to place them on teams.
1 Answer
There are no team properties to control limits, but what you can do is change your command setup to make sure that no more than one entity is assigned to each team.
Assuming you are using @r
to select random players, let's try this:
/scoreboard teams join seeker @r
This command will add a random player to the seeker team. Now, just don't run that command again, and the seeker team will only have 1 player!
Now let's add everyone else as hiders:
/scoreboard teams join hiders @a[team=!seeker]
@r
as your random selection? If not, what are you using?