Ejecta iAds

Get help using Construct 2

Post » Fri May 02, 2014 10:18 pm

Hi,

Does anyone know why when I click iAd banners when testing my app it also triggers other unrelated touch events?

I've searched high and low and can't resolve this annoying issue.

Any help much appreciated,

Thanks,
B
5
S
1
Posts: 10
Reputation: 345

Post » Fri May 02, 2014 10:51 pm

You may want to put some conditions in your code to make other touch events not work when the iAd is showing. For example set a variable called adShowing and then in your touch events add a condition that checks if it is true or false. Only allow other events to run if it is false. In the logic that shows the add add some extra events to set the variable to True when the add is shown, and false when it is closed.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Fri May 02, 2014 11:13 pm

Ahh makes sense I'm a noob I'll give it a try and let you know. Thanks.
B
5
S
1
Posts: 10
Reputation: 345

Post » Fri May 02, 2014 11:33 pm

Sorry thinking about it further I don't think this will work.

It's not when the ads are displayed. It's basically when a user initially clicks on the iad banner it triggers other touch events.

For example, I have an event which on game over if the user touches an object that gets created it restarts the game and the iad banner click will incorrectly trigger this.

Initially I thought it might be to do with the object overlapping the banner so I tried inverting the conditions and even resized the object neither of which worked. No matter where the object is on the screen if the iAd banner is clicked it will also trigger the game restart.
B
5
S
1
Posts: 10
Reputation: 345

Post » Sat May 03, 2014 3:28 am

What I describe will work perfectly for that. Create a global variable called bannerShowing. In the same bit of code that shows the banner, also set bannerShowing to true. In the event for touch to reset the level, add a condition that says bannerShowing = False. That way the only time that touch will restart the level is if the banner is not showing. Add an event when the banner is closed that sets the bannerShowing variable back to False.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Sat May 03, 2014 8:34 am

Hi,

Thanks for your help apologies if I'm being thick.

I still don't see how this will work as I still want the player to be able to restart the level while the ad banner is showing if they decide they don't want to click on the banner.
B
5
S
1
Posts: 10
Reputation: 345

Post » Sat May 03, 2014 8:43 am

@magpie
can you please upload a small screen shot showing:
- how iAd banner is showing up on the screen
- where is the object that restarts the game on screen

also

a screenshot that showing the actions you trigger restart the game

with this way we can be more helpful
Truth shall be your freedom...
B
14
S
2
G
1
Posts: 45
Reputation: 930

Post » Sat Jun 14, 2014 4:18 pm

Hi Magpie, BluePhaze and Aleq (and anyone else who could help!),
I am having somewhat of the opposite issue. I am trying to trigger a pause when the iAd banner is touched. Basically I cannot figure out how to trigger an event when the banner is touched (and a full page ad is displayed). I did create a touch area the size of the banner, however this would not work since the touch area (an probably everything) is below the ad banner (I believe).
My intention is to pause the game if a full page is open. Currently only testing with Apple's test ads.
I have also enabled the "Pause on unfocus" property, but this, I believe only works on browsers.
Thank you!
B
10
S
4
G
1
Posts: 17
Reputation: 1,348


Return to How do I....?

Who is online

Users browsing this forum: guannstar, odiusfly and 25 guests