Timer Variable in Multiple Scenes

My 7th grade students want to do this: Create a countdown/timer for Scene 1, but when/if they go to Scene 2, it is still continuing. It doesn’t start all over. Please help! Anyone?

Hi @Kelly_Nickell,

Currently this is only possible with scripting. Below you find a remix-able example on how it’s done :slight_smile:

Would you and your students be interested in this functionality for CoBlocks, too?

1 Like

Hi Stefan
I found a topic on the Cospaces forum about having a variable for a game timer continue across multiple scenes. You had replied in 2019 with an example of the code done in script. At the moment the Cospace you provided (Countdown example) can’t be opened anymore. Any chance you could help me with this? My students are using CoBlocks, but some of the clever cookies would like to make it work and can’t code in script.

All the best

Mary

Hi Mary,

Here is an example, that is using CoBlocks, of a timer that ticks in multiple scenes.
The secret is to create a CoSpace property (e.g. named memory) that stores the time variable in multiple scenes. To count down set the variable time to e.g.100
The code in the first scene looks something like this:


Good luck to your students!
pavlina

1 Like

Hi Pavlina
Thanks so much! That’s genius. I really appreciate you taking the time.
All the best
Mary