I'm working on a pvp server and I have a scoreboard going that keeps track of people's death count. Is there a way that you can make it so that when a person reaches a certain number of deaths, their game mode changes to spectator? I'm thinking somewhere along the lines of a command block on a clock that tests for players with a minimum of x on a specific parameter which would be {deathCount} and when it was satisfied it would energize another command block which would change that person's game mode to spectator.
The Idea would be that everyone gets a certain amount of lives, maybe 5, when they run out, they become a ghost (spectator) where they can screw with people until the game's over
Make sure you have a death objective with the deathCount criteria type. THEN have a loop with the command:
/gamemode 3 @a[m=0,score_death_min=5]
If your death objective is a different criteria type such as dummy, it will not respond.
Yes, i had the death objective enabled, it was even posted on the scoreboard. after 6 deaths (in survival mode) still nothing happened. Does anybody want to actually try doing this? I don't understand what is going wrong. I'm pretty sure i did everything right
If you are getting no output then that may mean the command block isn't getting powered correctly, you made a typo or you used wrong objective name (you don't want to use the diplay name btw). Try running the command in chat, maybe you'll get an error message or it'll work.
Yeah i thought that too, so i tried using different inputs like a button, I also tried using a different command in the command block an that command was executed no problem. I haven't tried it in the chat window, I can do that when I get home from work later tonight
Make sure when you put the original scoreboard up that
/scoreboard objectives add death deathCount death
the first 'death' is the name of the objective and that is what you put into the [score_death=5]. Also use death=5 not death_min=5. Scoreboards are funny that way. Then just attach a NOT gate to get power out of it. You could also try this:
Make sure when you put the original scoreboard up that
/scoreboard objectives add death deathCount death
the first 'death' is the name of the objective and that is what you put into the [score_death=5]. Also use death=5 not death_min=5. Scoreboards are funny that way. Then just attach a NOT gate to get power out of it. You could also try this:
this command should only trigger when you have 5 deaths. Hope this helps!
Using "score_death=5" instead of "score_death_min=5" will not work as intended. "score_OBJECTIVE=#" is maximum score, while "score_OBJECTIVE_min=#" is minimum. If using only maximum of 5, the player will be set to spectator mode unless they've died 5 times, rather than being set to spectator after dying 5 times.
I had this: /gamemode 3 @a[m=0,score_deathCount_min=5]
I needed this: /gamemode 3 @a[m=0,score_deaths_min=5]
All I did wrong was I used the criteria type instead of the code name (deaths was my code name)
The Idea would be that everyone gets a certain amount of lives, maybe 5, when they run out, they become a ghost (spectator) where they can screw with people until the game's over
Can anyone think of a way to do this?
This is perfect, thanks!
So I tried this out today, for some reason I am getting no response from the command block
/gamemode 3 @a[m=0,score_death_min=5]
If your death objective is a different criteria type such as dummy, it will not respond.
Yes, i had the death objective enabled, it was even posted on the scoreboard. after 6 deaths (in survival mode) still nothing happened. Does anybody want to actually try doing this? I don't understand what is going wrong. I'm pretty sure i did everything right
Yeah i thought that too, so i tried using different inputs like a button, I also tried using a different command in the command block an that command was executed no problem. I haven't tried it in the chat window, I can do that when I get home from work later tonight
I like to help and howl and laugh all day XD
What do NOT say to get in trouble HERE!!!
My Blog
Using "score_death=5" instead of "score_death_min=5" will not work as intended. "score_OBJECTIVE=#" is maximum score, while "score_OBJECTIVE_min=#" is minimum. If using only maximum of 5, the player will be set to spectator mode unless they've died 5 times, rather than being set to spectator after dying 5 times.
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/
I had this: /gamemode 3 @a[m=0,score_deathCount_min=5]
I needed this: /gamemode 3 @a[m=0,score_deaths_min=5]
All I did wrong was I used the criteria type instead of the code name (deaths was my code name)
Thanks for the help everyone
how do you recreate this kin 1.16?