How to make a counter

Hello everyone, I want to make a 2 minute counter for example when the button is clicked, can you show me with blocks how can I do it (the counter will be in the text)

No need of extension, just use clock component.
Set interval 1000
Timer always fire , timer enabled untick in (in designer part)

Blocks part

Initialise one global variable with 0

On button click,
Set global final variable to get milli + 120000
Call clock1 timer to true

When clock timer
If global variable <1000
Call clock1 timer to false
Else set globl final variable get global variable - 1000,
Set lable 1 text to join (remaining seconds avaibale )(get global variable )( space Seconds)

1 Like

What are the blocks in the text in the parentheses at the end, I couldn’t do them, can you show them with a picture? @Still-learning. Fix:i did it thanks

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.