Minecraft Redstone command help?

Discussion in 'Gaming Discussion' started by Darkstorm77, May 30, 2016.

Tags:
  1. Darkstorm77

    Darkstorm77 Former M.od+ Donator

    Messages:
    1,172
    Likes Received:
    2,233
    Minecraft:
    Darkstorm77
    Hey guys, I have a redstone related question here because I am having trouble with getting a certain command right and was wondering if anybody knows what I could do. I want to test for a player with 19 health (9 and a half hearts) and kill them specifically if they do (That means they originally had 10 hearts bu lost half a heart.) Anyone have any ideas on the command? [I have a fast redstone clock set up] Thank you a lot if you can find out!
     
  2. Defectus

    Defectus I love my wife Donator

    Messages:
    581
    Likes Received:
    606
    Minecraft:
    Defectus
    /scoreboard players tag @a add lostHalf {Health:19f}
    and
    /kill @a[tag=lostHalf]
     
    Darkstorm77 likes this.
  3. Darkstorm77

    Darkstorm77 Former M.od+ Donator

    Messages:
    1,172
    Likes Received:
    2,233
    Minecraft:
    Darkstorm77
    The command did not work.
    [​IMG]
     
  4. Defectus

    Defectus I love my wife Donator

    Messages:
    581
    Likes Received:
    606
    Minecraft:
    Defectus
    You have to be on 1.9 to use the tag function. It's also possible to do under 1.9 with objectives but tags save a command and some unneeded space.
     
    Darkstorm77 likes this.
  5. Darkstorm77

    Darkstorm77 Former M.od+ Donator

    Messages:
    1,172
    Likes Received:
    2,233
    Minecraft:
    Darkstorm77
    Ok so this command fully works except for one thing. My friend lost health and nothing happened. Then I lost health and I got killed. Then my friend got hit again and we both died (I was spectating in creative mode at that point). Any idea on the problem?
     
    Last edited: Jun 4, 2016
  6. Defectus

    Defectus I love my wife Donator

    Messages:
    581
    Likes Received:
    606
    Minecraft:
    Defectus
    Oh yes, I forgot for some reason.
    The first command should be
    /scoreboard players tag @a[tag=hit] remove hit
    then the second is
    /scoreboard players tag @a add lostHalf {Health:19f}
    and the third is
    /kill @a[tag=lostHalf]
    As for your friend not dying when they lost health, no idea, but this solution might fix it.