FSXA Avionics switch and sound

Ok now what am i doing wrong. Help Anyone, trying to put avionics sound to this switch. keeps crashing fsx. Thanks in advance

Code:
<Gauge Name="Avionics Switch" Version="1.0">
   <Element>
      <Select>
         <Value>(A:Avionics master switch,bool)</Value>
         <Case Value="0">
            <Image Name="button_off.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="button_on.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Select>
         <Value>(A:CIRCUIT AVIONICS ON,bool) 0 &gt; if{ 1 (L:PlaySound14,bool) 1 (&gt;L:dsd_fsx_sound_id_14,number) } els{ 0 }</Value>
      </Select>
   </Element>
   <Mouse>
      <Help ID="HELPID_GAUGE_AVIONICS_SWITCH"/>
      <Cursor Type="Hand"/>
      <Click Event="TOGGLE_AVIONICS_MASTER"/>
   </Mouse>
</Gauge>
 
Last edited:
Got it Finally

Turned out it was a corrupt wav file and some coding mistakes. Here is what i ended up with:

Code:
<Gauge Name="Avionics Switch" Version="1.0">
<Element>
<Select>
<Value>(A:Avionics master switch,bool)</Value>
<Case Value="0">
<Image Name="button_off.bmp"/>
</Case>
<Case Value="1">
<Image Name="button_on.bmp" Bright="Yes"/>
</Case>
</Select>
</Element>
<Element>
<Select>
<Value>(A:CIRCUIT AVIONICS ON,bool) 
if{ 1 (&gt;L:dsd_fsx_sound_id_14,number) }</Value>
</Select>
</Element>
<Element>
<Select>
<Value>(A:CIRCUIT AVIONICS ON,bool) 
if{ 1 (&gt;L:dsd_fsx_sound_id_28,number) }</Value>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_AVIONICS_SWITCH"/>
<Cursor Type="Hand"/>
<Click Event="TOGGLE_AVIONICS_MASTER"/>
</Mouse>
</Gauge>
 
Hello,

I am trying to make a similar thing with my model and wonder if you have named the sound .wav files 14 and 28? I am new to XML programming and I wonder how the program get the sound files from this code.

Regards,
John Stewart
 
Top