0

I've got a vanilla server for 1.10 and I already did a scoreboard with two different Teams (red, blue). Now I want to check if either a player on team red or a player on team blue dies and to have a redstone output out of it.

2
  • Have you tried anything yourself?
    – rivermont
    Commented Jun 18, 2016 at 14:00
  • 1
    You may want to take a look into creating an objective with the "teamkill" criterion and then use "/scoreboard players test @a <objective> 1" to determine a kill of a member of the team. Instantly afterwards resetting with "/scoreboard players set @a <objective> 0". Do this for both teams.
    – RimaNari
    Commented Jun 18, 2016 at 14:47

1 Answer 1

1

Set up an objective to keep track of deaths:

/scoreboard objectives add Deaths deathCount

To test if a a player on red team had died, run this command:

/testfor @a[team=red,score_Deaths_min=1]

To test if a player on blue team had died, run this command:

/testfor @a[team=blue,score_Deaths_min=1]

You'll then probably need to set their Deaths back to 0 after doing what you want to do:

/scoreboard players set @a[score_Deaths_min=1] Deaths 0

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.