Problem with saving attribute. Can you use it to have a overall score?
Hello everyone.
I am going through a small issue. I am trying to save a score from a level and add it to a overall score for the whole game. Is that possible to do? If so how could I do this. I have multiple levels and I want them all to add what ever score they get out of the game to one big score. Thanks!
I am going through a small issue. I am trying to save a score from a level and add it to a overall score for the whole game. Is that possible to do? If so how could I do this. I have multiple levels and I want them all to add what ever score they get out of the game to one big score. Thanks!
Best Answers
-
patapple Posts: 873
I think you have an unique score for every level, right? So you need another attribute "the big score" for example and every end level you need to add your score to the big score. The big score will never set to 0.
Hope that help -
GLGAMES SingaporePosts: 988
For e.g have attributes Level Score which changes in every level & Final Score which totals all levels scores.
Simply have a condition when level ends / completed, change Final Score to Level Score + Final Score. Then remember to save attribute Final Score before changing to next scene or level. So in the new scene or level load Final Score from your saved attribute. thus after every level it will add you current Level Score to the totalled Final Score.
Answers