350: Is player following checkpoint path? Race lap counter. [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=_ayGuugpNNI



Minecraft
Game:
Minecraft (2011)
Duration: 29:56
338 views
12


Ep350: Making a path of checkpoints and checking if the player goes through each one. Then making that into a lap counter for a race.

00:30 Setup
02:15 Give eggs
04:15 Controller - place
08:40 Controller - remove
12:10 Temporary reset
13:05 Checkpoint counter
16:05 Controller - main

Version: 1.19

Commands, builds and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:    / coppitj  

Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord:   / discord  

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" and "less than" with the appropriate angled bracket.

Commands used:

Setup:
IUN: scoreboard objectives add marker.id dummy
CUA: scoreboard objectives add laps dummy
CUA: scoreboard players set .target_laps laps 3
CUA: scoreboard players set .target_checkpoints marker.id 3

Give Egg Place:
IUN: give @p slime_spawn_egg{display:{Name:'{"text":"Checkpoint Marker"}'}, EntityTag:{id:"minecraft:marker", Tags:["checkpoint_place"]}}

Give Egg Remove Last:
IUN: give @p strider_spawn_egg{display:{Name:'{"text":"Checkpoint Marker"}'}, EntityTag:{id:"minecraft:marker", Tags:["checkpoint_remove"]}}

Controller Place Marker:
RUA: execute at @e[tag=checkpoint_place] run summon marker ~ ~ ~ {Tags:["checkpoint"]}
CUA: execute as @e[tag=checkpoint] unless score @s marker.id = @s marker.id store result score @s marker.id run scoreboard players add .id_holder marker.id 1
CUA: kill @e[tag=checkpoint_place]

Controller Remove Last Marker:
RUA: execute at @e[tag=checkpoint_remove] run kill @e[tag=checkpoint,sort=nearest,limit=1]
CCA: scoreboard players remove .id_holder marker.id 1
CUA: kill @e[tag=checkpoint_remove]

Controller Main:
RUA: execute as @a[x=69, y=56, z=374, dx=0, dy=2, dz=2] unless score @s marker.id matches 1.. run scoreboard players set @s marker.id 1
CUA: execute at @a[scores={marker.id=1..}] as @e[type=marker, tag=checkpoint, distance=..1] if score @s marker.id = @p marker.id run scoreboard players add @p marker.id 1
CUA: execute as @a[x=69, y=56, z=374, dx=0, dy=2, dz=2] if score @s marker.id = .target_checkpoints marker.id store success score @s marker.id run scoreboard players add @s laps 1
CUA: execute as @a[x=69, y=56, z=374, dx=0, dy=2, dz=2] if score @s laps = .target_laps laps run say I win!

Reset:
IUN: scoreboard players set @p marker.id 0
CUA: scoreboard players set @p laps 0

Set Checkpoint count:
IUN: scoreboard players set .target_checkpoints marker.id 0
CUA: execute as @e[type=marker, tag=checkpoint] if score @s marker.id "greater than" .target_checkpoints marker.id run scoreboard players operation .target_checkpoints marker.id = @s marker.id
CUA: scoreboard players add .target_checkpoints marker.id 1




Other Videos By Infernal Device


2024-06-25360: Interactive custom ceiling lights. [Minecraft Map Making]
2024-06-24359: Timed commands using a predicate. [Minecraft Map Making]
2024-06-23358: Mob death checking for Tower Defence. Updated. [Minecraft Map Making]
2024-06-22357: Rechargeable Gas mask with limited uses. [Minecraft Map Making]
2024-06-21356: Simple Locked door experiment. [Minecraft Map Making]
2024-06-20355: Lightable torches Updated. Added lifetime, light with arrows. [Minecraft Map Making]
2024-06-19354: Countdown timer with ticking sound. [Minecraft Map Making]
2024-06-18353: Modifying sidebar look for an effect selector. [Minecraft Map Making]
2024-06-17352: Floor crafting in 1.20.6. [Minecraft Map Making]
2024-06-16351: Checking mob deaths for a tower defence game. [Minecraft Map Making]
2024-06-15350: Is player following checkpoint path? Race lap counter. [Minecraft Map Making]
2024-06-14349: Did a player throw this item? Experiments. [Minecraft Map Making]
2024-06-13348: Torches that players can light and put out. [Minecraft Map Making]
2024-06-12347: Web Potion. Detecting where potions land. [Minecraft Map Making]
2024-06-11346: Infectious zombie plague. [Minecraft Map Making]
2024-06-10CoppitCraft Castle 050: Trees and a statue.
2024-06-10345: Code entry by copying held block to item display. [Minecraft Map Making]
2024-06-09344: Item frame that displays the first item in a chest. [Minecraft Map Making]
2024-06-08343: Updated. Big moving chain. [Minecraft Map Making]
2024-06-07342: Detecting weather. [Minecraft Map Making]
2024-06-06341: Top down camera view, remote controlled entity with button detection. [Minecraft Map Making]



Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



Other Statistics

Minecraft Statistics For Infernal Device

At present, Infernal Device has 181,722 views spread across 860 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.