Help with IAP please..
Village Idiot
Member, PRO Posts: 486
Hi.. I'm trying to work out IAP and I'm struggling here. I've been going over The Gurus' and Armeline's video tutorials and hopefully will get this done.
I'm trying to make an 'Ads off' IAP. The way I understand it so far is that I should have a button that says 'Ads off' on the opening/menu scene. If the player pushes it, then it takes them to another scene where they can push a 'buy' button.
At the moment I'm still trying to get all of this to happen – but it leaves me wondering, should I have some sort of change seen behaviour built in there somewhere to take them back to the opening/menu scene? I'd appreciate any insights here.
Comments
it doesn't need another screen.
Remove Ads is enough can even be an icon only. I also though you have to show atleast the price but I see the majority of ketchapp games not doing that.
The Second scene is tough useful for us game salad people because you wanna load in the App Store data first. So in order to have a repetitive update of that data before the purchase the second screen makes sense.
And regarding you question to bring them back after purchase hmm.
I always do an update of the buy button and the text near it.
Like instead of "buy" it changes to Thank you! in case the object was successfully bought.
PS: You should buy one of my in-app for research purpose. Best go for the most expensive one
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
In my game I'm using the same scene for the "remove ads" IAP, so when the player clicks on the button the itunes login prompt will appear.
You can probably assume that if they are clicking your "ads off" button that they plan on buying it, and they will have to confirm the purchase anyways after logging in, so not sure if a second scene is really necessary.
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
Ha, ha hah! No wonder you get so many downloads.
Hey guys, buy one of my games... learn what not to do.
Thanks @BigDave – maybe I'll take your advice and buy something in your game (though I might be a bit tight and maybe buy/donate a small amount as my vast global financial resources are rather stretched at the moment).
So assuming the player clicks the remove ads button – and once the process has taken place... what happens next? Does Apple take the player back to the start of the game again once the purchase has been made? I didn't see anything in the code shown in the videos that suggested that would happen.
And thanks @supafly129 for your feedback too. What do you guys think of the Gurus' videos on the subject? Is that how you learned how to do this? I'm finding it hard to work out where and how this works within my game. The videos (including Armellines') don't seem to demonstrate it being implemented within an actual game. Well at least not to me.. I'm not the brightest .
anyone?
What I did in my last game is , i had a game level boolean atrribute game.removeads set to false.
Change scene behavior rule
if game.removeads is false change scene with ads(( otherwise change scene without ads))
After the player purchase , i check if table cell vaue is "purchased" change attribute game.removeads to true and i save it to a table (Guru's method) so it loads everytime the game starts.
Works great , and you can always test flight before publishing to check if something is wrong.
Thanks @Icebox – I appreciate your help.. I'm going over the Guru's method at the moment (for about the 5th time).. I seem to be having a conceptual glitch here. How does the game resume once purchase is made though? There doesn't seem to be a change seen back to the game..
I don't remember to be honest but I think the game just resumes , This is exactly how i did it.
First I create a table with 1 boolean i call it Table_AdsOff or anything
I also create adsoff boolean game attribute as i mentioned earlier
On my menu scene I have a button
Remove ads $.99 button if you touch it it changes the scene to iap scene
In my iap scene i have 3 buttons
Remove ad button
Restore button
and back button
if you touch the remove ad button a screen pops up " do you want to purchase " once its done the game resumes you just click back and it will change scene to main scene , i can for example add a rule that says thank you but I didn't do it .
Here is the remove ads button rules
I change the attribute adsoff to true and i change table_AdsOFF boolean value to true and save it
then i have an actor at the first scene of the game with this behavior.
The table is just there to make sure everything is saved , you can do it with save and load but just to be on the safe side i did it this way , I think its guru's method he explains it more. Hope this made sense
Thanks again @Icebox .. It looks like the Guru's method. I suppose it goes back to the menu scene once the purchase takes place. I'm thinking that this is being done from the app store end. I'll just have to follow through with the videos and see how it goes. It seems like the only way to find out is to actually publish it – I'm thinking at the Ad hoc level, to find out if it works.
@Icebox .. I've just been fiddling around with my buy button and looking at the screen grabs you put up (thanks for the effort – it helps a lot).. and I noticed that you named your table "table_Ads" – is that because you made this before GS embedded a table called "purchase table"?
No I made table_ads for saving purposes only. You can use different methods to save
Here is 1 method
if tablecellvalue(1,1,5) is "purchased"
change attribute game.adsoff to true
save attribute game.adsoff key "123"
and at the first scene load attribute key "123"
2nd method
if tablecellvalue(1,1,5) is "purchased"
change attribute game.adsoff to true
change table value table_ads ( the new table i created) row 1 column 1 to "true"
save table .
So no need to use save and load attribute behaviors , its just to make sure everything is saved and load right.
3rd method
create a table with 1 row 1 column , integer set to 0, lets call it TB_AAA
if tablecellvalue(1,1,5) is "purchased"
change table value TB_AAA row 1 column 1 to 1
save table TB_AAA
in your change scene have a condition that says
if numericexpression tablecellvalue(TB_AAA,1,1) = 1
change scene without ads
otherwise
change scene with ads
I don't know how to explain it better sorry! you have to test and see you will figure it out, its easy and the tutorials are enough.
Thanks @Icebox .. you've given me plenty to think about. I'm not the brightest, but I'll persist. You've given me plenty to help me get through this.. thanks again!
@Icebox Thanks for helping out @monkeyboy simian and your examples. It helped me understand this better. I've been meaning to add some in App purchases to a new game but shied away from trying it. I'll give it a go now.
@Icebox How did you do the restore button?
When touch is Pressed > In App Purchase - Restore Items?