#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)

spark fable
#

need help

stoic surgeBOT
pseudo stag
lapis rain
#

If you have control about the tick speed, you can also use a scoreboard that counts down every tick

spark fable
#

idk how to do anything can i send it in here? the datapack

lapis rain
#

Sure. It would be even better if you could send only the related files in text form like this:
```mcfunction
<code_here>
```

lapis rain
# fossil shuttle 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

fossil shuttle
#

ohh

#

yea

#

didn't even think about the players being able to change tick speed lol

spark fable
#

this is the data pack

fossil shuttle
#

Use a scoreboard and count it down in a tick function

spark fable
#

how tho lmao

fossil shuttle
#

what exactly do you not understand?

spark fable
#

how exactly do i use a scoreboard\

amber remnantBOT
#
execute as @s at @s run say test
pseudo stag
#

Oh wow

#

That's epic

#

Does this work on other servers?

amber remnantBOT
#

You create a new scoreboard objective like this:

scoreboard objectives add example dummy

In your tick function, you do

execute if sore $countdown example matches 6000 run <warning>
execute if sore $countdown example matches 1 run <teleport>
execute if score $countdown example matches 1.. run scoreboard players remove $countdown example 1

And you start the countdown with

scoreboard players set $countdown example 36000
fossil shuttle