I am looking out for some advice on maintaining player scores in my game.
My game has multiple levels and allows player to repeat a given level multiple times. At each level player can get some score and coins which will be added to the global score and global coincount if the player completes the level successfully. The cumulative score and coin count will be available as baseline for the next level.
I am using another variable LevelAttempt that is incremented every time a level is completed. I would like to know how I can use it to track attempts for multiple levels. Will it work if I use LevelAttempt as scene variable like below? Will there be a conflict if I use the same variable name in all the scenes? How can I store/retrieve the multiple values for multiple levels?
Level 1
LevelAttempt = 1; Level Score = 300
LevelAttempt = 2; Level Score = 250
Level 2
:
:
LevelAttempt = 5; Level Score = 2300