I’m trying to create a timer to track the time for the whole game. Game is a simple platformer and the character goes from scene to scene at the finish each level (level = scene)
I can get the timer to work for each scene but I want the timer to work for the whole game, not just on the one scene, so that the whole play time is tracked on the timer. What I have so far will start a timer (Timer = “Timer”) add the time to a global variable (“Elapsed_Timer”) and then display the current value of the global variable. The problem is that it is constantly adding the timer value to the global variable inflating the global variable value exponentially.
I don’t understand why you’ve blanked out some of the events or objects. It makes it difficult what’s going on - like in the first event, are you changing scene or doing something else?
Anyway, part of the issue is in that last event, where you constantly add the TimerElapsedTime() to the global variable Elapsed_time. You should only be doing it once.
Thanks for suggestions! @MrMen comment was what sorted it out. I set the timer “timer” to reset at the end of the command so that it doesn’t constantly added exponentially to the global variable. I tested and it works.