Ending the Game when All Active Players Activate a Trigger

I’m creating a platformer where you’re trying to get through a set of obstacles in the quickest amount of time. I want everyone’s time to be shown, and not only for the first one to get to the end of the course to be recorded. As a result, I need a way for the game to automatically end when all players in the game have activated a trigger. My first idea was to log player IDs at the beginning of the game and, again at the end, and, if each player ID had been logged twice, then the game would end. I realized this would cause the game to never end if someone had their ID logged and left, and ran out of ideas. Is there an easier way to do this that I’m missing, or any way at all?

2 Likes

Welcome to the Forum @Soarin! Be sure to read the guidelines and tips.

An idea that I have is that every time you log in, it creates a new special id just for you. So if you log in multiple times, it will be different.
I have no idea how to make this possible, but I know this will take block code.

1 Like

Use a counter and a end game device…
Then make a player counter using a relay set to “All Players” and a counter that increments from it.
Then, when the trigger is triggered that many times, it will end the game.
:smiling_face_with_sunglasses:

Wait-
You might need a property too…
:sweat_smile:

2 Likes

This does work indeed and hey @Soarin if you need a mini guide i can make one for you!

1 Like

Guide to what? Do you mean on this topic?

1 Like

I’ve never explored the Relay before, as the device description didn’t suggest I would need it for anything. Thanks!

2 Likes

community made guide are guides made by people in this forum showing how to make something like the player counter for example

2 Likes

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.