Creating Sound for games?

So I’m trying to add some music (and sound effects) to my game that I’m working on right now, but I’m running into a weird issue. I’ve already figured out how to do the whole “falloff” thing, where there’s a giant sphere that you have to be inside of to hear the music. I am having a few issues with this:

  1. I don’t want the “music” sound things to fall off. I want there to be a big one for outside, which I have set up, and a different song play when you enter the crypt. Right now, because of how the 3D sound works, it sounds like the music is coming from a VERY specific point in a temple. I want it to have no falloff until just the VERY edge of the sphere, and I don’t want it to be stereo. I just want it to play in the background.

  2. The sound won’t play unless I begin play INSIDE one of the spheres. If I walk into the crypt, the music from outside stops, but the music inside does not begin playing. Then, if I walk back into the other 3D sound sphere, it does not begin playing again, and there is no sound (except for when the gun fires). This also makes it so that I cannot make the torches on the walls have a fire crackle sound. I looked into the sound cue blueprints, but I could not figure out how to use them, even when looking at the Unreal Documentation.

Hi Ethandale!

It sounds like what you need is actually just to trigger 2D playback.

Instead of dragging a sound into the level, I would look at just using Trigger volumes to trigger Playing and Stopping 2D Sounds.

Alright, I started working on something for it…now when I enter the crypt, the music begins playing. However, is there a way that I can have it stop playing once I leave? As in a Stop 2D sound or something? Right now, if I leave the crypt, it continues playing…and then walking back in makes a second track start playing over top of the initial! I want the sort of “fade in, fade out” feel that AAA games have when you get to a certain area…like the Dragon words in Skyrim, for example. Walking towards them makes the sound louder and louder, but once you leave the area, it just fades out.

Also, the 2D sound thing is great, but it still doesn’t help with the fact that the torches don’t make any sound unless I’m standing inside the sphere.

re: Torches: You will want to have the torch sound “looping.” Otherwise the Engine will think it’s a sound that is playing outside of the listener’s hearing range and it will not play it as an optimization.

Play and Stop functions must be executed via the Audio Component, so you need to refer to the Audio Component of your playing sound in order to tell it to Play or Stop. If you’re creating an Audio Component from BP, you use Spawn Sound and save your Audio Component reference, so you can tell it to stop later.

If you want a sound to relate to world space, then it needs to be a 3D sound. Spatializing the sound means it pans (or similar), Attenuating the sound means it gets quieter/louder. You will want Distance Attenuation in your Skyrim example.

Alright, I’ll give that a shot! Thank you so much! :slight_smile: