Jump to content
Sign in to follow this  
catyp

Changing SFX Volume?

Recommended Posts

I've added a new sound effect for the downforce thrusters on the racer example addon, but I can't figure out how to adjust the volume without editing the .wav file itself. The file shaders.h seems to have a volume setting (e.g. buggy_engine1 "volume 0.500000") but it doesn't have any obvious effect. Anybody know what I'm missing? Thanks.

Share this post


Link to post
Share on other sites

Hi, yes it is in the following file:

AddonExample\data\scripts\OnSim_Racer4Reflip.h

Specifically, the volume is modulated there, line 172, 174, 193, 195:

thrusterPart.PlaySnd(PART_SOUNDS_EXTCHNL1, fxEnt.FX_Snd_Thruster, SFX_3D, fxEnt.FX_Vol_Thruster * fabs(thrusterPart.GenVec2[0]), 0.2 * fabs(thrusterPart.GenVec2[0]) + sndFreq * sndVar);

But if you just globally want to change the volume maximum for that sound, it is here:

AddonExample\data\configs\FX\Thruster_DownForce.cfg

Specifically here:

FX_Vol_Thruster			0.8
FX_Vol_Thruster_Far		0.4

Where the "far" setting is for the sound played in the distance.

Hope that helps!

Share this post


Link to post
Share on other sites

Ah, awesome, that's it. Thanks Dram! I feel a bit silly now not having looked properly in the config file...

P.S. The mod tools are looking awesome so far!

Share this post


Link to post
Share on other sites
Ah, awesome, that's it. Thanks Dram! I feel a bit silly now not having looked properly in the config file...

P.S. The mod tools are looking awesome so far!

Cheers, glad to hear it :) If you need any help with anything, please do not hesitate to ask!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×