I'm trying to find a way to set up some command blocks in bedrock edition so that when a player dies, torches are cleared from a certain area.

So far, I have this:

All chain command (cc) blocks and all always active, requiring no redstone

cc1: /scoreboard objectives add hasDied dummy (unconditional)

cc2: /testfor @a[score_hasDied_min=1] (conditional)

cc3: /scoreboard players set @a hasDied 0

cc4: /fill -14 27 74 95 35 270 minecraft:air 0 destroy minecraft:torch 1

  • This is close, the main issue left is capturing the actual death coordinate, and capturing that a death happened (unless you do mean to clear this specifically defined area, in which case all you need is to capture the death counter score going up) – Unionhawk Mar 9 at 23:38
  • @Unionhawk How would I go about doing that? I'm very unfamiliar with the commands but I did read about some of the syntax and such on the wikia. – Confused Mar 9 at 23:41
  • hmm... The wiki says the deathCount objective type is java edition only, so I'm not actually sure how to do this in Bedrock. Sorry :/ – Unionhawk Mar 9 at 23:43
  • It's alright. Thanks for pointing out the issue though! – Confused Mar 9 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.