forum Forumsplay_arrow Minecraft fiber_manual_record Redstone

1

/testfor command help

1 emerald5 replies261 views
created 01/31/2015 6:04 pm by TSchweibz
last reply 02/02/2015 8:57 am
I have made parkour in my adventure map across a city but have no way to kill the player when they mess up and hit the ground. I was thinking about using the /testfor command block lined up to one that kills the player and sets their spawn to the latest checkpoint. The problem is that if I use the radius tag for 12 the radius becomes a 12x12 square, what I want is to have them get detected at a certain y-value(12) anywhere on the world. So it would create a sheet of area where the command block would test positive for the player being at that y-value. I tried using more than one command block, but they show up in the world and look bad(it's a superflat world). Any Ideas?
Posted by avatar
TSchweibz
Level 2 : Apprentice Miner
0

comment Login or register to post a reply.

5 replies

02/02/2015 8:57 am
Level 21 : Expert Nerd
Davekillerish
You can also just make the entire city floor turn to lava when you start it with /fill if your lazy.
02/01/2015 8:42 am
Level 2 : Apprentice Miner
TSchweibz
Thank you so much! That is a lot easier!
01/31/2015 8:23 pm
Level 28 : Expert Engineer
Jmal116
There's actually another way to do this, if you don't want to put barriers all over your map. With a nested execute, you can run a command on any player who is in on a certain y value like so:execute @a ~ ~ ~ execute @p[y=12,r=0] ~ ~ ~ kill @pThis will kill any player on y=12, thus eliminating the need for barriers.

Noelscrap .... and "0" with the ID (normally IDs are 0) ....

If you want to test for ALL damage values, instead of just assuming they are 0, you can put a -1 in the command instead of a 0. This way things that can rotate like buttons or torches, as well as things can change color like wool, will all get tested.
01/31/2015 6:39 pm
Level 2 : Apprentice Miner
TSchweibz
Thank you so much!
01/31/2015 6:32 pm
Level 1 : New Taco
Neolscrap
/execute @a[m=2] ~ ~ ~ detect ~ ~-1 ~ minecraft:block 0 /spawnpoint @p

This sets a player's spawnpoint. Replace "minecraft:block" with a block name that is ONLY used for a checkpoint (for example, a redstone block) and "0" with the ID (normally IDs are 0). Now, onto the detecting.

/execute @a[m=2] ~ ~ ~ detect ~ ~-1 ~ minecraft:barrier 0 /kill @p

So with that command, anyone on adventure mode standing on barriers gets killed. They will spawn on the last checkpoint if you also use the first command.

Now, use a super fast redstone clock and hook it up with those two command blocks. It should work (but they have to be in adventure mode!). If you think they look bad, hide the commands in a building.

Hope this helped.

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome