Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Adding 1 score to another

JaystaJaysta Posts: 18Member
edited August 2012 in Working with GS (Mac)
Hi guys,

I am having a little trouble adding the bonus score to the main score.

Say I have 500 points then I enter bonus stage and score 200 points, after 60 sec, I have a scene that interpolates the bonus round score but I just can't get the bonus score to add to the main score.

I have tried creating a temp bonus score attribute, then sending the the bonus score to that, to then add to main score but not working.

Maybe its easy but I cant find a way to add them. Thanks in advance for any tips.



  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,914Member
    edited August 2012
    Adding scores is simple math so each should be stored as separate game level attributes. So when the bonus round is over and before you change the scene have a change attribute game.score to game.score + game.bonus then change scene. Make sure the attributes are the same type your adding. You can't add an index and a real attribute so make them both the same. It would be best to post the code so we can see where you are going wrong.
  • JaystaJaysta Posts: 18Member
    Thanks, that was what I needed to add the + symbol, thought it might be an easy fix I didn't know about.

This discussion has been closed.