1

Need Help With Command Blocks!!

DumCheese27 9/6/16 10:44 am
319
9/6/2016 3:51 pm
I'm making an adventure map, and i've hit a brick wall developing it, because I can't figure out a way to add a death detector. All the video tutorials are really outdated, and I'm not sure how I would go about this.. Anyone help me?
Posted by
DumCheese27
Level 16 : Journeyman System
14

  Have something to say?

JoinSign in

6

Greystalk
09/06/2016 10:59 am
Level 46 : Master Ranger
It's really easy. You don't even need any command blocks. Just run these two from your chat. It won't look like it did anything, but as soon as you die, it will be displayed on the side of your screen.

/scoreboard objectives add Deaths stat.deaths

/scoreboard objectives setdisplay sidebar deaths
1
DumCheese27
09/06/2016 11:02 am
Level 16 : Journeyman System
Is there a testfor I can use to activate a command block whenever the player dies?
1
Greystalk
09/06/2016 11:35 am
Level 46 : Master Ranger
yeah.

/testfor @a[score_Deaths_min=1]

Or.

/execute @a[score_Deaths_min=1] ~ ~ ~ /whatever command you want here

Just don't forget to reset the players score, or the above commands will keep activating.

/scoreboard players set @a[score_Deaths_min=1] Deaths 0
1
WhaleTuba
09/06/2016 3:51 pm
Level 33 : Artisan Narwhal
I'd recommend making two scoreboards, one to show the deaths, and another that will test when the player dies, and gets reset back to 0 once the wanted command is executed.
1
Maveriknight
09/06/2016 10:50 am
Level 18 : Journeyman System
You'd wanna use scoreboard, I think, set up to add 1 to a team made specifically to track deaths

That said, it's been a long time since I did anything with scoreboards or detection of deaths, so I may be mis-remembering.
1
DumCheese27
09/06/2016 10:55 am
Level 16 : Journeyman System
I'm pretty sure that's the right thing, but whenever I try to set up the command blocks the way the almighty YouTube says, it gives me an invalid message.. would you happen to remember how you actually made the commands?
1

Welcome