Timer in CoBlocks

Maybe I’m wrong, but it seems like making a variable in Scratch is SO much easier than in CoBlocks. Could someone please share a script with me of a countdown in CoBlocks? We want to see it, and when it reaches 0, it triggers something else (like a new level). Thanks for all that you do!

Hi @Kelly_Nickell!

Below you can find a simple timer example :slight_smile: . Press the remix button to copy the space and check out the code.

1 Like

Thanks Stefan,

I am super impressed that the CoSpaces team gets back to me so quickly whenever I have a question.

1 Like

Imagine that we want to find three objects. We have 15 seconds to do it but we got the three objects before the timer ends. what can we do to stop the timer?

Thanks so much

Hi @Bcodesal,

do stop the timer when all three items are found, you can use the break out of loop - block like this. Breaking out of the loop will stop the forever - block and the countdown :slight_smile:.

Click to see code solution

I noticed that your code can be improved by functions, too! I’ve send you a PM to show how your space can be improved.

What if you just want the timer to be on the screen at all times, no matter where you look? how would i code that?

HI Aurianna,
What you can do is add text, have the text ‘say the timer’, and attach the text to the camera.

Um, I’m working on my project and I can’t find the Timer section in Coblocks. Can someone please help me.


Thank you, it was very helpful

1 Like