Saving Coins

I have set it up so the player gets the coin and when it touches it, it adds a coin to the coin meter but the coin meter on the gameover screen says 0.

Can somebody please help me by giving me the attributes needed for making the coins to save and load after each game and when the user closes the app. This is an update version btw.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited March 2014

    We have this in some of our free templates, you basically need a game integer lets call it coincount and change this to +1 every time you collide with the coin...sounds like you have this bit sorted.

    Drag a save attribute in and chose a name for the key and point it to game.coincount and on your 1st scene load this using the same key and coincount integer.

    Darren.

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76
    edited March 2014

    @DeepBlueApps said:
    We have this in some of our free templates, you basically need a game integer lets call it coincount and change this to +1 every time you collide with the coin...sounds like you have this bit sorted.

    Drag a save attribute in and chose a name for the key and point it to game.coincount and on your 1st scene load this using the same key and coincount integer.

    Darren.

    Could you possibly link me to a template so i could compare the attributes?

    Thanks

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited March 2014

    Linking is not allowed but check out Santa go on DBA.

    It's pretty simple all you have to do is load the saved attribute at the start of your game and your good.

    If you have a few save and load attributes I would advise that you use a table.

    Darren.

  • MinecraftGeekMinecraftGeek Member, PRO Posts: 76

    DeepBlueApps got this working for me. The template he provided me is helpful.

Sign In or Register to comment.