Discuss Scratch

Sprinternet
Scratcher
69 posts

Neverending timer

Thank you jrmagnoli for that timer variable.
But how I can make it doesnt stop after its first time started?
I mean scratch.mit.edu/projects/154121022/
in top right corner is one timer. How can I make it doesnt stop, even if I reset the project?
footsocktoe
Scratcher
1000+ posts

Neverending timer

Sprinternet wrote:

Thank you jrmagnoli for that timer variable.
But how I can make it doesnt stop after its first time started?
I mean scratch.mit.edu/projects/154121022/
in top right corner is one timer. How can I make it doesnt stop, even if I reset the project?

Use one of these timers if you need a never ending timer…

currentdayssince2000
Sprinternet
Scratcher
69 posts

Neverending timer

Maybe, I am Scratcher, but I dont know how to use these 2 blocks. Can you help me with that?
footsocktoe
Scratcher
1000+ posts

Neverending timer

Sprinternet wrote:

Maybe, I am Scratcher, but I dont know how to use these 2 blocks. Can you help me with that?

Sure. Set up some variables so you can display them on your screen and then you will understand them. They are timers with a fixed starting time and that are constantly running.

Days since 2000 is a timer that started in the year 2000. It displays fractions of a day so you can use it for seconds if you want.

setdaystodayssince2000

Current time displays your choice of minutes, seconds, hours, days.

setcurrenttimetocurrentminute
Sprinternet
Scratcher
69 posts

Neverending timer

I just don't know how to turn
dayssince2000
into
minutessince2000
deenfoxx
Scratcher
100+ posts

Neverending timer

Sprinternet wrote:

I just don't know how to turn
dayssince2000
into
minutessince2000

Well, there are 24 hours in one day, and 60 minutes in each hour, so…

setminutes since 2000tofloorofdayssince2000*24*60

…or just…

setminutes since 2000tofloorofdayssince2000*1440

The “floor” block just eliminates the decimal point (fractions of a minute).

Last edited by deenfoxx (April 5, 2017 23:36:38)

Powered by DjangoBB