0

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.

7
  • Why can’t you just... assign one player to be seeker and then assign all the others to the hider team?
    – Penguin
    Commented Nov 22, 2020 at 17:34
  • because im using a random scoreboard selector and through random chance they might all be hider or seeker. also im NOT doing hide and seek
    – anomanous
    Commented Nov 22, 2020 at 17:38
  • The random selector only selects one person. What kind of weird thing are you using? Even if it didn’t, you could just set a limit of 1.
    – Penguin
    Commented Nov 22, 2020 at 18:36
  • but HOW do u set a limit of 1?
    – anomanous
    Commented Nov 22, 2020 at 19:40
  • 1
    Are you using @r as your random selection? If not, what are you using?
    – One 2 Many
    Commented Nov 22, 2020 at 21:19

1 Answer 1

1

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]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.