1

Note: This is not for 1.13, but 1.12

I want to create a checkpoint system for my Parkour map, but I fail everytime. When a player stands on an emerald block, this should be his checkpoint. If he needs to get back, he should use an item (like Carrot on a Stick) to get back to his latest checkpoint. There will be more than 1 emerald block and this should be multiplayer friendly (for up to 4 players).

What I did:

  1. Set up a scoreboard that checks if a carrot on a stick gets rightclicked, and on what team the player is (only 1 player per team)
  2. An execute command that checks if the player stands on an command block. If it's true, an already summoned armor stand with the name will teleport to the player, while the command block is active.

When the player now fails, he can right click his carrot on a stick, to get teleported to the Armor stand (I don't have this command, because when the other thing don't works, it's useless anyways)

/summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,NoGravity:1b,Small:1b,Marker:1b,CustomName:"P1CP",DisabledSlots:2039583}
/execute @p[score_P1=1,score_P1_min=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:emerald_block 0 tp @e[Name:P1CP] @p

P1CP = Name of Armorstand (P1 = player 1; CP = checkpoint)

  • 1
    Hello ThaumicTom! Welcome to Stack Exchange! Could you please elaborate on the steps you are following to create the check point system? – Manchineel Oct 21 '17 at 13:04
  • Okay, i will try. – ThaumicTom Oct 21 '17 at 13:05
  • 1
    Tip: PersistanceRequired is not required for armor stands. It's there to prevent hostile mobs from despawning. – Fabian Röling Oct 21 '17 at 15:42
  • 1
    The second command teleports the armor stand that you created in the first command to any player standing on an emerald block, or to be exact, to the player standing on an emerald block that is closest to the command block. Is that what you intended? This doesn't teleport the player at all, so are you searching for that part of the command system that effectively respawns the player? In that case: Is the armor stand intended as a static checkpoint marker? Or did you already expect it to work, but you didn't notice that the armor stand was teleported to the player, because you didn't see it? – Fabian Röling Oct 21 '17 at 15:49
  • 1
    @ThaumicTom The rules are clear that platform tags like "pc" should only be used when the question is asking specifically about the platform and that questions should not include tags like "Minecraft 1.12: in their titles". Your rejection of my suggested edit is not in accordance with those rules. – pppery Sep 3 at 21:04
1

Answer:

  1. Create an scoreboard named "carrot" /scoreboard objectives add carrot stat.useItem.minecraft.carrot_on_a_stick
  2. For multiplayer compatibility add a scoreboard named "P1" (for Player 1; needs Team selection) /scoreboard objectives add P1 dummy
  3. In a command block put this command to summon the armor stand that is required to use this system /summon armor_stand 151 102 -188 {Invisibility:1b,Invulnerable:1b,Small:1b,Marker:1b,CustomName:"P1CP",DisabledSlots:2039583}
  4. In a clock-command block place this command to test for the P1 player, that right clicked the carrot-rod /testfor @p[score_P1=1,score_P1_min=1,score_carrot=1,score_carrot_min=1]
  5. Place three chain command blocks on conditional mode right behind the violet one (repeatable command block;violet = default Resource Pack) and put this command into the first tp @p[score_P1=1,score_P1_min=1] @e[name=P1CP]
  6. In the second command block set this command tp @p[score_P1=1,score_P1_min=1] ~ ~ ~ ~ 0
  7. In the last set this scoreboard players set @p[score_carrot=1,score_carrot_min=1] carrot 0
  8. At last, place this command into an another clock-command block to actually let it happen /execute @p[score_P1=1,score_P1_min=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:emerald_block 0 tp @e[name=P1CP] @p[score_P1=1,score_P1_min=1]

The scoreboard names "carrot" and "P1" and the armor stand name "P1CP" can be changed, but don't forget to change the name in every command block that has the names in it. "minecraft:emerald_block" can be changed into a block of your choice. Make sure your command blocks are in the spawn chunks, so when you can't see the command block's chunks, it will still work.

  • The code on your 2nd step is wrong – l4m2 May 12 '18 at 20:37
  • It shouldn't. Maybe you are on a wrong version? – ThaumicTom May 14 '18 at 14:48
  • You /scoreboard objectives add carrot stat.useItem.minecraft.carrot_on_a_stick for twice – l4m2 May 15 '18 at 2:06
  • I don't understand. What do you mean with twice? – ThaumicTom May 15 '18 at 12:52
  • Your code 1 and code 2 be same – l4m2 May 15 '18 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.