How do you put a delay in the middle of command?
I'm making a TNT run (without TNT) and my issue is, when you start TNT run and you start jumping, sometimes a command block will register the block under you and delete it, and sometimes it will happen even before you will jump again, so you will fall to another layer/void instantly without making a mistake.
Here is the command that I'm using:
/execute as @a[distance=..100] at @a[distance=..100] if block ~ ~-0.5 ~ cyan_terracotta run setblock ~ ~-0.5 ~ air
(command block is "unconditional" and mode is "repeat (purple)")
All I want is just a delay; for example, half a second between "command block realised there is cyan_terracotta under player" and "setting block air under player" to let the player jump before falling down the layer.
Best Answer
You can't do it in one command, as far as I know. However, you can use a scoreboard objective to count the ticks that a player has been on
cyan_terracotta
for.First create a dummy scoreboard objective: (I've called it
obj
here)Then reset scores for players who aren't standing on cyan terracotta:
Now increment the score for players who are on cyan terracotta:
Then run your command at each player when it has been half a second: