1
Need Help With The /testfor Command
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
Is there a command like this that will work?
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?
Create an account or sign in to comment.
4
1
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]
then /tp @a[score_[Name of score]_min=1,score_[Name of score]=1] [Cords]
1
To teleport when a player reaches a certain plane, I would suggest using a nested execute:
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.
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
If I remember correctly this should work in Minecraft 1.9:
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=
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
tp @a[x=-10000,y=-100,z=-10000,dx=20000,dy=96,dz=20000] x y z