#How do I make a 30 minute timer with a 5 minute warning and auto teleport everyone to spawn when it
1 messages · Page 1 of 1 (latest)
/stopwatch
If you have control about the tick speed, you can also use a scoreboard that counts down every tick
idk how to do anything can i send it in here? the datapack
Sure. It would be even better if you could send only the related files in text form like this:
```mcfunction
<code_here>
```
wdym?
If you know the exact tick speed (for normal playthroughs it's always 20) you can make a scoreboard count down the exact time which can be easier / more performant for some cases
ohh
yea
didn't even think about the players being able to change tick speed lol
Use a scoreboard and count it down in a tick function
how tho lmao
what exactly do you not understand?
how exactly do i use a scoreboard\
[35mexecute [34mas [36m@s [34mat [36m@s [34mrun [35msay [0mtest
You create a new scoreboard objective like this:
[35mscoreboard [34mobjectives add [0mexample dummy
In your tick function, you do
[35mexecute [34mif [0msore [36m$countdown [0mexample [34mmatches [32m6000 [34mrun [0m<warning>
[35mexecute [34mif [0msore [36m$countdown [0mexample [34mmatches [32m1 [34mrun [0m<teleport>
[35mexecute [34mif score [36m$countdown [0mexample [34mmatches [32m1[35m.. [34mrun [35mscoreboard [34mplayers remove [36m$countdown [0mexample [32m1
And you start the countdown with
[35mscoreboard [34mplayers set [36m$countdown [0mexample [32m36000
⬆️