Player counter mixed with voting mechanic?

I have a lobby in my gimoung us map, and I want it to have “when all players press button, start game” How do I do that?
I created a mechanic that restarts the game Without actually restarting the game, it just sends them to a lobby until all players start

no, like i created a mechanic thats restarts the game Without actually restarting the game, it just sends them to a lobby until all players start

Alright. Make a player counter. (If you don’t know what that is, lifecycle → relay → counter linked to property). Then, place down a button, a counter, and a property. This button should increment the counter, and the counter should be linked to the property. It should also deactivate itself on click. (Optional): Then, place down another button that only activates when the first button is deactivated. Make it deactivated on game start, have it activate the first button when pressed, deactivate itself when pressed, and decrement the counter when pressed. The property should broadcast on a channel when it’s changed. Place down a trigger that when receiving on that channel, checks if this property is equal to the one in the player counter. If so, broadcast on the channel that teleports everyone to the next phase.

1 Like

Does it work?

FYI: this is the Ready Up! and Unready Up! Buttons in the GK8 map. If my explanation doesn’t work, let me just get screenshots that do.

A solution without blocks:

Make the player counter increment the counter. Its default should be 0 and the target should be 0. Make the ready button decrement the counter and the not ready button increment the counter. The ready button should activate the not ready button and the not ready button should activate the ready button. The not ready button should be inactive on game start. When the counter reaches its target, then it should broadcast on “Start Real Game”. Make the counter scope be global.

There is a possible bug (I haven’t tested it). To overcome this, change the counter to broadcast on “Add Game Count”. Make another counter increment on “Add Game Count”. The default should be 0 and the target should be 2. This should broadcast on “Start Real Game” when it reaches the target. The counters should both be global scope.

1 Like

This is smart, but the fact that both systems use the same counter means you can’t really use the same player counter for a third system. Also, why is everyone not using blocks in their explanations?

They’re boring to use. They just give a shortcut for everything. And they take a bit too much memory.

I can see that. Maybe the next update will allow us to compare two properties to each other in a checker!