1

How do I kill a player when they step on a specific block?

YoussofHD's Avatar YoussofHD6/17/15 8:29 pm
1 emeralds 13.6k 7
6/18/2015 12:22 pm
Zoyarox's Avatar Zoyarox
I've seen maps do this before. How do I make it where if a player steps on let's say red wool for example, they die. My first thought was that they use the /testfor player on each coordinate where the block is but that seemed like too much work for people with big maps. Is there a simple way to execute the /kill command when a player steps on a specific block type? (In this case, Red Wool)
Posted by YoussofHD's Avatar
YoussofHD
Level 1 : New Miner
0

Create an account or sign in to comment.

7

2
06/17/2015 8:47 pm
Level 52 : Grandmaster Pixel Painter
craftykids
craftykids's Avatar
If you put this:
/execute @a ~ ~ ~ detect ~ ~-1 ~ wool 14 kill @p
in a command block and connect it to a redstone clock, it should kill anyone who steps on red wool.

I'm not certain that it'll work with multiple players, though.
1
06/17/2015 9:18 pm
Level 12 : Journeyman Miner
KJP12
KJP12's Avatar
Might want to do this:
/execute @a ~ ~ ~ detect ~ ~-1 ~ wool 14 kill @p[r=1]
in case if any buggy mass killing goes on.
1
06/18/2015 8:58 am
Level 32 : Artisan Toast
DaSquyd
DaSquyd's Avatar
There's no point in adding the "[r=1]", because you will still be the closest player if you were to use @p.
1
06/18/2015 12:11 pm
Level 12 : Journeyman Miner
KJP12
KJP12's Avatar
Though, what if the game thought the player was still alive, then bugged out, and killed everyone in the area.
1
06/18/2015 12:22 pm
Level 21 : Expert Blockhead
Zoyarox
Zoyarox's Avatar
It can´t bug out, it would only kill everyone else staying on that type of wool, and when the person dies it can´t target it again.
1
06/17/2015 9:15 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
That should work with multiple people, it's the same command I would have given.
1
06/17/2015 8:36 pm
Level 1 : New Network
Diamond Network
Diamond Network's Avatar
I guess some developers could code something together. I would suggest taking the time to do the ./testfor's.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome