I have ran into a mild problem with ambient sounds due to the fact that I have one set of sounds playing where they are not suppose to (jungle noises in a cave, cave noises in the jungle, etc.) What I would like to propose is a "Local" Type for the $ambient definition in SNDINFO.
How it would work is that it would play the sound at world volume but only within a sector who's lines are set to be zone boundaries (using the same boundaries that REVERBS currently uses) (much like REVERBS but for ambientsounds). This would resolve my problem and benefit everyone else in the process.
how about adding a "Local" type to $ambient [SNDINFO]
Moderator: GZDoom Developers
- FireSeraphim
- Posts: 408
- Joined: Thu Nov 18, 2010 12:45 am
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: how about adding a "Local" type to $ambient [SNDINFO]
Adding this as an engine feature is not trivial, in particular since you try to hijack some info that's there for completely other things.
What you can do is use Thing_Activate/Thing_Deactivate to toggle these sounds when you don't want them to play.
What you can do is use Thing_Activate/Thing_Deactivate to toggle these sounds when you don't want them to play.
Re: how about adding a "Local" type to $ambient [SNDINFO]
Can these activations and deactivations be made locally in multiplayer, so that a player entering the cave would not disable the jungle sounds for the player who remains outside?
A better approach might be to use positioned ambient sound sources. Place jungle sound sources in the jungle and cave sound sources in the cave. ZDoom offers many ways in which [wiki]ambient sounds[/wiki] can be created; so if an approach doesn't work, try another.
A better approach might be to use positioned ambient sound sources. Place jungle sound sources in the jungle and cave sound sources in the cave. ZDoom offers many ways in which [wiki]ambient sounds[/wiki] can be created; so if an approach doesn't work, try another.
- NeuralStunner
-

- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: how about adding a "Local" type to $ambient [SNDINFO]
I think the main issue with positioned sounds is volume variance. Typically ambient sounds would be full volume anywhere in the area.
On that note, you could use SndInfo to give each ambient sound a large no-falloff range, then place your sound things inside the map areas where they should be heard. Not the most elegant method, but the alternative would probably be something involving [wiki]LocalAmbientSound[/wiki] and "[wiki=Classes:SecActEnter]Actor Enters Sector[/wiki]" things.
On that note, you could use SndInfo to give each ambient sound a large no-falloff range, then place your sound things inside the map areas where they should be heard. Not the most elegant method, but the alternative would probably be something involving [wiki]LocalAmbientSound[/wiki] and "[wiki=Classes:SecActEnter]Actor Enters Sector[/wiki]" things.
Re: how about adding a "Local" type to $ambient [SNDINFO]
Give the AmbientSound things identical values for arg2 and arg3. There you go, full volume throughout the area where they're heard.
Though to be honest, having sound rolloff is good too. Like, at the entrance of the cave, you still hear jungle sounds, but they get fainter as you venture forward, and the cave sounds become louder instead.
Though to be honest, having sound rolloff is good too. Like, at the entrance of the cave, you still hear jungle sounds, but they get fainter as you venture forward, and the cave sounds become louder instead.
