GameSalad

Howdy, Stranger!

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

Does anyone know how to make consumable IAPs?

loganjan22loganjan22 Posts: 30Member, PRO

Hi, I am having so much trouble with the consumables. I get the buy screen to show up on my phone and the purchase works out ok but it seems that it doesn't restart the table to make it consumable and keeps giving the player unlimited amounts. Any suggestions?

Comments

  • RowdyPantsRowdyPants Posts: 427Member, PRO

    @loganjan22 How are you setting the amount of resource/items the player gets? Are you adding x consumable amount to a current saved variable or table cell value or another way?

  • loganjan22loganjan22 Posts: 30Member, PRO

    @RowdyPants I just have it so when the table 1,5 is purchased that it changes attribute game.coins to game.coins + 50 and then save that attribute. The problem that I have is that it doesn’t seem to change the table back to unpurchased because when a player goes back into the shop it grants them another 50 coins for free. I thought that it automatically turns the table back to unpurchased.

  • ArmellineArmelline Posts: 4,659Member, PRO
    edited December 1

    After giving the user the coins, you need to use the "In-app purchase - Consume" behaviour to tell Apple the coins have been given and then can set it back to "unpurchased." It can't be automatic as Apple don't know exactly how or when you're going to assign the coins to the player.

  • loganjan22loganjan22 Posts: 30Member, PRO

    Thank you for the help @Armelline and @RowdyPants I was doing both of the behaviors of buy item and consume item at the same time. It works now:)

  • ArmellineArmelline Posts: 4,659Member, PRO

    Great, glad you got it worked out!

Sign In or Register to comment.