Discuss Scratch

CoolzAnimations
Scratcher
55 posts

Real Time Clock

Would it be possible to add a real time clock to my game? If so, how?
Also, I want the sky to match the time of day, how do I do that?
___AVACADO___
Scratcher
21 posts

Real Time Clock

You can tell the time of day using the block:
dayssince2000
Honestly, I am not 100% sure how you use the block but I know that it gives a reading of 12 decimal places so it's pretty accurate.

Once you have a method to get the time using the block, you could easily mirror the sky outside just by reading the time and working out what the sky would look like from that!

Hopefully, I was somewhat helpful.

Last edited by ___AVACADO___ (April 30, 2020 05:15:31)

Oumuamua
Scratcher
1000+ posts

Real Time Clock

https://en.scratch-wiki.info/wiki/Current_()_(block)

You will see some examples. The second script is what you need to change scenes day, afternoon, night

https://en.scratch-wiki.info/wiki/How_to_Create_a_Clock. <<<two different clocks analogue and digital

Last edited by Oumuamua (April 30, 2020 05:33:18)

MollyandMilodog
Scratcher
100+ posts

Real Time Clock

I saw this project and i thought if you looked at the code it might help https://scratch.mit.edu/projects/360868382/
RL1123
Scratcher
1000+ posts

Real Time Clock

I have an analog clock that you can use! https://scratch.mit.edu/projects/388934347/
CoolzAnimations
Scratcher
55 posts

Real Time Clock

that could work

rayli1123 wrote:

I have an analog clock that you can use! https://scratch.mit.edu/projects/388934347/
Oumuamua
Scratcher
1000+ posts

Real Time Clock

Some scratchers gave you their clock project link. Me too: https://scratch.mit.edu/projects/383294161/

But i encourage you to visit ScratchWiki:

Oumuamua wrote:

https://en.scratch-wiki.info/wiki/Current_()_(block)

You will see some examples. The second script is what you need to change scenes day, afternoon, night

https://en.scratch-wiki.info/wiki/How_to_Create_a_Clock. <<<two different clocks analogue and digital

Powered by DjangoBB