Can I track a teams total deaths (rather than individual kills)?
I have a team deathmatch server, and I want to keep track of all Team Deaths on both red and blue separately, regardless of the cause of death. This is because a lot of kills involve killing with potion effects, which don't seem to count as direct kills.
I want to keep track of and add up the deaths of every member on a team. I know how to track individual deaths, but I don’t know how to add them up into one score that can be displayed and tested.
Add the teams:
/scoreboard teams add Red
/scoreboard teams add Blue
And edit the color to Red and Blue:
/scoreboard teams option Red color red
/scoreboard teams option Blue color blue
Now add objectives for them:
/scoreboard objectives add DeathsRed deathCount
/scoreboard objectives add DeathsBlue deathCount
And setdisplay for them:
/scoreboard objectives setdisplay sidebar.team.blue DeathsBlue
/scoreboard objectives setdisplay sidebar.team.red DeathsRed
Now the team with the color will have the deaths shown.
If you want both teams to see the deaths, you can do it like this instead:
/scoreboard objectives add Deaths deathCount
/scoreboard objectives setdisplay sidebar Deaths
But keep the /scoreboard teams commands.
Reset deaths by doing:
/scoreboard players set @a Deaths 0
The deaths will show up after the player have died once or the command above has been executed.
Hope this helps, even though it's a bit messy.