Jump to content
Sign in to follow this  
LtShadow

Sound Cone technology? Customization options?

Recommended Posts

Hey guys/gals,

Question time!

I've been trying to find a suitable solution to an issue, or should I say itching question, I have.

I'm working on some aircraft for the USAF mod, but I really would like to know if there are more ways to add a "sound-cone" to a specific sound sample for the aircraft. So that, when the aircraft is at a higher speed (or velocity), as well as the position of the craft, the sound will either silence itself or not play at all. I've had little luck finding any help, and thought this be the place to start!

I'm no scripting wiz, so any help is appreciative!

Here is the line I wish to add more of a cone to: (if I can figure out the sound cone, and how it works, I can apply it to the other mods I already have out)

			class DistantPlaneOut {
			sound[] = {"USAF_F16\snd\new_ext\16_distant.wss", 14, 1.0, 6500};
			frequency = "1";
			volume = "engineOn*camPos*(speed factor[1, 100])";
			cone[] = {3.0, 3.92, 1.9, 0.5};
		};

Thank you in advance!

-Shadow

Share this post


Link to post
Share on other sites

In order to make it speed dependent you could create multiple entries using different cones separated by the speed. For example:

class DistantPlaneOut1 {
			sound[] = {"USAF_F16\snd\new_ext\16_distant1.wss", 14, 1.0, 6500};
			frequency = "1";
			volume = "engineOn*camPos*(((((-speed*3.6) max speed*3.6)/    950) factor[(((-0) max 0)/    950),(((-50) max 50)/    950)])    *    ((((-speed*3.6) max speed*3.6)/    950) factor[(((-200) max 200)/    950),(((-120) max 120)/    950)]))";
			cone[] = {3.0, 3.92, 1.9, 0.5};
		};
class DistantPlaneOut2 {
			sound[] = {"USAF_F16\snd\new_ext\16_distant2.wss", 14, 1.0, 6500};
			frequency = "1";
			volume = "engineOn*camPos*(((((-speed*3.6) max speed*3.6)/    950) factor[(((-120) max 120)/    950),(((-250) max 250)/    950)])    *    ((((-speed*3.6) max speed*3.6)/    950) factor[(((-500) max 500)/    950),(((-400) max 400)/    950)]))";
			cone[] = {6.0, 9.0, 0.6, 0.1};
		};

To explain: In this case the 16_distant1 sound will be heard when the plane starts gaining speed. At speed 120 it will get quieter while 16_distant2 will start gaining volume. At speed 200 the distant1 wont be hearable while distant2 gets to full volume at speed 250 until 400 when it starts getting quieter again and so on.

Now you have separated cones at different speed values. You got to find out the max speed value tho, and test this further because I cannot say for sure if theres a difference in speeds for air and land vehicles in the engine/cfg.

Maybe that helped,

LJ

Share this post


Link to post
Share on other sites

Thanks for that, LJ! I didn't know you could create more than 1 sample for aircraft(s)! Also, could you briefly explain what you did with the cone?

---------- Post added at 16:57 ---------- Previous post was at 16:55 ----------

I basically wish to have an entry in which, if the aircraft is approaching a player at a higher velocity (say >400) then it would mute, or decrease the volume as the aircraft gains speed, and then play the sounds once the aircraft reaches the player.

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  

×