Issues w/ Keeping Score

Lydian

  • Posts: 12
Hey guys. The answer to this may be super obvious, but my googling and forum-searching hasn't helped so far...

I'm developing a simple game where you survive in a hostile environment as long as you can, and you get points for avoiding enemies and collecting power ups. I have all these points collected under a numerical attribute called Score. 

When the player dies, the game switches to a new scene where said Score is supposed to be displayed, but every time I test it, the score is 0. I've tested drawing the score text in-game, and that's definitely working, so the problem is transferring the Score amount from scene to scene.  How do I do this?

porkwaffle

  • Posts: 10
Are you using a Game Attribute for the score?
Asteroid Survival - FREE


   Android
   Amazon

Lydian

  • Posts: 12
...Ah. Yes, okay, I now see the problem. See, I knew it'd be obvious! Thanks for pointing me in the right direction. :)

porkwaffle

  • Posts: 10
Awesome, glad you were able to figure it out :)
Asteroid Survival - FREE


   Android
   Amazon