Stop Audio File on Trigger

Noob question but I’m having a brain fart and can’t actually find any results newer than several years ago: I have a looping audio file that triggers on a button press but I also want the audio file to stop when I press the same button again.

Dragging the sound actor into the event graph doesn’t work so I can’t get a reference to it that way.

1 Like

Are you using the level BP here? Then after clicking the actor in the map, just right click in the level script, and a reference will be at the top of the list :slight_smile:

No I am using a regular BP. The sound nodes are in the middle, but I am not sure a 2d sound play is the way to go here since it isn’t referenceable in the way that i need it to be.

1 Like

Ah, try spawn sound at location, then you get a reference you can use…

1 Like

Ah, I was clearly having a brain fart. I just put the Spawn Sound at Location node in the true branch, put a stop node in the false branch, and then plugged the return value of the SSaL node into the stop node and it seems to work fine. Thanks.

1 Like