And here’s a very different approach that keeps the track of the time played throughout any number of levels.
You need the game instance and a single actor, called Next Level here (you will also need some levels, of course!)
The Game Instance:
- Event Init: starts the Game Timer that it will run throughout the game
- Start Level Timer: starts the timer for the current level (equal to the above if we’re in lvl1)
- Save Timer: saves the result of the above to a string array, adding the name of the current level
The Next Level actor has 3 roles:
- open the next level defined in the Next Level Name variable
- show the timers running in the Game Instance
- show the results of any previous time scores
This actor is placed in each level and has a trigger box:
From the top:
- create a reference to the GI and Start a timer for this level
- Tick prints the timers from the GI and then prints any old results
- entering the trigger box, tells the GI to Save the Timer and Open next level
And a quick demo: