Sign in to follow this  
Guest rkruijer

Click Sound in Click Event

Recommended Posts

Can anyone tell me what I have to do to generate a click sound in this code? @ZeroCom 1 (>L:Com3,number) Thanks for your effort.Roelof

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Roelof,FS2004 doesn't support sound triggers from an XML gauge.However, Doug Dawson made an XML sound gauge you can trigger via L:Vars, and allows to define max. 100 sound files and releated L:Vars in a .ini file.For an example: see the PF100 panel.The gauge PF10070_Sound.gau is just a renamed version of Doug's latest version of the gauge. See the panel.cfg and sound.ini file in the PF Sound folder for definitions. Since you know the PF 100 very well :-) I'm sure you'll figure it out from there.Cheers, ROb

Share this post


Link to post
Share on other sites

Thanks Rob,I'll figure it out. When I have doubts I'll be back.Roelof

Share this post


Link to post
Share on other sites

And back he is...I first tried a click sound from the existing wav'sLooked in the ini to find the name to be used and entered 1 (>L:MISC_HardClick,number) to my xml file.Found the sound too hard and changed it to1 (>L:GPWS_Sound_Click,number)That was better but not perfect. Then I searched for a sound, found something and renamed it to MultiSwitchSound.wav and added it to the fokker sound folder. I edited the ini file copying line 47 of the first tabel, Sound47=./Aircraft/PF10070v2_sound/FlapsUpOK.wav,100to line 48 to read like this: Sound48=./Aircraft/PF10070v2_sound/MultiSwitchSound.wav,100I added also an extra line to the 2nd tabel, Lvar48=Multi_Switch_SoundThen I added 1 (>L:Multi_Switch_Sound,number) to my XML! Now that did not work for some reason. I checked the spelling and the likes but could not get it to work.I finaly went back to my second choice and it worked again.Questions:1. Should my sound have worked the way I went about it?2. I sometimes see that instead of 1(> 0( or 2( is used.Is there any significance? Does it play twice with 2( ?Roelof

Share this post


Link to post
Share on other sites

Is there an entry in the [Config] section of the .ini file you are using that specifies "MaxSounds=48" ? If there is, you will need to increase the number. You are allowed up to 100, although increasing the number higher than necessary just uses extra cpu cycles.The values you assign to the variables will determine the action the gauge will take:0 stops a sound which is currently playing.1 causes a sound to play once.2 causes a sound to play continually until stopped by a 0 assignment.Doug Dawson

Share this post


Link to post
Share on other sites

I am happy to hear from the master himself.I had been thinking of a counter somewhere. Never thought it would be in the ini itself. I'll change it to 49. Thanks for your help Doug and let me wich you a Happy New Year.Roelof.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this