Author Topic: Dynamic sound/adjusting sound volume  (Read 650 times)

I was wondering if its possible to dynamically change the sound level of anything that emits it under specified conditions. Consider this example:

A player with a gun is placed in a zone with the value .isVacuum = 1; I want to make it so that any sound the player makes, such as the jump sound, gun firing sound, and even bullets that explode inside said zone, have a quieter sound.

Is this possible or are there engine limits that make prevent this from happening.

Definitely possible. Have the player change to a datablock that has references to other sound datablocks that are using a quieter profile. This covers jumping.

However, when it comes to guns and bullets, you would have to modify each and every weapon and projectile to have this functionality. You wouldn't necessarily need new image/projectile datablocks, if you don't use the states/datablock values to have the engine do sounds for you. You'd have to write the sound functions into onfire/onexplode, and have them play a certain sound depending on the condition.

So yeah, while possible, not exactly fun.

I've done something like this before. It's comparatively easy depending on how much you want to do it.
I made an event that changed the value isIndoors to 1 or 0, and whenever you fire your gun, it checks that value before determining whether or not to play a heavily reverbed gunshot or a regular gunshot sound.

Doesn't this exist for being underwater?