Jump to content
Sign in to follow this  
Alba

Repeating click sound

Recommended Posts

Hi Everyone.I have used a switch gauge to open a panel window and am now wanting to add a click sound to it. I am new to XML so have looked at another switch using FS Panel Studio's edit XML function. I have tagged on the relevent code which uses the XML sound gauge and the included .wav files. The switch opens the panel window ok but the click sound repeats several times in the main panel window but only clicks once in the sub panel (when I click to return to the main instrument panel)Here is the Ident line from the mouse click part of the coding with the sound part tagged on to the end. I have tried bracketing the seperate parts but to no avail.120 (>K:PANEL_ID_TOGGLE) (>K:TOGGLE_AFTERBURNER1) As I am a newbie perhaps someone could let me know the reason for the click sound repeating and what I need to do to make it sound only the once.Any and all help appreciated.Thanks...Kenny

Share this post


Link to post
Share on other sites

Hi Kenny,I assume you still use Bill Morads (RIP !) XMLsound gauge ?I don't know the other parts of the code, but by itself the code line you are using in the Click area is correct.BUT: (assuming you make the gauge for FS2004 !!)While Bill's gauge was a good solution for FS2002, I suggest you stay away from it in FS2004, for several reasons:1. Using the event TOGGLE_AFTERBURNER1 in an aircraft with non-turbine engines (like a Cessna) may CRASH FS2004.2. For FS2004, there is a much better and much more flexible solution: Doug Dawson's XML sound gauge.See file DSD_XML_SOUND2.ZIP in the AVSIM library.The included gauge dsd_xml_sound3.gau gives you the most flexible variant, both in using unique (used-defined) L: variables and names/location of the used .wav file.Allows you to serve 100 sounds (single-shot or repetitive).Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites
Guest Skymed

Kennyusing the aforementioned DSD3 sound gauge, here are a couple of snippets of code that will give 1 click everytime you move a switch:This one turns on and off an L var called dummyswitch, and activates the L var (clickswitch) that controls the sound: (L:Dummyswitch1,bool) ! (>L:Dummyswitch1,bool) 1 (>L:clickswitch,enum)This one switches between NAV and GPS and activates a single click everytime it is used: 1 (>K:TOGGLE_GPS_DRIVES_NAV1) 1 (>L:idlerelsnd,enum) In your case i would suggest something like: 120 (>K:PANEL_ID_TOGGLE) 1 (>L:idlerelsnd,enum) Where (>L:idlerelsnd,enum) is any L var you want to use.if you read the excellent documentation provided with the DSD3 sound gauge, you will be able to apply this methodology to many other things as well.happy clickingSteve

Share this post


Link to post
Share on other sites

Hi Rob and Steve.Many thanks for the prompt replies, I appreciate it. Guys, I,m sorry for not saying that I'm still flying 02. I fly 4 engine turboprops like the Dash 7 and Electra 118 and make use of the FS FlightMax module. I open it in a seperate window and think that it's a great 'gauge' to have. As far as I'm aware it's not available for FS9 (04)and so I haven't as yet moved on to 04.With respect to 02 then, yes, it is Bill's XML sound gauge that I,m using and as I say I seem to have it working ok considering that I'm just making it up as I go along, GRIN!! apart from the multiple clicks.Any more thoughts regarding the code in 02?Regards..Kenny

Share this post


Link to post
Share on other sites

Hi Kenny,As said before, the code line you mentioned is OK.But there's one thing I don't understand.You state that your hear more clicksound when you click the window Open in the main panel, and one clicksound when you click the opened window to close.Does the mean that you have two gauges that have this code line (one in the main panel and one in the overlay window) ??And are they the same gauges ??If not, is the CLick code the same ??Also, copy/paste the whole mouse section insteasd of just the single line would help :-)(or attach the whole xml gauge)Rob

Share this post


Link to post
Share on other sites

Rob, thanks for your input on this.Your reply reads as though you are thinking of something that I'm not aware of as yet with the gauges.You are right regarding using the same switch to toggle between main and sub panels.Here is what I've done. I have made two full screen windows, called 'Centre' and 'CentreRear'. I have placed the FlightMax module, radios and GPS on 'Centre' and your Taxispeed gauge and some other ancilliary gauges on 'CentreRear'.I wanted to replace the Sim Icons with switches which would toggle these windows. I have used the CPT Toggles Cessna 'Dummy' switch. I have made duplicates of it using Ed's FS Panel Studio. I called them 'Dummy 00' 'Dummy 01' and 'Dummy 02' I changed the Idents on 01 and 02 to suit the Idents I had given to the two windows.I also made transparent the RKG toggles 'swap to Main' and 'Swap to panel ID' and overlaid them on 'Dummy 00' which retains the original coding.I then tagged on the code for the click sound which I got elsewhere.I have a bank of three switches in my main instrument panel 00,01,and 02. I have also used 01 on Centre and 02 on CentreRear to toggle back to main. It seems to work OK, but is that not the way to do it?Here is the full mouse code for Centre ( 01 ). It's essentially the same as the CPT toggle but with differing Idents and the sound code added.Mouse> Main/Centre110 (>K:PANEL_ID_TOGGLE) (>K:TOGGLE_AFTERBURNER1)The CentreRear ( 02 ) is the same but with 120 as the Ident.I appreciate any further thoughts and tips regarding the click sounds. ThanksRegards...Kenny

Share this post


Link to post
Share on other sites

Rob, thanks for your input on this.Your reply reads as though you are thinking of something thatI'm not aware of as yet with the gauges.You are right regarding using the same switch to togglebetween main and sub panels.Here is what I've done. I have made two full screen windows,called 'Centre' and 'CentreRear'. I have placed the FlightMaxmodule, radios and GPS on 'Centre' and your Taxispeed gaugeand some other ancilliary gauges on 'CentreRear'.I wanted to replace the Sim Icons with switches which wouldtoggle these windows. I have used the CPT Toggles Cessna'Dummy' switch. I have made duplicates of it using Ed's FSPanel Studio. I called them 'Dummy 00' 'Dummy 01' and 'Dummy02' I changed the Idents on 01 and 02 to suit the Idents Ihad given to the two windows.I also made transparent the RKG toggles 'swap to Main' and'Swap to panel ID' and overlaid them on 'Dummy 00' whichretains the original coding.I then tagged on the code for the click sound which I gotelsewhere.I have a bank of three switches in my main instrument panel00,01,and 02. I have also used 01 on Centre and 02 onCentreRear to toggle back to main. It seems to work OK, butis that not the way to do it?Here is the full mouse code for Centre ( 01 ). It'sessentially the same as the CPT toggle but with differingIdents and the sound code added.Mouse> Main/Centre110 (>K:PANEL_ID_TOGGLE)(>K:TOGGLE_AFTERBURNER1)The CentreRear ( 02 ) is the same but with 120 as the Ident.I appreciate any further thoughts and tips regarding theclick sounds. ThanksRegards...Kenny

Share this post


Link to post
Share on other sites

Hi Kenny,If I understood you correctly, I can't find anything wrong with the idea, nor do see a reason why you would get multiple clicksounds.Sorry I can't be of more help..Rob

Share this post


Link to post
Share on other sites

OK Rob.Like I said, thanks for the input. Much appreciated.Regards...Kenny

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...