How do you make a last-man-standing gamemode?

I want to build a game where players eliminate each other one by one until there is only one person left. Effectively a battle royale gamemode. The game should end when there is only one person left alive.

What are some good ways to keep track of how many people are left alive so that I can just check for when that is less than or equal to 1 and end the game.


I have no experience with it, but I would assume that one approach is to respawn all downed players to a lobby outside of the battle ground (like Rec Royale does it) and have a player trigger volume around the battle ground (but not including the lobby), which would provide the number of players inside the trigger volume.

An alternative is probably to have a counter looping through all potential indices of teams (say 1 to 20), getting the player index with the team mapping chip, checking the role for each player with the role mapper chip, and then counting the number of players who have a role that indicates that they are still alive. When the team index counter is about to reset, the circuit can report the total number of players (and then reset it for the next loop). For 20 teams, it would report the correct number every 2 seconds, which might be good enough.