Saving score for each level then taking that score to next level

Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

Hi everyone, Thor speaking. I have levels in my game in different scenes, and i when i complete the first level and i have a collision which goes to the next scene and you get a point with that collision, how would i transfer that score to the next scene?

Thankyou.

Thor.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You don't need to transfer it. You just need to make your score attribute a game attribute (e.g. game.score). Game attributes are global variables and do not reset from scene to scene.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang said:
    You don't need to transfer it. You just need to make your score attribute a game attribute (e.g. game.score). Game attributes are global variables and do not reset from scene to scene.

    Hi, sorry about that tatting, i had change attribute game.score to 0 on my scene thats why it wasn't working. Its working now, thanks.

    Thor.

Sign In or Register to comment.