Spent a while looking for the answer, and trying to build it myself - but to no avail!
I want to make a digital clock that works to show the real world time on screen. I am building a fake tablet, which learners can interact with within a game, and a nice touch would be the clock on the lock screen showing the actual time in the world!
Any ideas how this could be done? (FYI I am a 0/10 when it comes to Java!) Thanks
Just in case anyone is interested, I have been keeping a file with all different snippets of time-related coding for a while and have compiled them into a demo module to test out on.
The coding is listed above the blue execute buttons. Lots of the coding use the same base variables, so that is why when one clicks one button, values may change elsewhere. It was to kind of help me wrap my head around javascript, but I realise now that it is pointless. Everyone has different styles and methodologies, and I have just now discovered that ChatGPT can break down and analyse code and explain it to you, and also generate its own clean code. Amazing.
Here is a link to the Storyline file if anyone wants to yoink a particular bit of code from it:
25 Replies
Hi Phil. That's cool.
How does one write it as a function? :)
Via ChatGPT. I asked it to amend the code to a function and add an interval for seconds. This is the code it produced and it works:
That is cool, glad you got it sorted.
Sent from my iPhone
Just in case anyone is interested, I have been keeping a file with all different snippets of time-related coding for a while and have compiled them into a demo module to test out on.
Here is a link to the demo in Review:
DateTimeTest | Review 360 (articulate.com)
The coding is listed above the blue execute buttons. Lots of the coding use the same base variables, so that is why when one clicks one button, values may change elsewhere. It was to kind of help me wrap my head around javascript, but I realise now that it is pointless. Everyone has different styles and methodologies, and I have just now discovered that ChatGPT can break down and analyse code and explain it to you, and also generate its own clean code. Amazing.
Here is a link to the Storyline file if anyone wants to yoink a particular bit of code from it:
https://www.dropbox.com/s/ihijnp3ez04mf6n/DateTimeTest-2023.story?dl=0
Just for fun, here are two examples of clocks I built a long time ago.