Audio Does Not Pause on Toggle

Hi everyone, I apologize if this is an easy fix but I have been trying for probably 2 hours to solve this problem.

I put a toggle switch in my game to control audio.

It works as it should for my background audio (loop.mp3). By default, the toggle is off and so is the music. When I toggle on, it plays my background music. When I toggle back off, it turns the music off.

One of the the solutions I tried set a sound to a different channel and copy/pasted the actions.

For some reason though I am not getting the same result. The pop sound plays no matter what.

I essentially want the toggle switch to mute all sounds on channel 1 and 2.

I have tried many variations including creating sub events, putting audio on the same channel, changing the order of events but nothing has worked.

The attached screenshot is the most basic form of what I have been trying but again, I have moved the conditions/actions, trigger once conditions, tried while or & statements and nothing is working.

Any help is appreciated, thanks in advanced.

Do you want the pop sound to play at all, or just once when the mouse is over a Taps object? If it the latter, then trigger once on the first event should fix that.

1 Like

Thanks for your help!

Using your suggestion and some more reading through the documentation, I was able to add global volume settings which solved my problem.

Below is the solution.

  • Loop.mp3 repeats as the background music
  • Pop.aac only plays when taps are tapped
  • Toggling the switch changes the global volume to 0 or 100 either playing all sounds or muting them.

1 Like