1

Need Help With The /testfor Command

spacemangames-66's Avatar spacemangames-661/4/16 6:30 am
1 emeralds 270 4
1/6/2016 6:47 pm
AlbinoTeen's Avatar AlbinoTeen
Hi, I'm making a custom map and I'm trying to teleport the player to a location when they die or fall past Y= -4 any will work for me.

I have tried using this in a command block hooked up to a clock
testfor @p [x=~, y=-4, z=~]

Is there a command like this that will work?
Posted by spacemangames-66's Avatar
spacemangames-66
Level 17 : Journeyman Engineer
7

Create an account or sign in to comment.

4

1
01/06/2016 6:47 pm
Level 1 : New Crafter
AlbinoTeen
AlbinoTeen's Avatar
If die first do /scoreboard objectives add [Name of score you want] stat.timeSinceDeath
then /tp @a[score_[Name of score]_min=1,score_[Name of score]=1] [Cords]
1
01/04/2016 10:11 am
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
To teleport when a player reaches a certain plane, I would suggest using a nested execute:execute @a ~ ~ ~ tp @p[y=-4,r=0] x y z
In my opinion it's a bit easier to work with than Arcaniax's solution above, though his would likely work just as well.

For people going there when they die, you can simply set the player's spawnpoints throughout the map so they automatically respawn there without any real work put in by you.
1
01/04/2016 8:03 am
Level 25 : Expert Dragonborn
NewSuperMario
NewSuperMario's Avatar
If I remember correctly this should work in Minecraft 1.9:

tp @a[y=-4,dy=-10] x y z

Unless you fall more than 200 blocks per sec but I don't think so
If that doesn't work you might have to specify x= and y= as well and maybe even dx= and dz=
1
01/04/2016 7:10 am
Level 84 : Elite Programmer
Arcaniax
Arcaniax's Avatar
tp @a[x=-10000,y=-100,z=-10000,dx=20000,dy=96,dz=20000] x y z
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome