ScratchData LogoScratchData
Back to PersonPersonson's profile

precise multiple timers system

PEPersonPersonson•Created November 26, 2024
precise multiple timers system
2
1
6 views
View on Scratch

Description

instructions: click "add" to add a timer. click "remove" to remove the timer at the bottom of the list i got the idea from https://en.scratch-wiki.info/wiki/Stop_Detection when i was fixing a bug in flap v3.10.9 with the menus not working when i thought it would be cool if the leaderboard list disappeared when the stop sign was clicked. when i implemented it i changed my mind because it kept the project running which looked weird. ANYWAYS, the code for that inspired me to make this. i've always wanted to make a multiple-timer system that's as precise as Scratch's built-in timer, and the aforementioned article kinda inspired/helped me figure out how. it's based on Scratch's timer but every timer you add was started at a different time, so it subtracts that from the Scratch timer to get the new timer value. this way, it also works in turbo mode and you can add as many as you like with no lag :D i also added a bunch of extra code to make sure it doesn't do anything weird with the subtraction with a ton of flickering numbers that shouldn't be there feel free to use in your own projects! update 12/20/24: i ended up needing this for the game I'm working on so it's convenient that i already had it

Project Details

Project ID1102509702
CreatedNovember 26, 2024
Last ModifiedFebruary 9, 2025
SharedNovember 26, 2024
Visibilityvisible
CommentsAllowed