How to toggle sound on and off with the same triggerbox?

I´ve tried to solve this for some time now and most of the answers here is close but not quite there… :slight_smile:
What I want to do is: when I enter a triggerbox, start a sound and when I enter the same triggerbox stop the same sound. (it´s for a soundpanel in a car, so the normal OnActorBegin- and OnActorEnd wont work, because I want the sound to be active until i press the triggerbox again.

Many thanks in advance
PaLa

Use a flip flop node on the begin overlap event. The first time you touch it will goes down the flip flop A execution path which starts the looping sound, next time you touch it will go down the flip flop B execution path to turn the sound off. It will keep flipping between A and B.

Thanks a lot for a quick answer, this worked so well :slight_smile:

Many thanks for this
//Patrik

No problem. Im glad I was able to help. Could you please mark my solution as correct so that others with a simular problem can easily find the solution? Thanks :slight_smile:

What node are you using to get the sound to play? I’m not using a trigger box, but an input action event to trigger the playing of a sound. Instead of playing and then stopping the sound upon pressing of the input button, it plays the sound, but when I press the button again, it does not stop playing the sound but does not start another sound either. The third time I press the button it plays the sound again, but on top of the sound that was called the first time I pressed the button, effectively doubling it.

Hi, Sorry for the late answer.
Here you can see how I implemented. I was using a triggerbox, trigged by the VR motioncontroller, and then i used the Flip-flop to toggle between play and stop. It worked really well. It shouldn´t be that hard to change to press an input button instead of the triggerbox.

How do you make the target - audio component and target - static mesh component variable?