Scoreboard to keep team count equal
Trying to create a game where two teams will play against each other. I'd like to keep them balanced as much as possible, no more than 1 off from each other.
Right now I'm just using /fill to place/remove a redstone block at each team selection area so they alternate. Red team can add a player, then the blue selection area turn on and Blue team can add a player...
Would there be a way to do this with scoreboard commands? I can create an objective called count and add a point each time a player joins Red/Blue. Can I use that to keep the teams balanced? I know I can use operations to compare scores, but I believe that then changes the original score value to the result of the operation?
Any suggestions??
-
Good question -- I have not done much comparison of stored data in scoreboard objectives. The capability is there, though -- I need to work on this as well for a few projects!
1 -
Chris Fuge Bryan Sanders I believe you would add an extra fake player to act as your comparison score or something like that. I'm sure it is possible, I however have not figured out all the mechanisms to make it possible to re-balance the teams if too many students were able to join one team than the other.
If you know in advance how many students total are going to be playing, then you can cap the total allowed on each team to half the total or something like that and once the cap on a team is reached, no more can join it. But that doesn't help much if you have an ongoing game that people might be joining and leaving and you want to keep the teams roughly balanced.0
Please sign in to leave a comment.
Comments
2 comments