GameSalad

Howdy, Stranger!

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

iAP Increase Lives Question

Games4lifeGames4life Posts: 279Member, PRO
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 Posts: 279Member, PRO

    Anyone?

  • ArmellineArmelline Posts: 4,754Member, PRO

    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 Posts: 279Member, PRO

    @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.