How to divide players into two equal teams when you press a button?

I need a memory efficient way on how to do this. Please Help!

I made this guide a long time ago and it has extra stuff you don’t need, but the blockcode with properties should work.

I like your guide, @LlamaLady22, but it’s just, well, kind of memory consuming. I’m looking for a way to switch teams memory efficiently.

What about the waypooint guide, but instead of using waypoints, you use team switchers?

I’m taking a look at it right now. please wait

Looks good so far. Great!

1 Like

Uh ClicClac, how do I do it instead of using waypoints I use team switchers?

have people that are standing in a certain zone switch teams when the button is pressed
like put
yeah like this

player enters zone - activate button
button pressed - switch teams
but thats if you want to
then get an even number of people to stand in two of those zones

1 Like

I’ll consider that. Thanks for the suggestion!

Give me a second.
Instead of broadcasting on Recurse#, broadcast on the (mod base 2 of Recurse#) +1.
So instead of it broadcasting on 1, 2, 3… it broadcasts 1, 2, 1, 2…
Do you know how to take the modulo of a number in GKC?


Recurse# - (2*round down(Recurse#/2))

depending on what you want, you might could make it to where you would teleport to a team base or something.

Button pressed → activate relay (make it all players)
When it relays → trigger
Get a property that is called random team generator and make it player scoped.
make blockcode in trigger like this:

Connect the trigger to a checker so when triggered → run check

Make the checker and check for if the property value is equal to 1. if check passes, broadcast on team one, if check fails, broadcast on team 2. Have 2 team switchers that switch to those teams when receiving these messages

1 Like

Made a model of yours:

(There ain’t no buttons)

But it has to be equal teams.

O_O mine seemed simpler but ok?

Couldn’t this in very rare cases put everyone on the same team?

ohh i guess that is true… let me edit it. oops that was for clicclac

But, the actual number could be 1 every time. A coin doesn’t always land on heads half the time.

1 Like

I JUST SAID THAT, why did you put it again?
oh wait no buttons

No. I will put sentries that will kill players if they come to another team. Law enforcement is necessary. I will write down to split teams evenly. I will kick em if they troll or else.

I said I followed what ur tutoral was, but I didn’t use any buttons.