1
Need command help!
I want a command block system that checks if a player is at a certain height (in my case it's 8). And I want it to teleport everyone to 100 14 101.
The problem I'm having is that I want it to do it every time someone is at that height, and I want it to check in a certain area (not around the command block).
So I want it to work like this:
*Command block checks for player at height 8, in an 11 by 11 by 1000 room.
*If a player in that room is at height 8, he gets teleported once to 100 14 101.
And obviously since it's a 1000 room. Eventually the chunks with the command blocks are going to unload, and it's not going to work anymore. So that's another problem.
The problem I'm having is that I want it to do it every time someone is at that height, and I want it to check in a certain area (not around the command block).
So I want it to work like this:
*Command block checks for player at height 8, in an 11 by 11 by 1000 room.
*If a player in that room is at height 8, he gets teleported once to 100 14 101.
And obviously since it's a 1000 room. Eventually the chunks with the command blocks are going to unload, and it's not going to work anymore. So that's another problem.
Create an account or sign in to comment.
3
1
It would seem that you need to specify all co-ordinates for that to work. My apologies.
Originally from Skylinerw, but modfied.
/execute @a ~ ~ ~ execute @a[y=10,dx=0,dy=0,dz=0,c=1] ~ ~ ~ tp @a[c=1] XYZ
There seems to be an issue in that it checks for 2 co-ords above where it's supposed to. So I had to move it up by 2. If it doesn't work all the time just use a clock and if you don't know how to make a clock you probably shouldn't be doing this in the first place. It doesn't need to be reset as it only runs the tp command if the co-ordinates of the player is are correct. This command runs all the time but won't be successful all the time. If you want to know how to load chunks an easy way to do it is search for SimplySarc's remote chunk loader.
Originally from Skylinerw, but modfied.
/execute @a ~ ~ ~ execute @a[y=10,dx=0,dy=0,dz=0,c=1] ~ ~ ~ tp @a[c=1] XYZ
There seems to be an issue in that it checks for 2 co-ords above where it's supposed to. So I had to move it up by 2. If it doesn't work all the time just use a clock and if you don't know how to make a clock you probably shouldn't be doing this in the first place. It doesn't need to be reset as it only runs the tp command if the co-ordinates of the player is are correct. This command runs all the time but won't be successful all the time. If you want to know how to load chunks an easy way to do it is search for SimplySarc's remote chunk loader.
1
/tp @a[y=8] 100 14 101
Think that should do it. Basically it'd tp all players at the y co-ordinate of 8 to those co-ords. If you want it to check in an area you'd probably need to use dx and dy as well as defining all co-ordinates.
So take the co-ordinate of the upper corner or lower corner of the box shape.
Then make either dx and/or dz reach the opposite corner. So if you've typed the co-ords of the lower right corner, you'd want to type a dx and dz value that reaches the top left corner. However since you're checking for only 1 specific y co-ordinate the cubic area you're searching will only be 1 block in height.
Think that should do it. Basically it'd tp all players at the y co-ordinate of 8 to those co-ords. If you want it to check in an area you'd probably need to use dx and dy as well as defining all co-ordinates.
So take the co-ordinate of the upper corner or lower corner of the box shape.
Then make either dx and/or dz reach the opposite corner. So if you've typed the co-ords of the lower right corner, you'd want to type a dx and dz value that reaches the top left corner. However since you're checking for only 1 specific y co-ordinate the cubic area you're searching will only be 1 block in height.
1
That just tps me instantly to 100 14 101. And how would I even make it so it's automatically resettable? Cause if I just put that into a command block, it will only execute the command once and that's it.
And I'll still have the issue with the command block being in unloaded chunks.
And I'll still have the issue with the command block being in unloaded chunks.