Home   Help Search Login Register  

Author Topic: parameters in sound[]={"xxx",0.003162,1};  (Read 1272 times)

0 Members and 1 Guest are viewing this topic.

Laitex

  • Guest
parameters in sound[]={"xxx",0.003162,1};
« on: 29 Sep 2002, 19:53:14 »
sound[]={"Weapons\grenade_launch",0.003162,1};

Abobe description is written in config.cpp. I know that "Weapons\grenade_launch" means sound file, but I am not sure about followin two parameters "0.003162" and "1".
What are these parameters?
Why do they use such a small and halfway number "0.003162"?

Lucknow

  • Guest
Re:parameters in sound[]={"xxx",0.003162,1};
« Reply #1 on: 30 Sep 2002, 15:23:13 »
1st number after the comma determines how far the sound travels ingame, distance wise.

You'll see that rifle shots by default usually have a value of 1.

Change this to say 0.1 for the m16, go ingame and stand 200m away from someone shooting it and you'll hardly hear the sound. Change it to 5, and from 200m away it sounds like its being fired right next to you. Get the idea!?

2nd number determines the speed the sound is played. To slow the sound down use values over 1 (e.g. 1.4), and to speed up values under 1 (e.g. 0.6).

I sometimes use this to make vehicles sound slightly different from one another, for example changing tank tread sounds.

Laitex

  • Guest
Re:parameters in sound[]={"xxx",0.003162,1};
« Reply #2 on: 30 Sep 2002, 15:50:40 »
Thank you Lucknow. I can get the idea about sound parameters.

By the way,

soundGetIn[]={"Vehicles\get_in",0.000316,1};
soundGetOut[]={"Vehicles\get_out",0.000316,1};

These are the sound difinitions about "get in" and "get out". You see, sound travel parameter is 0.000316. I think 0.0003 is enough. Why do they difine such a halfway value 0.000316?