Last player left name

Did it work?

no I said what I tried in the first post

Can you show me the block code?

I can’t right now, I don’t have my chromebook

1 Like

If by one player you mean one player not a spectator, you could use a trigger → relay (all) → trigger setup. In the second triggers block code, have it set the property to the triggering players block code. Hope this helped!

2 Likes

Maybeee, wire a life cycle to a knockout manager, then wire the knockout manager to a counter incremeanting it. Have the counter’s target as many people in your game minus one. Then wire the counter to another counter incremeanting it. The target doesn’t matter. Have it update a property and have the property as the property you are using. But this will only work if players don’t respawn.

2 Likes

Don’t forget to mark a solution!

1 Like

When someone dies, set their player-scoped property “Alive”, to false. Then, it checks to see if anyone else is alive using the player counter. If no one else is alive then a checker checks if “Alive” is true using an all-players relay. If that is true, then have a trigger go off that sets the triggering player’s name/ID to it.

2 Likes

Bump because I still need help

What do you still need help on?

1 Like

It doesn’t work thats what I did

Ok, so you should be able to use a counter and a team switcher, along with a ko manager. So when ko happens, and they switch team, counter goes up by one, so when that counter reaches a certain number the allowed number of players, game ends. And use this guide to help.

this is to find the last players name, I made a guide on player counter

oh, ok but the point is understood, correct?

yes, thats what I tried

Code… I know it is possible because @anonymous12 created BSB, and it ends when one player is standing. I just have to ask him.

Did you try relay (all players) → checker (item = 1) [if true] → trigger {set property: triggering players name}?

1 Like

yes it doesn’t work

Huh.

1 Like

@potato1 This is the system I developed, I’m not sure what teams you are using so you may need to modify.
image

  • Life Cycles

Left
image

Left: Wires

Right
image

Right: Wires


  • Relays

Top
image

Top: Wires

Bottom
image

Bottom: Wires

  • Counter
    image
    image

  • Team Switcher
    image

  • Trigger

Blocks
image
image

  • Properties

players

last player

1 Like