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