How can I make it so that when a person kills everyone, it is over? Or after a certain time, if there is still one person alive, they get teleported to spawn? Its 1 person vs a team. an the team has to last until the time is up, or the one person can kill them all.
How can I make it so that when a person kills everyone, it is over? Or after a certain time, if there is still one person alive, they get teleported to spawn?
For a "last alive" system, you'll want the following objective:
/scoreboard objectives add DEATHS deathCount
And you need the following contraption:
The command in the command block:
/testfor @a[score_DEATHS=0]
In the hopper on the left, put TWO items. This will turn on the clock to activate the command block, and keep the comparator on the left active. For the comparator FACING the torch, right-click it to put it into subtraction mode. This will compare the number of players left alive to the items in the hopper. Thus, when only one player has zero deaths, the comparator will be turned off even though the testfor is successful.
The torch will be in the OFF state until there is one player left alive, in which it turns on, and you may do what you like from that torch.
The lever indicates the hopper you would want to power if you want to turn off the clock without ruining the item setup in the hoppers.
For a "last alive" system, you'll want the following objective:
/scoreboard objectives add DEATHS deathCount
And you need the following contraption:
The command in the command block:
/testfor @a[score_DEATHS=0]
In the hopper on the left, put TWO items. This will turn on the clock to activate the command block, and keep the comparator on the left active. For the comparator FACING the torch, right-click it to put it into subtraction mode. This will compare the number of players left alive to the items in the hopper. Thus, when only one player has zero deaths, the comparator will be turned off even though the testfor is successful.
The torch will be in the OFF state until there is one player left alive, in which it turns on, and you may do what you like from that torch.
The lever indicates the hopper you would want to power if you want to turn off the clock without ruining the item setup in the hoppers.
Okay, I realized I messed up my OP-/)-/ Its one person vs a team, an its on a timer
For a "last alive" system, you'll want the following objective:
And you need the following contraption:
The command in the command block:
In the hopper on the left, put TWO items. This will turn on the clock to activate the command block, and keep the comparator on the left active. For the comparator FACING the torch, right-click it to put it into subtraction mode. This will compare the number of players left alive to the items in the hopper. Thus, when only one player has zero deaths, the comparator will be turned off even though the testfor is successful.
The torch will be in the OFF state until there is one player left alive, in which it turns on, and you may do what you like from that torch.
The lever indicates the hopper you would want to power if you want to turn off the clock without ruining the item setup in the hoppers.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Okay, I realized I messed up my OP-/)-/ Its one person vs a team, an its on a timer