iAP Increase Lives Question

Games4lifeGames4life Member, PRO Posts: 279
edited August 2016 in Working with GS (Mac)


I am quite confused on how to create an iAP where if you can buy more lives. What I mean by that is choose to buy either 4 lives or 5 lives. You automatically start the game with 3 lives but I want to make it where the user can buy to start with 4 or 5 lives instead. Again, I dont want them to just buy one life I want the 4 lives to stay permanent.
Thanks,
~G4L

Comments

  • Games4lifeGames4life Member, PRO Posts: 279

    Anyone?

  • ArmellineArmelline Member, PRO Posts: 5,332

    You presumably have a game attribute called game.Lives or something, that you reset to 3 at the start of every game. The best way to go about this depends on your exact logic, but I'd probably have a second attribute called game.ExtraLives or something. When the IAP you've got above is purchased, game.ExtraLives is set to 1 or 2 and saved. Then every time you reset the lives for a new game, reset it to 3+game.ExtraLives.

  • Games4lifeGames4life Member, PRO Posts: 279

    @Armelline said:
    You presumably have a game attribute called game.Lives or something, that you reset to 3 at the start of every game. The best way to go about this depends on your exact logic, but I'd probably have a second attribute called game.ExtraLives or something. When the IAP you've got above is purchased, game.ExtraLives is set to 1 or 2 and saved. Then every time you reset the lives for a new game, reset it to 3+game.ExtraLives.

    Thanks I'll try that!
    ~G4L

Sign In or Register to comment.