- Messages
- 10,058
- Country
-
Hey guys,
Does this code look right? Its not working and thought I would ask for advice.
This is for MSFS, for use in a SoundXML 'custom sound'. I am trying to create two Local Vars that will operate off of a base Local Var. Evidently we cannot attach two WAV files to 'one' Local Var, so we have to create two Local Vars and have a sound attached to each one. (Opening Door sound and Closing Door sound). 2 Doors, 4 sounds. Each 'branched out' Local Var will carry a sound on it.
Here is the first one to get working, Left Door. Do you see a flaw in my 'now forgotten' XML coding? This code will be in the Model Interior XML file.
Does this code look right? Its not working and thought I would ask for advice.
This is for MSFS, for use in a SoundXML 'custom sound'. I am trying to create two Local Vars that will operate off of a base Local Var. Evidently we cannot attach two WAV files to 'one' Local Var, so we have to create two Local Vars and have a sound attached to each one. (Opening Door sound and Closing Door sound). 2 Doors, 4 sounds. Each 'branched out' Local Var will carry a sound on it.
Here is the first one to get working, Left Door. Do you see a flaw in my 'now forgotten' XML coding? This code will be in the Model Interior XML file.
<Component ID="LHC_DOORS_SOUNDS_LH">
<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>30</FREQUENCY>
<UPDATE_CODE>
(DOOR_LH,Bool) 1 >
if{ (L:DOOR_LH_KEY,Bool) 0 ==
if{ 1 (>L:DOOR_LH_KEY,Bool)
1 (>L:DOOR_LH_SOUND,Bool)
}
}
els{ 0 }
(DOOR_LH,PERCENT) 5 <
if{ (L:DOOR_LH_KEY,Bool) 1 ==
(L:DOOR_LH_SOUND_OPEN,Bool) 1 ==
if{ 0 (>L:DOOR_LH_SOUND_OPEN,Bool)
1 (>L:DOOR_LH_SOUND_CLOSED,Bool)
}
}
els{ 0 }
(DOOR_LH,Bool) 0 ==
if{ (L:DOOR_LH_KEY,Bool) 1 ==
(L:DOOR_LH_SOUND_CLOSED,Bool) 1 ==
if{ 0 (>L:DOOR_LH_KEY,Bool)
0 (>L:DOOR_LH_SOUND_CLOSED,Bool)
}
}
els{ 0 }
</UPDATE_CODE>
</UseTemplate>
</Component>