How to Stop audio from playing (Play Sound at Location)

Here’s a more comprehensive answer for you.

First, select your trigger volume in the level. When you have something selected in the level, it allows you to reference it in the level BP and bring up special functions specific to it. With your trigger selected, right click in the level BP, and you can type in “end overlap” to get the function. This will trigger an event when your player leaves the volume.

Next, put your audio file in the level itself. For ease of access and reference, put it somewhere in your trigger volume. You can simply drag the audio file from the Content Browser into the level like you would any other asset.

Now that it’s in the level, select it and right click in the level BP. Select the option to create a reference for it. This is very useful for any assets that you’ll be managing from a level overhead. My sound here is called Whoosh_5. Beautiful, I know.

Now that the little reference variable is there, drag out the pin from it to access commands specific to its type. Type in “fade” to see the Fade In and Fade Out options.

Now setup Fade In to occur on Begin Overlap, and Fade Out to occur on End Overlap. Pay attention to the settings in these nodes. Fade In Duration will determine how long the fade in happens, so make sure you set it to something other than its default of 0. You also set to what volume it will fade in our out to (usually you will keep this at 1 for fade in and 0 for fade out if you are wanting the sound to actually start and stop), and set the start time for the fade in. For starting a sound, you’ll want to keep it at its default of 0.

My best advice though would be to play around! See what kind of options you get when referencing different assets and try stuff out. Have fun!

Let me know if you need any more info!

2 Likes