ScratchData LogoScratchData
Back to JAM58_Test's profile

Cloud Daily Leaderboard Test

JAJAM58_Test•Created November 4, 2023
Cloud Daily Leaderboard Test
7
1
82 views
View on Scratch

Instructions

(Updated for better optimizations) A system for cloud daily leaderboards! You can click the button to increase the cloud score, and leaderboards will automatically reset at 12:00 UTC every day! The only flaw is that once the project gets inactive, it might get inaccurate, since there’s no way to run these scripts if no one’s online to do so

Description

I wanted this because it keeps things more interesting than just a normal all-time top score How does this work? - Whenever you run the project, it sets a cloud variable to a certain value, determined with the days since 2000 block. - This returned value starts at 0, increases by 1 each second, and will reset back to 0 every 24 hours. (Since it's calculated with the days since 2000 block, it'll automatically do this.) - Before this, it also does a check to see if the true value is less than the cloud variable; since the values will differ each time the project is run. When that value is indeed less than the cloud variable, the leaderboards reset. I switched away from the "current [___]" block because that was affected by time zones, so it could be triggered when it wasn't supposed to, and mess up the leaderboard scores. The "days since 2000" block gives the same value for everyone no matter what the time zone, so using it eliminated that problem. (Originally shared November 3rd, 2023)

Project Details

Project ID918926547
CreatedNovember 4, 2023
Last ModifiedDecember 8, 2023
SharedDecember 6, 2023
Visibilityvisible
CommentsAllowed