The /delay command would execute a command after a specified number of ticks
Example:
/delay [time in ticks] [command]
/delay 1200 summon sheep
This would summon a sheep after a 1200 tick delay
This command makes it possible to easily create timed sequences inside function files without using a scoreboard or the /schedule command, which is limited to entire function files rather than a single command. Command blocks already have a delay function, however when the delay command is combined with the execute command, you can create complex timed events that can execute a few seconds after the conditions have already been checked.
For example (in bedrock syntax):
/execute as @a at @s if block ~ ~-1 ~ moss_block run delay 2000 effect @s poison
This would make it so that any players who were standing on a moss block would receive the poison effect 2000 ticks later, even if they aren't standing on a moss block anymore. This system is more efficient than current methods of achieving the same outcome.
Please sign in to leave a comment.
2 Comments