How do I create an in game, disable ads button?

Get help using Construct 2

Post » Tue Mar 10, 2015 11:26 am

I wanted to create an IAP that would turn off ads and have been trying to think about how to do this properly. There is no option with AdMob to disable ads, I can only hide one that is already showing.

My current solution is to attach the AdMob code to a Global Variable. I placed the AdMob code under the variable 0 and anything else (1) has no AdMob code. When the user clicks the purchase button, it will set the GV to 1 and hide any current ads being shown. Am I on the right track or is there a better way to do this?

Thanks!
B
6
S
1
Posts: 71
Reputation: 548

Post » Tue Mar 10, 2015 1:54 pm

You can stuff all your advertising events in a group.

When purchase done, disable the group.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Tue Mar 10, 2015 2:25 pm

@Shack You are on the right track. Just ensure that everytime you start you app and the Store, fetch the IAP Purchased status using "Has Purchase ("You Product Name"), Then set your Global Variable to 0 or 1.

I am using the same method in my game. And It works well.

You can checkout my game from the below link!
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
57
S
11
G
2
Posts: 412
Reputation: 5,204

Post » Mon Mar 16, 2015 9:16 pm

lennaert wrote:You can stuff all your advertising events in a group.

When purchase done, disable the group.


Thanks! I didn't know I could disable an entire group, I will check that later today.
B
6
S
1
Posts: 71
Reputation: 548


Return to How do I....?

Who is online

Users browsing this forum: eochranek, Exabot [Bot], Nicolas951 and 23 guests