Hi! With my students we are working on Escape Room game, but one of the teams wants to add a timer to the game, so when the time finish the game is over. Is that possible? My concern is because they have different scenes that the player will navegate throughout the game.
Thanks for all your help!!!
I follow your question maybe @techleapnz or @Alessio_Bonini can help you
Hi @Rocio_Rugamas, thanks @astrid_hulsebosch for the tag. You need to use a cospaces property instead of a variable (to do this you need to have access to advanced coblocks), they are essentially variables that are valid in every scene and not just the one in which they are initialized. Here is a basic code example for the timer:
Remember to only run the CREATION COBLOCK once (or it will restore the proprerty to the initial value) so don’t make it possible to restart the scene with this coblock (I recommend initializing it in an opening scene and not in a game scene). Let me know if you have any other doubts, I’m always happy to come back here on cospaces to lend a hand.