Adjustable counter system for my creative map

heyy, itsa me again, i just wanted to know whether or not it was possible to make an adjustable knockout counter and when it reaches a certain adjustable number, adjustable to the amount of players current, the game ends

seems easy enough

I think you should make a system checking for the amount of players and each player there is, it increments the counter

2 Likes

could you possibly add a detailed guide?

Not Rn but I know someone will come

But maybe if they do not come when I get home I can help you

kk, thanks a ton, im kinda a beginner when it comes to creating playable maps, so all the help I can get I appreciate a ton

1 Like

thank you again and if any one has any tips for me I would greatly appreciate it

1 Like

Lifecycle (Player knocks out) → increment Counter
Counter setting:
Screenshot 2024-11-13 5.55.39 PM

00ps! just realized i’m too lazy for the end sry! I know how to do it though

what do you need this for? do you want the game to end once everyone knocked out?

1 Like

yeah, so pretty much a battle royale setting

1 Like

this should work. if it doesn’t tell me

2 Likes

People have given you bits and pieces but here’s the full system:
First, create the live player counter like above.
Next, create a knockout counter by having a lifecycle (player knocks out) wired to increment the counter. The counter should be player scoped, and update a property, “ko#”.
Next, get your property device, and make it a number property. Next, make it so that when property value changes, broadcast “checkforequality”. On that, a trigger should trigger. Now go to blocks and replicate this code:

If (get property | players) = (get property | ko#) Then
Broadcast message on channel | endgame

On the “endgame” channel, the game should en via an end game device. There’s your answer @morpho! Hope this helps! Tell me if the code is too confusing and you need a picture of the Gimkit version.

1 Like

its good, thanks a ton