Remove ads button

Hi all!

I would like to ad a remove ads button in my game but how do i create one?
I never used an in app purchase before so i need some help on this one.

Kind regards
Evert

Comments

  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291

    Hey @evert,

    It's fairly simple to do. There are different ways you could go about doing this. All depends on how the ads are set up in your game. Create a boolean called ad's purchased. If you have a display ads actor then what you could do is have a button and when it is purchased to remove ads, change the ad's purchased to true then in the display ads actor destroy the display ads actor when the boolean ads purchased is true and remember to save it.

    Another thing you could do is almost the same thing as above but lets say you have your display ads rules in an actor you don't want to destroy then you could do this. Create a boolean called ad's purchased. When the purchase button is pressed and the purchase occurs, change the boolean ads purchased to true. In the actor where you have the display ads rules, have it say, when boolean purchase ads is false, show ads.

    For the boolean purchase ads, I would have that in a table and when the purchase occurs change the table cell value and save the table!

    Hope that helps!!!

  • evertevert Member Posts: 266
    edited December 2014

    @killerpenguinstudios So if i'm right it should be something like this?

    edit: i forgot to put in what if its true, i would put in if true timer 20sec change scene to ads and enable ads off

  • pilotjoepilotjoe Member, PRO Posts: 31

    This is good stuff.. I was wondering this exact thing. Looks simple enough. You would then also need to make sure there is a Restore Purchases button as well (needed for iTunes).

    I would imagine this involves a call to iTunes to determine if the IAP to remove ads has been purchased and if so set the attribute to true

Sign In or Register to comment.