Audio problem admob

Get help using Construct 2

Post » Fri Jan 23, 2015 8:12 am

hi,
my game is nearly finished but i've a problem with playing a sound...
when the player is outside the layout it plays a sound (works well) and add 1 to deathcount var.
when deathcount = 5 it shows an AdmobAds interstital (works well) and play the sound. BUT if i click on X to close the interstital the sound plays again and i dont know why. i tried nearly everything but nothing changed that behavior. the game is running on android and expoted with intel xdk

here the important setps:

player outside layout ---- player destroy
Call function "GameOver"
Audio Play "test"

- Function "GameOver" ---- do some stuff
System add 1 to deathcount
+ system deathcount = 5 ---- Set deathcount to 0
AdmobAds Show interstital


thanks
meta
B
5
Posts: 42
Reputation: 313

Post » Fri Jan 23, 2015 9:52 am

Hello friend, I have a different problem with audio when I export the project by Construct 2 R178 everything works ok as I did, but if I open the same file in capx Construct 2 R195 some audios not play when you start layout, this problem R195 is the version in my case.
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Fri Jan 23, 2015 10:32 am

ok i found a solution / workaround for my problem...
when the sound is still playing, not finished and a interstital pop up i think the sound / maybe the whole game pause. if you click the close button of the interstital, the sound start from beginning because it was not finished before the interstital was shown...

i added some steps to avoid this:

Audio on sound ended --- System Signal "sounddone"

in the gameover function:
system wait for signal "sounddone"

now all works fine.


meta
B
5
Posts: 42
Reputation: 313


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher and 2 guests