Minecraft: Different Amount of Teams Generator

Minecraft: Different Amount of Teams Generator - One Black Chess Piece Separated From Red Pawn Chess Pieces

I am currently working on a mini game that involves two teams. I'm wondering if I can make a random team generator in Minecraft that varies with the amount of players that are in the game. For example if I had 8 players, I could have the two teams have 4 players on each. But if I had 10 players, I could have 5 players on each team. Can this be done with command blocks? I know how to make teams and assign people to them already with the scoreboard command, but I don't know how I can make a player amount varied team generator.



Best Answer

I did something like this once. I had a command block on a timer that would look for players not on a team and then teleport them to a room. Any player in that room would be assigned to either red or blue team, using a t flip flop to determine what team to put them on. The flip flop would be switched for every person assigned, so it would go red blue red blue and so on. As soon as they were assigned I'd teleport them out to the team base with another command block.

This was a LONG time ago and I can't remember any more details than that, and there might be more efficient ways to do it now. I just wish mojang would include a scripting language to command blocks because trying to tie the programming into redstone and everything is way harder than it should be and variables can't be moved between blocks. That's why I had to teleport players to a separate room to assign stuff to them.




Pictures about "Minecraft: Different Amount of Teams Generator"

Minecraft: Different Amount of Teams Generator - Diverse women stacking hands on wooden table
Minecraft: Different Amount of Teams Generator - Multiethnic women in casual outfits together
Minecraft: Different Amount of Teams Generator - Serious diverse multiracial people standing close together representing concept of unity  and looking at camera against gray background



Can you be on more than one team in Minecraft?

Use the right tool for the job. Scoreboard teams have some unique features in that any player can only be in one team, they have special treatment for /spreadplayers and a variety of options regarding visibility and other things.

How many teams can you have in Minecraft?

In the MC Championship, ten teams of four go head to head in a variety of mini-games that test the core Minecraft skills: parkour, survival, combat, teamwork and more. After eight games, the two teams with the most coins will go up against one another in one final matchup to decide the ultimate champion.

How do you make a different team in Minecraft?

You can add, configure and remove teams using the /team command in Minecraft. This is a very useful command when you want to set up multiplayer PvP games. Once you have created your teams, use the /scoreboard command to manage your scoreboard, objectives and players in Minecraft.

How do you assign a random team in Minecraft?

Depending on which set of command blocks is enabled when the player spawns, they will be assigned a different team. Other options include simply alternating - which makes sure that the teams are balanced. This would work by simply using a T flip-flop to switch the command block banks each time.



Minecraft 1.16+ Redstone Randomizers (2-9 Outputs)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Markus Spiske, Alexander Suhorucov, Alexander Suhorucov, Monstera