Jump to content

FS9: Multiple sounds for a XML switch...?


Recommended Posts

Hello all:

 

Just a quick question concerning adding *multiple* sounds to XML switches in FS2004-- I am adding a dummy switch to a panel, which I want to play "Sound_A" when it's turned on, and "Sound_B" when it's turned off. I got it to play the *same sound* for both positions, but it's beyond me how to have two different sounds, one for each position. I tried using other XML switches as examples, but I obviously missed something because I never could get it to work. If anyone could help me out with this, I'd really appreciate it. Thanks!

 

Scott

 

**********************

The code I have now:

 

[sorry- I couldn't get the indentation to display correctly in the post]

 

(L:MotorGeneratorSwitch, enum)

Motor Generator Switch

(L:MotorGeneratorSwitch, enum) ! (>L:MotorGeneratorSwitch, enum) 1 (>L:Sound_A, enum)

 

XMLcode.JPG

[sIGPIC][/sIGPIC]

Scott Anderson

First Officer, Air Mail Division (BGAM 006)

Bluegrass Airlines (VA)

Link to comment
Share on other sites

Hello,

Two examples:

 

    
         (L:MotorGeneratorSwitch,enum) ! (>L:MotorGeneratorSwitch,enum)
         (L:MotorGeneratorSwitch,enum) 0 == if{ 1 (>L:SOUND_A, enum) 0 (>L:SOUND_B, enum) }
         (L:MotorGeneratorSwitch,enum) 1 == if{ 1 (>L:SOUND_B, enum) 0 (>L:SOUND_A, enum) }


OR


         (L:MotorGeneratorSwitch,enum) ! (>L:MotorGeneratorSwitch,enum)
         (L:MotorGeneratorSwitch,enum) 0 == if{ 1 (>L:SOUND_A, enum) 0 (>L:SOUND_B, enum) } els{ 1 (>L:SOUND_B, enum) 0 (>L:SOUND_A, enum) }

 

Sometimes you have to add a timer script to a sound so that it does not continue indefinitely!

Link to comment
Share on other sites

Thank you very much! I'll give it a shot... I struggle with .XML syntax sometimes-- the concept I get, but the specifics are a little challenging LOL. Again, many thanks!

 

Scott

[sIGPIC][/sIGPIC]

Scott Anderson

First Officer, Air Mail Division (BGAM 006)

Bluegrass Airlines (VA)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...