How should I make a player counter that ends game when there are 0 players on a team?

So im making a bedwars map and i need a way to make it so that when one team reaches 0 players itll end the game. However to make this only happen when the team loses their bed. to sum it up when players (unalive) when their bed is there the game doesnt end but when the bed is gone all players on the team without the bed need to (unalive) for the game to end.

I’m new at this, sorry but I don’t know exactly. You could try using an end game device.
I am not sure how they work :woozy_face:, but you could try!

Put a trigger at the spawn pad:
Set the scope to: player
Set maximum triggers to: 1

Add a counter
Set the scope to global

Add a property
name it: PlayerCount

Set the counter to update the property: PlayerCount

Add a wire connecting trigger to counter
(Triggered) → (Increment Counter)

Add a knockout manager

Add a wire connecting knockout manager to counter
(Player knocked out) → (Decrement Counter)

Add a checker
Make it check for: property
Set the property to: PlayerCount
Make it check for: equal to
Make the amount: 0

Add a wire connecting knockout manager to checker
(Player knocked out) → (Check)

Add a end game device

Add a wire connecting checker to end game device
(Check passes) → (End Game)

2 Likes

thanks ill try it! i think i had it like this but im pretty sure i messed something up because all i do is knockout one player and it ends the game, ill try this solution tho, thanks!

No problem!

Good luck with your game!

Happy Gimkitting!

If that does not work you can make a zone where the players on a team spawn in, then they make a counter go up when enter zone. When they switch teams the counter goes down and when the counter = 0 then end game. Also you will need the zone to deactivate from trigger after 1 second.

Welcome to the forums, @BigBees! Check out forum-beginners to get started on stuff. As I always say, it’s never too late for Gimkit.

for some reason it didnt work so im gonna try to fix it later, thanks, if you can see this i may ask for some help while on the gimkit map later in this same subject.

ok ill try to debug it
hmmm

Just as a precaution, try doing the following:

Make the trigger broadcast on channel “newplayer”
Make the trigger deactivate on channel “newplayer”

alright im back, i need the whole device to only activate once a bed is broken, like actual bedwars. This means that when the bed is broken, only then should the players on the team of the broken bed turn turn to spectate, leading to 0 people and ending the game. i can send you the C_O_D_E and see if you can see whats wrong if you want.

1 Like

C O D E’s Aren’t allowed on the forums

1 Like

Yeah, codes aren’t allowed on the forums as it usually leads to people just playing the map and showcasing it instead of actually helping…

im not showcasing anything, i need help. if thats not okay with you ill just tell him another way?

also stop being a moderator, respectfully, theres a reason you are not one.

Sure. Just looking out cause I don’t want you being flagged.

And yes, I understand you need help. If you want to tell him another way, like you two get on the map yourselves, like something like that, you can use another platform like Wix, Padlet, or discord, in case you just wanna like test it on the map.

This is easy.

Do you know how to use channels?

When the bed gets “broken” make it broadcast on channel: bedbroken

Then for the knockout manager, make it unactive on game start
Make it activate when recieving on bedbroken
Set the “scope” to “team”

1 Like

i did, it made it instead so when the other team gets unalived it decrements the counter instead of where the player on the team without the bed unalives decrementing

im trying to fix it right now

set the counter scope to team

doing that currently, lemme check.

wait, is this like bedwars?
if your bed gets broken, you don’t respawn?

yes
trying to make it so when all players on one team unalives without their bed the game ends.

already made the whole playable game up to actual bedwars standards.
just need the ending