I have a label with the text set as “60” and I want it to decrease by 1 every second. I am having difficulty with the timer feature because it just won’t work with anything that I try.
Hi, there are lots of ways of doing this but this is what has worked for me just quickly messing around:
Here is a demo link:
Let me know if that works,
Please DO NOT use the Preview button in the designer screen. Many functions do not work in that preview.
Timer works fine. Show your blocks so other can see it and help you to code it in a better way.
These blocks work well. In your screenshot, you have the condition
repeat until app variable timer = 0 but in your project link, it’s set to
repeat while ≥ 0. It needs to be
repeat while > 0 to work properly. Otherwise, when it gets to 0, it will run one more time and the length of the total time will be 62 seconds instead of 61.
seconds since 1970 block, I timed that loop and found that it takes 61.45 seconds in a browser. Seems pretty good but it’s not exactly 61 seconds.
Thank you, this worked for me