Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
pickle965

Blocking Ambient Sounds

Recommended Posts

Is it possible to block ambient sounds from coming through walls? I tried giving all the lines in the sector block sound flags, but that didn't work. What am I missing here?

Share this post


Link to post

The block sounds flag just stops monsters hearing you, or rather the noises you make (weapons etc). It doesn't prevent sounds reaching you.

All I can suggest is making the sounds quieter, or activating/deactivating the sound object as you get closer/further away.

Share this post


Link to post
pickle965 said:

Is it possible to block ambient sounds from coming through walls? I tried giving all the lines in the sector block sound flags, but that didn't work. What am I missing here?


(hehehehe....I wondered when someone would ask this, after spotting this problem in Dark 7. I already thought of the solution, of course)

There is a way to do it, but it's complex to set up, especially if you have tons of sounds like I have. Use Thing_Activate and Thing_Deactivate to turn the sound things on and off when you enter/leave the room in question. I use this setup in all of my ZDoom project maps, and it works every time.

Share this post


Link to post

Ambient sounds have no source (or NULL), which means it can be heard anywhere in the level, no matter how many sound blocking lines you may have. A good way to get around this is to use the ThingSound script instead of AmbientSound, but you'll need a mapspot for where the sound would come from. I think this way is more realistic. For instance, you have a giant map, with a small swamp area and the rest is inside a large building. If you use AmbientSound, you'll have loud swamp sounds even when you're deep inside. Also, I haven't tested it, but sound blocking lines just might work in blocking out sounds that come from an actual source.

Share this post


Link to post
pickle965 said:

Is it possible to block ambient sounds from coming through walls? I tried giving all the lines in the sector block sound flags, but that didn't work. What am I missing here?


What? Are you using the sndinfo lump incorrectly or something?

$AMBIENT 1 amb1 SURROUND continuous 0.7

If you change SURROUND to POINT, then that last number (0.7) controls how far away it can be heard (0.0 to 1.0)

Do I have the entire situation wrong?

Share this post


Link to post
Epyo said:

If you change SURROUND to POINT, then that last number (0.7) controls how far away it can be heard (0.0 to 1.0)



I believe the number 0.0 to 1.0 is volume, check it out on the ZDoom site.

I have no scripting capabilities what so ever, and do not plan on learning script at the moment. The thing activation/deactivation, although crude, seems to work OK.

Share this post


Link to post
Epyo said:

What? Are you using the sndinfo lump incorrectly or something?

$AMBIENT 1 amb1 SURROUND continuous 0.7

If you change SURROUND to POINT, then that last number (0.7) controls how far away it can be heard (0.0 to 1.0)

Do I have the entire situation wrong?


Unfortunately that doesn't help in this situation, as that number controls the volume, and in any case the point sounds still have a huge radius (something like 1024 units), and if you quieten them right down, they'll be barely audible. Which is no good for most sounds, as they usually need to be loud. To confine them to a room or passage, the only way is to activate/deactivate them when you enter/leave.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×