So i am making a little parkour map and i want to make a floor that tp's you to the beginning or checkpoint but when i use the command /execute as @p at @s if entity @s[y=0,dy=5] it will just tp it to the beginning. I would need it to tp it to a checkpoint or the beginning of a certain level so for example if a player falls on the blocks y=1 x=2 through 10 and z=2 through 10 you will be tp'ed to the beginning but if you fall on for example y=1 x=11 through 20 and z=11 through 20 you will be tp'd to the checkpoint.
I can't seem to figure out how the command works tho. Help would be appreciated
If something is unclear you can ask it and if you make the command make it so that i could fill in the xyz coods.
execute as @a[x=<x>,y=<y>,z=<z>,dx=<dx>,dy=<dy>,dz=<dz>] at @s run tp @s <x> <y> <z>
You might think the command block will make an 8x8 cube and look for players in that area but instead, the command block uses a sphere to detect the player so that's why it's tricky to adjust the distance.
So i am making a little parkour map and i want to make a floor that tp's you to the beginning or checkpoint but when i use the command /execute as @p at @s if entity @s[y=0,dy=5] it will just tp it to the beginning. I would need it to tp it to a checkpoint or the beginning of a certain level so for example if a player falls on the blocks y=1 x=2 through 10 and z=2 through 10 you will be tp'ed to the beginning but if you fall on for example y=1 x=11 through 20 and z=11 through 20 you will be tp'd to the checkpoint.
I can't seem to figure out how the command works tho. Help would be appreciated
If something is unclear you can ask it and if you make the command make it so that i could fill in the xyz coods.
Try this:
You might think the command block will make an 8x8 cube and look for players in that area but instead, the command block uses a sphere to detect the player so that's why it's tricky to adjust the distance.
Command block engineer // Developer // #TeamTrees
I am really new to commands and i don't really know what i need to fill in :/
If you would like to maybe put an example for the coords here the tp part i could handle myself
that would look like this:
Command block engineer // Developer // #TeamTrees