Please help me with this problem

When my player dies, I pause the scene and change it to the game over scene. I can press a respawn button, which will show me a video ad and then return to my game. Everything works fine except when I respawn I want to play a respawn sound. This respawn sound doesn’t work. The problem is the respawn sound doesn’t work only when I watch an ad. If I can the code to not watch the ad and directly take me back to the game, the respawn sound works fine. what I’m doing wrong?



In another scene, in scene property, uncheck stop music and sound on startup

1 Like

I did that for all the scenes. I don’t think thats the problem. The sound is not playing only when I implement it with ads.

don’t play sound using variable
play sound directly

I did that the first time itself. The sound didn’t play. so I changed it with variables. But same problem.

have you tried checking it on mobile platform

I don’t think ads show on pc or mac or linux
only on android and ios

Yes. I’m checking it with my android phone. When I press respawn button, the test video ad plays and after it finishes, it changes to the game scene. The only problem is that the repspawn sound doesn’t play.

I’m guessing it’s because you’re changing scenes straight after playing the respawn sound, and don’t give the sound time to play out?

I’m guessing it’s because you’re changing scenes straight after playing the respawn sound, and don’t give the sound time to play out?

Try adding at the beginning of the scene condition with the global variable respawnsound = 1

A global variable may help too.

In the first screen make Global Variable Respawn = 0

For the sound play condition if Global Variable Respawn =/= 0

After showing the ad, make Global Variable Respawn = 1 then you go back to to the game scene.

This way the respawn sound plays in the same scene you have the game.

at first, change the variable and change the scene
Just like @MrMen said