Hey guys, i need some help, i`m making an arena and i need to know if there is anyway to detect the last man alive on the arena after it starts. I have no idea if its possible or not.
Very possible, yes. You'll need the following objective:
/scoreboard objectives add DEATHS deathCount
And the following mechanism:
The command in the command block:
The comparator facing the torch must be right-clicked to put it into subtraction mode. Place TWO items in the hopper on the LEFT in the image. This will start a clock and keep the comparator pointing into the subtracted comparator on.
The torch will be off until all but one of the detected players has died, in which it will turn on. The torch will be your output. The lever in the image indicates which hopper you need to power to turn the clock off without messing up the orientation of the items.
If you just want to target people in the arena, just add your coordinates and radius to the command, like so: