0

So, I am doing a little Minecraft adventure map and the number one thing I keep getting stuck on is how to execute a command block once a zombie hits you three times. Thanks! :D

1
  • 1
    nothing and i dont now if this is possible!
    – user144609
    May 21, 2016 at 11:51

1 Answer 1

1

It's possible, but not 100% reliable. You want to repeatedly testfor a Zombie in less then 1 block from a Player (hitting distance) 3x:

/execute @e[type=Zombie] ~ ~ ~ testfor @a[r=1]

Or the other way around: /execute @a ~ ~ ~ testfor @e[type=Zombie, r=1]

1) Put one of these commands into a Command block with a Comparator facing out of it.

2) Then, use a Redstone impulse lengthener as shown below to lengthen the signal to like 10 seconds.

3) Add a Piston that allows a clock to repeatedly trigger a Command block.

4) This Command blog should have the same command as above.

5) Repeat this one time more and you got it done.

6) Add a fourth CMD block at the end with you own command.

Redstone signal lengthener:

SUPER REDSTONE!
(Instead of "door" use "Next Command block")

1
  • @kevinbestkiller Feel free to hit the checkmark next to this post if it helped you!
    – user143228
    Oct 9, 2016 at 17:48

You must log in to answer this question.