IAP non-consumable question: What if the user does not wish to purchase after all?
Hello -
It's been a long day, so please bear with me.
Concerning a non-consumable IAP, what should be the code if the player does not want to purchase after tapping on the purchase actor (not the yes button)?
I have an actor which must be tapped to invoke the purchase option. Code is:
Rule: If Actor touch is pressed and AdsRemoved = false then
Behavior 1: In-App Purchase Buy Item - Product ID Remove_Ads
Behavior 2: Change Attribute AdsRemoved = true
Behavior 3: Change Table Value IAP Table,1,2 to 1
Behavior 4: Save Table
That's all nice, but what if the player says, "nope, $0.99 is too much"?
Thanks, regards.
Best Answers
-
Armelline Posts: 5,368
You don't assign them the IAP until the purchase is confirmed - the fifth column of the PurchaseTable turns to "purchased". When that happens, you assign the IAP to the player. Once you've confirmed they've been given it, you consume the purchase. This turns the fifth column to "unpurchased" again. If they hit cancel, it is immediately changed to "unpurchased" and you need to give them nothing.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
-
Armelline Posts: 5,368
@mhedges said:
Armeline, thanks for the response. So the questions beg:
1. Do I make reference to the PurchaseTable and forget about the IAP Table I created?Most people make use of both. If you just rely on the PurchaseTable, it needs to be filled every time the app launches, rather than just went the player goes to the IAP screen/tries to buy something. The PurchaseTable will tell you the state of current purchases, but you should record when things are bought in your own table.
- Do I the destroy or obscure the actor if TableCellValue(PurchaseTable,1,5)="purchased"?
Sorry, I misread your original post as "consumable" not "non-consumable". Ignore everything I said about "consuming" purchases.
I recommend you hide the actor or show it as disabled when either ="purchased" or when your own record of their purchase is "true".
Check out my free tutorial template: http://gshelper.com/shop/free-templates-and-tutorials/armellines-in-app-purchase-tutorial-template/
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Answers
@Armeline, thanks for the response. So the questions beg:
1. Do I make reference to the PurchaseTable and forget about the IAP Table I created?
2. Do I the destroy or obscure the actor if TableCellValue(PurchaseTable,1,5)="purchased"?
Thanks again, regards.
My Blog / App Store / Google Play
@Armelline, I looked at the template and observed the behaviors. I do have another question, but from the itunesconnect side (related or not, depending on your reply) - for the behaviors to work correctly, do I have to "Host Content with Apple" or not? If I select it, then itunesconnect is waiting for some upload from me. Related?
My Blog / App Store / Google Play
You do not host any content with apple.
Mental Donkey Games
Website - Facebook - Twitter