How to track player's height level?
I would really like to know if it's possible to track "how high" the player is and link it to another command.
For example, if the player is above or crossed height level of 240, it would trigger a set of commands (tp ~ ~-100 ~ as an example).
Best Answer
Have a command block on a fast clock with
testfor @a[y=240]
Have a comparator coming out of that command block and into another one. In that new command block put
tp @a ~ ~-100 ~
Of course you can change the values and if you want it only for specific players. As long as they start under 240 y or if they start above and fall to 240 y they will be teleported. If you have any questions, feel free to contact me.
Pictures about "How to track player's height level?"



Football player tracking explained in 2 minutes
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Pok Rie, Vicky Tran, Naren Y, Kelly
