saving money/gems in game

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
ok so iv got some money/gem attributes so when you collect gems in game it displays how much gems you got/ money you got when playing the level, but question is how can i save that? so youll see how much money you got on the main screen, lets say for example; you have $0, then you play a level and earn $5 in that level, then you die or something, but then your coins are saved on the main menu, so you now have $5 coins, now you go back and play again, you earn $1 then die, you go back the main menu and you now have $6, please help thanks!

Comments

  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Save the attribute ;) But remember that you have to load it then again.
    I would create a new attribute that is only for the money collected. Save and load this one. Check out the tutorials.

    Alex
  • HC_DKHC_DK Member Posts: 92
    Do as @AIGames says, make two different attributes for each like Money and Ingame Money and Gems and Ingame Gems. In your levels you add Money and Gems to the Ingame attribute and in the Game Over / Level Completed scene you add the Ingame Money attribute to the Money attribute and then save the Money attribute (using the SAVE behaviour). The same goes for Gems :-)
    In your main scene have an actor where you LOAD the Money and Gems attribute.

    HC
Sign In or Register to comment.