4

I successfully registered teams (Red, Blue). I want to add players to the team. It currently is 3v3 map, where you need to have 6 players to play otherwise the game wont start at all. So i tried something like this, since i knew there are 6 players online, else the redstone signal wouldnt even have reached the "Add player to team"-Command block.

scoreboard teams join Blue @r works, adds 1 player to the team. Now i could just execute this block 3 times and the Blue team would have 3 players. Problem is, that @r randoms a player and it might happen that player Shiuyin would be rolled twice, thus the Blue team would end up having Shiuyin + another random player instead of 3.

I also tried something like

"scoreboard teams join Blue @r,@r,@r"

which gives a lot of bugs, something teams do have players "Player1, Player2, @r".

So i need something like "scoreboard teams join Blue @r" executed 3 times which only adds player who are currently not in a team.

I tried "scoreboard teams join Blue @r[team!=Blue]" but it somehow doesn't work.

Any solutions?

13

Use scoreboard teams join Blue @r[team=!Blue], You just had the syntax a little bit wrong.

  • Note that in most programming languages != is correct. – Timtech Sep 26 '13 at 22:31
  • 4
    Yep, easy to get confused, but it's just not that in minecraft. – SirBenet Sep 27 '13 at 15:07
1

Keep them in a little room to assign them, and once they are done move them to the arena. Then for the command block run this three times:

scoreboard teams join Blue @r[r=5]

Put the command block at the center of the room. The room should be no larger than 7x7x2, and once a player is assigned he should be moved out of the room and into the arena so he will not be reassigned by being within the 5 block radius of the command block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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