How can I trigger variables in a hidden xml gauge by using this VC "dummy" switch code?
Adding code in the callback section in the modeldef works fine, but triggering the xml gauge not so much.
Either the switch moves on/off/on/off (flooding?), or nothing at all. As an audiable test I tried to set fuelpump on/off, with no luck. Are there any examples?
Example only:
Non working gauge code
Adding code in the callback section in the modeldef works fine, but triggering the xml gauge not so much.
Either the switch moves on/off/on/off (flooding?), or nothing at all. As an audiable test I tried to set fuelpump on/off, with no luck. Are there any examples?
Example only:
Code:
<PartInfo>
<Name>UHF_Power_Sw1</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:UHF_Power_Sw1, number) 50 *</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>hand</Cursor>
<TooltipText>UHF Power Switch = %((L:UHF_Power_Sw1, number) 0 ==)%{if}Off%{else}On%{end}</TooltipText>
<MouseFlags>LeftSingle+RightSingle</MouseFlags>
<CallbackCode>(L:UHF_Power_Sw1, number) ! (>L:UHF_Power_Sw1, number)</CallbackCode>
</MouseRect>
</PartInfo>
Non working gauge code
Code:
<!-- Just a test so I can hear the sound of the pump) -->
<Element>
<Select>
<Value>(A:GENERAL ENG FUEL PUMP SWITCH:1, bool) 0 != if{ 1 (L:UHF_Power_Sw1,bool) } els{ 0 (>L:UHF_Power_Sw1,bool) }</Value>
</Select>
</Element>