Is there a tutorial on how to do an In-Game store, with in game money. Not IAP for more coins, stars

fishZombiefishZombie Member, PRO Posts: 46
edited April 2012 in Working with GS (Mac)
I want to have the player earn ... stars.. and then use those to buy better gear, and upgrades. I'm not looking to ask the player to pay real money... yet.
I know how to keep a highscore, but say... a new boat, and then a better cannon for that boat, is a lot of variables. i was thinking tables was the way to go, but I'd like to see how others did it first, before I code in 50 buyable items individual stats.

Answers

  • fishZombiefishZombie Member, PRO Posts: 46
    Also, there is the task (at the moment) of creating 50 booleans in the game-level that just say boat1(true/false), boat2(true/false),gun1(true/false), etc, etc. It's too bad we can't create folders in the attributes menu to clean out some of that fluff.
  • MantoManto Member Posts: 796
    edited April 2012
    Could you use integer? For example integer boat would be the number of boat unlocked.
  • PsychoticStudiosPsychoticStudios Member Posts: 101
    edited April 2012
    What I would do is have an integer attribute called money and every time the player touches a star add 10 then if a player wants to buy something subtract the amount the item costs from the money attribute. You will want to save the money attribute and create a boolean attribute for each unlock to tell the game which unlocks they have. You will want to save those attributes too. So it's basically what you didn't want to to do. There is another way to unlock things without having an attribute for each unlock but the player would have to unlock things in a certain order. If you don't mind that here's a video explaining that way.

  • fishZombiefishZombie Member, PRO Posts: 46
    damn... there goes my carpal tunnel
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    The best way to do this I to use Tables and booleans.
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    Create a Boolean for every store item you have. Then store all the info about the item (name, price etc.) in the Table. Use the booleans to keep track of what they bought and use the save function to make sure they don't loose their purchased items. Use the table to populate the Store.
Sign In or Register to comment.