0

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.

2
  • 4
    [Comments Removed] Hi all. Let's see if we can nip this in the bud please. @FabianRöling - I agreed with your initial 'Too Broad' vote, however your second comment's tone wasn't great. Even if a lot of new users don't do proper research before posting, doesn't mean that is the case for everyone; "Can you show us what you've tried so far, what part are you stuck on?" comes off a lot nicer than "barely anyone does proper research...so I assume you haven't". From the Code of Conduct: "If you’re here to help others, be patient and welcoming."
    – Robotnik
    Commented Sep 11, 2018 at 23:33
  • 4
    HighOnMinecraft - Firstly thanks for editing your post to be a lot clearer and to focus on a single issue you're having. However, rather than escalating with name calling, be open to feedback: "Edits, comments, and suggestions are healthy parts of our community." - Code of Conduct. Show us what you've tried. "I did search, but all I could find was [this link] about tracking individual kills" or "I've tried [these commands] but they aren't quite right." is a lot more constructive and helpful to anyone looking to help you :-)
    – Robotnik
    Commented Sep 11, 2018 at 23:35

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.