Ambient sounds which don't travel through portals

Moderator: GZDoom Developers

Post Reply
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Ambient sounds which don't travel through portals

Post by Fishytza »

Admittedly, this is gonna sound rather specific, but I can't imagine accomplishing it without some serious hacks. Even so I wouldn't know what hack to use.

Anyway. Is it possible to have AmbientSound actors who's sound does not pass through line & floor/ceiling portals?
In my case I have a map which uses a lot of portals and some ambient sounds. Problem is those same ambient sounds are heard in areas they are not supposed to be heard. That's mostly because the different portal group areas overlap. And while it's fine with me that monster sounds might be heard, it is absolutely not fine for ambient sounds.

So rather than having to choose between portals or ambient sounds I made this feature suggestion mostly out of foolhardy desperation.
Something like having AmbientSound (and probably SoundSequence) actors have the INVISIBLE flag which tells the engine that whatever sound those actors are making should not travel through portals would be good enough for me. (Because those same portals are supposed to allow transmitting monster sounds from the other side.)

If there is a way to accomplish this via an existing method, I'm all ears.

As an example:
ambsndportal-test.wad
(8.21 KiB) Downloaded 60 times
Start the test map, you should hear the imp's chatter on a loop. Walk all the way to the portal and cross it. On the other side, walk all the way to the tree. You should still hear the imp's chatter noise. This is what I want to avoid. (And yes, I'm using static portals.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Ambient sounds which don't travel through portals

Post by Graf Zahl »

The best way to deal with this is not some semi-functional automatic but selective activation and deactivation of the sound things in your map.
If you call Thing_Activate and Thing_Deactivate on ambient sounds they will be switched on and off.
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Ambient sounds which don't travel through portals

Post by Fishytza »

Understood. I'll give it a go.

Um, might I ask why this isn't in Closed Feature Suggestions yet? (Not that I'm implying it should be.)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”