I'm working on a death run map and I already have all of the traps made and almost everything else I just have a problem with one thing. I don't know how to make it so when all of the Runners die, everyone goes back to the lobby or when a Runner reaches the end and kills Death, everyone goes back to the lobby. The thing is, I need to do this without having 2 teams for Runners and Death, most people will be in different teams (cause it's a small server, like 8 people, and there's like Admin team, Builder, etc). It would really help a lot if you answer me or try to, thanks.
You could tell a command block to tp everyone within so many blocks to spawn. The only problem is that you must make sure that no other buildings on your server are close enough to where a player form one of those buildings would be included in the tp. I'm not positive on how to do the command exactly. I believe it would be something like /tp @a[r=(radius where the players will be within)]. Hope this helped. I know it wasn't the most clear explanation, so let me know if you have any questions.
That's the command I want it to make once everyone dies it would be /tp @a[x=smth,y=smth,z=smth,r=smth]. What I'm asking is how to detect when every runner dies or death dies to make it execute that command. I've been thinking if I could use the deathCount in /scoreboard for a certain area and make a deathCount of everybody in that area not separate death counts for each player I could make it detect when they die but I don't know how to make that deathCount. If anyone knows how please post it. Thx for trying to answer though.
OMG thanks so much for answering you have no idea how much I appreciate it. The thing is that some of my traps spawn mobs that kill you or drop you into the void and by what I see in the commands here it only counts death for ppl that touch water. I was thinking I could make a scoreboard deathcount, then I would make a command in repaeat and always active setting everyone who isn't in the death run area's deathcount to 0 (although I'm not very sure how to do that) and then make it so people with 1 point of death count will place a point on the dummy Death objective. Thx a lot though and plz try to answer how to make something happen to people outside a certain area.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/29/2014
Posts:
44
Minecraft:
GGFreshest
Member Details
Technically, if they all die, then you could just have a scoreboard objective with the stat of deaths, and if there are no players left with the score of 0 or less deaths, then tp them all back to where you want them to be, then reset all their scores to 0.
I'm going to do something like that and set another command block on a clock setting everyone's death count outside the death run to 0 since there are other ppl in the server. Thanks
Second Replace lava whit water and remove cactus or anything that can kill u.
After 3 command blocks (always active and repeat)
first command block : /execute @a ~ ~ ~ detect ~ ~ ~ water 0 /scoreboard players add @a death 1
second commandblock : /execute @a ~ ~ ~ detect ~ ~ ~ water 0 /gamemode 3 @p
third commandblock: /testfor @a[score_death=(number of runners)]
connected to the third one a comparator and a repeater whit 4 ticks and another 4 commandblocks
1:/tp @a x y z
2:/scoreboard players reset @a death
3:/say Game over!
4:/gamemode 2 @a
And for the moment when the runners complete you need this command in a repeat always active commandblock:/execute @a ~ ~ ~ detect ~ ~-1 ~ bedrock 0 /scoreboard players set @a death (number of runners)
So there is the concept info:
How runners win:Step on the bedrock block at the finish of the race.
How trapper win:Make every runner fall in water using his traps.(or just from an runner accident)
If the runner die it will be transfered into gamemode 3.After all runners die they will be transfered into gamemode 2.
Important:If you set the number of runners to 2 and you dont change it if there would be 3 runners the engine will break itself.
So this would work mostly, however there are a couple of things that can become more customizable.
1. Instead of detecting water, just detect the death.
2. No need for a specific number of runners.
3. I like to use armor stands for everything, so that will make it more easily changeable
If you already have a runner team, that makes things so much easier.
/scoreboard objective create deaths stat.deaths <--- look for the stat, i think this is correct, but it might be different
/gamemode 3 @a[team=Runners,score_deaths_min=1]
Above is to put all dead peeps in spectator mode. ^^
/summon armor_stand ~ ~ ~ {CustomName:"FinishLine",Invulnerable:1b,Invisible:1b,NoGravity:1b} <--- Do this where you want your finish to be
/execute @e[name=FinishLine,type=armor_stand] ~ ~ ~ /tp @a[team=Runners] <x> <y> <z> <--- Replace x y z with desired location
now to get a little unprofessional and use a tiny bit of redstone:
/testfor @a[score_death=0]
run a comparator out of that into a not-gate (block with redstone torch) and that torch powers a...
/tp @a[team=Runners] x y z
I'll make a proto when i can, that will probably help more than this
I'm going to do something like that and set another command block on a clock setting everyone's death count outside the death run to 0 since there are other ppl in the server. Thanks
You dont need to do that, just make sure all commands include the @a[team=Runners] datatag
I'm working on a death run map and I already have all of the traps made and almost everything else I just have a problem with one thing.
I don't know how to make it so when all of the Runners die, everyone goes back to the lobby or when a Runner reaches the end and kills Death, everyone goes back to the lobby. The thing is, I need to do this without having 2 teams for Runners and Death, most people will be in different teams (cause it's a small server, like 8 people, and there's like Admin team, Builder, etc). It would really help a lot if you answer me or try to, thanks.
PS: There's no plugins it's all command-based
You could tell a command block to tp everyone within so many blocks to spawn. The only problem is that you must make sure that no other buildings on your server are close enough to where a player form one of those buildings would be included in the tp. I'm not positive on how to do the command exactly. I believe it would be something like /tp @a[r=(radius where the players will be within)]. Hope this helped. I know it wasn't the most clear explanation, so let me know if you have any questions.
That's the command I want it to make once everyone dies it would be /tp @a[x=smth,y=smth,z=smth,r=smth]. What I'm asking is how to detect when every runner dies or death dies to make it execute that command. I've been thinking if I could use the deathCount in /scoreboard for a certain area and make a deathCount of everybody in that area not separate death counts for each player I could make it detect when they die but I don't know how to make that deathCount. If anyone knows how please post it. Thx for trying to answer though.
Can someone help me pleaaaase
OMG thanks so much for answering you have no idea how much I appreciate it. The thing is that some of my traps spawn mobs that kill you or drop you into the void and by what I see in the commands here it only counts death for ppl that touch water. I was thinking I could make a scoreboard deathcount, then I would make a command in repaeat and always active setting everyone who isn't in the death run area's deathcount to 0 (although I'm not very sure how to do that) and then make it so people with 1 point of death count will place a point on the dummy Death objective. Thx a lot though and plz try to answer how to make something happen to people outside a certain area.
Edit: don't worry I already know how to do it.
Technically, if they all die, then you could just have a scoreboard objective with the stat of deaths, and if there are no players left with the score of 0 or less deaths, then tp them all back to where you want them to be, then reset all their scores to 0.
Just an alternative.
I'm going to do something like that and set another command block on a clock setting everyone's death count outside the death run to 0 since there are other ppl in the server. Thanks
So this would work mostly, however there are a couple of things that can become more customizable.
1. Instead of detecting water, just detect the death.
2. No need for a specific number of runners.
3. I like to use armor stands for everything, so that will make it more easily changeable
If you already have a runner team, that makes things so much easier.
/scoreboard objective create deaths stat.deaths <--- look for the stat, i think this is correct, but it might be different
/gamemode 3 @a[team=Runners,score_deaths_min=1]
Above is to put all dead peeps in spectator mode. ^^
/summon armor_stand ~ ~ ~ {CustomName:"FinishLine",Invulnerable:1b,Invisible:1b,NoGravity:1b} <--- Do this where you want your finish to be
/execute @e[name=FinishLine,type=armor_stand] ~ ~ ~ /tp @a[team=Runners] <x> <y> <z> <--- Replace x y z with desired location
now to get a little unprofessional and use a tiny bit of redstone:
/testfor @a[score_death=0]
run a comparator out of that into a not-gate (block with redstone torch) and that torch powers a...
/tp @a[team=Runners] x y z
I'll make a proto when i can, that will probably help more than this
You dont need to do that, just make sure all commands include the @a[team=Runners] datatag
I can't use teams because of reasons I stated in my first comment, I already figured out how to do it, don't worry.