Download

Toggling Audio On and Off with Blueprints

Hi all,

I was wondering if anyone could offer guidance on toggling audio on and off with blueprints.

I have buttons in my level and I already have logic in my game that changes the button mesh when the player aims at the button within range. I’d like for a sound to play when the player clicks while hovering the cursor over this button, and that only stop when the player clicks on this button again. Multiple sounds playing at once is intended, but only if they are different sounds/buttons (each button plays one distinct sound - and there are something like ~15+ buttons in all, so hard coding each one into a separate blueprint isn’t ideal).

I’ve tried all kinds of things - flip flops, gates, child blueprints - and am really tearing my hair out with this one.

Any help or guidance would be majorly appreciated.