#how to make countdown?
1 messages · Page 1 of 1 (latest)
bad
let n = 10, ref = system.runSchedule(() => {
if (n-- == 0)
system.clearRunSchedule( ref );
// code
})
Howso
just use tick for counter
more than enough
Date.now() is um needed and pointless
I'm wondering, what happens when an run schedule is cleared more times?
Would that cause any issues?
Thanks
Script run /1s?
Or /1ms
Alg tq
thats enough speed for count down imo
it might give error
But not an fatal one right?
It will just say something like run schedule don't exist
(I hope)
ye
Ah, nice
I guess theres also no way to detect if an special run schedule is running rn
stable is runSchedule, preview is runInterval.
Ah, interesting
What does system.clearRunSchedule( ref ); do here?
It clears the system run shedule
Wouldn't know without you bro, but what does that mean...?
system.runSchedule will run everything in it every tick
the system.clearRunSchedule clears the runSchedule, meaning it stops it from running again
Aha, thanks!
How did u manage to add a command to your profile description?
/MCBE Addon Creator
?
i made this a while ago it works pretty good