Minecraft Blogs / Article

How do I kill a player that is two blocks above the commandblock executing the command to do this

  • 557 views, 2 today
  • 1
  • 0
  • 3
BatchyBoi's Avatar BatchyBoi
Level 2 : Apprentice Miner
0
Basically I am asking the question, how do I kill a player standing ins specific coordinates...
Tags

Create an account or sign in to comment.

AmericanBagel
05/13/2019 3:39 pm
Level 43 : Master Engineer
AmericanBagel's Avatar
This has been asked many times. It's quite simple. I would recommend googling it before starting a post about it. Also, you should be posting this in the PMC forum, not as a blog. The rules specifically say to post quick questions on the forums.

As for your question, you would do /kill @a[x=100,y=100,z=100,distance=..1]. Make sure to change the XYZ values to the proper block. Make sure to set the command block on repeat and always active. Then from the direction the command block is pointing in, create a command block with the arrow facing the same direction. Make that command block chain always active and input whatever command you want. I'm a bad explainer so here's an image. Click here
1
MinecraftGamer657
05/12/2019 8:47 pm
Level 1 : New Miner
MinecraftGamer657's Avatar
You can use the "testfor @a[r=X] " (x is the range) This command has to be called repeatedly so you can have a fast clock or you can use a repeating command block. Also, you need to take a comparator output from this or have a chain command block set to conditional. which will make it only execute if the previous command was successful. Either route you take doesn't really matter it's just if you want it a little more compact. Anyways the next command would be "kill @p" and it will kill the nearest player to the command block. I'm not sure, but "testfor @a[x=0,y=64,z=0,r=3,m=0]" might work to pinpoint the exact location just fill in the coordinates. It might work.
1
BatchyBoi
05/11/2019 4:06 pm
Level 2 : Apprentice Miner
BatchyBoi's Avatar
To view the full picture correctly and to be able to see the text just click on the image.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome