Stopping a audio track after a button release.

Hello, I have a widget blueprint that plays audio when it has been opened. I want to be able to stop the audio when I click a button, Im using a Spawn Sound 2D to play the audio. I have been trying to figure out how to do this but i cant?

Thanks,
Quin.

Hi @quineldd !

I’d be glad to help.

To better provide assistance, Would you mind sharing a screenshot of your widget’s BP?

Spawn Sound 2D will essentially create an audio component containing a given audio object and auto-play it. Spawning a sound this way will return an audio component you can then use to stop the audio as you desire:

Remember you’ll want to target the specific component or event instance you spawned before attempting to manipulate the sound. You could store the Return Value of the Spawn Sound 2D node as a variable, or simply use directly to stop the sound within the same event graph!

Here is a bit more information regarding the node you’re using to spawn the audio:

Please let me know if I may help further.

Kindly,
Eric