A way to implement a simple version of the env_soundscape Created 3 years ago2020-11-23 18:22:26 UTC by FranticDreamer FranticDreamer

Created 3 years ago2020-11-23 18:22:26 UTC by FranticDreamer FranticDreamer

Posted 3 years ago2020-11-23 18:22:26 UTC Post #344941
Hello.

I was thinking about making rainy weather for one of the maps in my mod. But ambient_generic gives sound from a static place.

Is there a way to implement this in the Goldsrc engine? Or can we use some hacks like moving ambient_generic with the player etc?

Thanks.
FranticDreamer FranticDreamerR.I.P. Benny Harvey. Miss you big man. Gone but not forgotten.
Posted 3 years ago2020-11-24 11:00:05 UTC Post #344948
There is an entity in SoHL that changes your sourrounding sound effects (eg. echo in a vent, echo in big spaces) its called trigger_sound (Brush-based DSP Sound).
I dont know if that is what you are looking for, but you might give it a try.
Or you might want to try movewith with the ambient generic like you said (movewith is in SoHL too), if the map is in your custom mod, you might want to implement Amder456's util_movewith which is found in his Advanced Development Mod, It really helped me out sometimes.
(attaching it to the player migth be a bit of a challange)
Posted 3 years ago2020-11-24 11:20:19 UTC Post #344949
You can implement soundscapes easily. Not in the engine, of course, since we have no access to the engine itself, but rather in the game library.
Take a look at how a simple entity class is written, like func_wall.

The problem with emitting sounds programmatically is that you cannot tell the engine where to play the sound from. Instead the sound is always emitted from an entity's centre. You can spawn a dummy entity that will follow the player and whatnot, and then emit sounds randomly from that one.

Now, there are a few more additions that can be made, like 2D sounds, which requires the use of so-called user messages (basically server-to-client messages).
"It really helped me out sometimes."
Someone actually USES that?! LOL
Admer456 Admer456If it ain't broken, don't fox it!
You must be logged in to post a response.