0 Favourites

Audio problem admob

  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
203 18,503
Lumicreative's avatar
Lumicreative
Unread hot topic
115 23,723
justifun's avatar
justifun
Unread hot topic
107 19,600
BluePhaze's avatar
BluePhaze