Klas, Please disregard the above post, as that code would've resulted in repeating sounds even if it did work. Doh.gif Doh.gif
The following code(s) are very similar to the above except they use a Macro for brevity.
"I dunno but this may be redundent - spoilers armed & handle pos 10 >" - A little more explanation. I donot think that the spoilers can be armed and handle greater than 10% at the same time, I believe they can be this OR that though. Again I provided 2 examples the 1st ANDed and the 2nd ORd. The only difference between the 2 codes are in the Macro.
Just FYI, if you are using DSD_XML_Sound3 gauge for your sounds. Setting a 1 to the trigger variable will play the sound only once, setting the variable to 2 will continually play the sound until the variable is forced back to 0.
<Macro Name="SP_ARM_COND">
(A:SIM ON GROUND, bool)
(A:SPOILERS ARMED, bool)
(A:SPOILERS HANDLE POSITION,percent) 10 >
& &
</Macro> <Element Name="Play Spoiler Sound">
<Select>
<Value>@SP_ARM_COND (G:Var3) ! & if{ 1 (>L:SPOILER_SOUND,number) 1 (>G:Var3) }
</Value>
</Select>
</Element>
<Element Name="Reset Spoiler Sound">
<Select>
<Value>@SP_ARM_COND ! (G:Var3) & if{ 0 (>G:Var3) }
</Value>
</Select>
</Element>
<Macro Name="SP_ARM_COND">
(A:SIM ON GROUND, bool)
(A:SPOILERS ARMED, bool)
(A:SPOILERS HANDLE POSITION,percent) 10 >
|| &
</Macro> <Element Name="Play Spoiler Sound">
<Select>
<Value>@SP_ARM_COND (G:Var3) ! & if{ 1 (>L:SPOILER_SOUND,number) 1 (>G:Var3) }
</Value>
</Select>
</Element>
<Element Name="Reset Spoiler Sound">
<Select>
<Value>@SP_ARM_COND ! (G:Var3) & if{ 0 (>G:Var3) }
</Value>
</Select>
</Element>
I hope you haven't tried my previous post and are still having troubles, hopefully this will get you going. Again it is not tested. Good luck & happy coding!