Recently I've been trying to repair a parkour course that I built from a minecraft server so that it will function with working checkpoints, timers etc. in a vanilla world. I haven't worked on commands for years and it's a hell of a lot more advanced than it used to be and there's a few things I wanted to try to make it easier. So far I have working checkpoints, timing system and a way for fall damage to be prevented, however I was hoping there was a way to add a few more things to it.
I know I've seen it in YouTube videos of maps before where you are given a held item (whether it be a book, fishing rod or whatever) and when you right clicked it, it would then teleport you to a certain location. I want something like this for the parkour, so that if the player falls, they can just use it to be instantly teleported back to the checkpoint.
I also wanted to know if there's a way to make the player face in a particular direction when using the checkpoint (at the moment I'm just using pressure plates and a command block that does /spawnpoint) and for most of them it spawns me facing in the wrong direction. Is there anyway to fix this?
Depending in where the fall is you could just do a testfor entities command and run it into a teleport back to checkpoint. So if people fall they would just automatically port back.
Those tildas are where you put the checkpoint. Also after that teleport command there will be an option to adjust Y and X rotation upon teleport. Just play with it.
Final note. What I mentioned above would really help with teleporting you back facing the same direction.
That will teleport a player within a 15 meter radius of the casted fishing hook to wherever you want with those final tildas. With this build you could have a different repeating execute command block for each checkpoint so when you cast the fishing hook it teleports you to the beginning of the checkpoint facing the right direction which is done by adjusting player rotation after those final tildas.
Recently I've been trying to repair a parkour course that I built from a minecraft server so that it will function with working checkpoints, timers etc. in a vanilla world. I haven't worked on commands for years and it's a hell of a lot more advanced than it used to be and there's a few things I wanted to try to make it easier. So far I have working checkpoints, timing system and a way for fall damage to be prevented, however I was hoping there was a way to add a few more things to it.
I know I've seen it in YouTube videos of maps before where you are given a held item (whether it be a book, fishing rod or whatever) and when you right clicked it, it would then teleport you to a certain location. I want something like this for the parkour, so that if the player falls, they can just use it to be instantly teleported back to the checkpoint.
I also wanted to know if there's a way to make the player face in a particular direction when using the checkpoint (at the moment I'm just using pressure plates and a command block that does /spawnpoint) and for most of them it spawns me facing in the wrong direction. Is there anyway to fix this?
Thanks for the help.
There is a function that teleport the player at one spot facing a specific direction. Try it out in chant commands so you know how to use it better.
Wubbla Lubba Dub Dub!
Depending in where the fall is you could just do a testfor entities command and run it into a teleport back to checkpoint. So if people fall they would just automatically port back.
Repeating CB
/testfor @e[type=player,x=Xmin,y=Ymin,z=Zmin,dx=Xarea,dy=Yarea,dz=Zarea]
Take a comparator off the side of that block and feed it into an Impulse CB with;
/teleport @e[type=player,x=Xmin,y=Ymin,z=Zmin,dx=Xarea,dy=Yarea,dz=Zarea] ~~~
Those tildas are where you put the checkpoint. Also after that teleport command there will be an option to adjust Y and X rotation upon teleport. Just play with it.
Final note. What I mentioned above would really help with teleporting you back facing the same direction.
However, this could also work.
/execute @e[type=fishinghook,r=15] ~~~ teleport @e[type=player] ~~~
That will teleport a player within a 15 meter radius of the casted fishing hook to wherever you want with those final tildas. With this build you could have a different repeating execute command block for each checkpoint so when you cast the fishing hook it teleports you to the beginning of the checkpoint facing the right direction which is done by adjusting player rotation after those final tildas.