In my next project, for added immersion and realism, I want the player to be constantly hearing the sound of water humming around him when he goes underwater, and it disappearing once he surfaces. Something like here:
Is this possible to program in DOOM using ACS or Decorate? And if so, how?
Underwater Sound - is it possible?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
WojtTheDoomer2K
- Posts: 154
- Joined: Sun Aug 27, 2023 5:46 pm
- Location: Lower Silesia, Poland
-
Enjay
-

- Posts: 27307
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Underwater Sound - is it possible?
My first thought would be to use A_JumpIf(waterlevel... in the DECORATE/ZScript for your player.
https://zdoom.org/wiki/A_JumpIf
https://zdoom.org/wiki/Swimming#Waterlevel
You could jump to a state that plays the sound if the player is below the water surface.
I've used it for spawning bubbles from the player (similar to what you see in the video you posted).
https://zdoom.org/wiki/A_JumpIf
https://zdoom.org/wiki/Swimming#Waterlevel
You could jump to a state that plays the sound if the player is below the water surface.
I've used it for spawning bubbles from the player (similar to what you see in the video you posted).