FSX Virtual to 2d Gauge help

#1
Hi all,

Not sure if this possible but trying to recreate an Annunciator test Switch the Virtual Cockpit has one and I have pulled the code form the Annunciator panel and when I click the virtual switch the 2d switch moves but the only trouble is I cant activate from the 2d Panel so it is click event which is wrong I think. So is there any way I can get to this work. I don't need it stay what it is when I hover over it I think that it is the help ID just need it go on when pressed. Code is below

Thanks a million you clever lot I just start to think I am getting the hang off XML and then thrown a curve ball.

Cheers
Matt



XML:
<Gauge Name="Anum test" Version="1.0">
<Element>
<Select>
<Value>(L:GAUGE_ANUM_TEST, bool)</Value>
<Case Value="0">
<Image Name="antoff.bmp" ImageSizes="23,53"/>
</Case>
<Case Value="1">
<Image Name="anton.bmp" ImageSizes="23,53"/>
</Case>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_ANUM_TEST"/>
<Cursor Type="Hand"/>
<Click Event="ANUM_TEST_TOGGLE"/>
</Mouse>
</Gauge>
 
#4
I have not seen an event that toggles an LVar in that way. I only use 2D gauges. I would have had to use
XML:
(L:GAUGE_ANUM_TEST, bool) ! (&gt;L:GAUGE_ANUM_TEST, bool)
 

tgibson

Resource contributor
#5
As Walter says above, in FSX there is no ANUM_TEST_TOGGLE event ID in the SDK so that can't work. Can you post the modeldef code for the Annunciator?
 
#8
when I click the virtual switch the 2d switch moves but the only trouble is I cant activate from the 2d Panel
With what was said before means the L:Var is correct, just need to control it. What Walter said above holds true.
XML:
<Mouse>
    <Tooltip>Annunciator Test</Tooltip>
    <Cursor Type="Hand"/>
        <Click>(L:GAUGE_ANUM_TEST, bool) ! (&gt;L:GAUGE_ANUM_TEST, bool)</Click>
</Mouse>
 
#9
Hi all,

Thanks for your help I am happy to send it via PM but I cant really post online as it is a commercial model and that would be unfair on the designers.
So if someone wants to look please let me know and I will send via PM.

Thanks
Matt
 
#16
Update for all I found some code that worked see below.

XML:
<?xml version="1.0"?>
-<Gauge Version="1.0" Name="Senacav_Annunciator_Test">
<Image Name="SV_Test_Buttom.bmp"/>
-<Mouse>
-<Area Height="30" Width="30" Top="0" Left="0">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle + LeftRelease">(M:Event) 'LeftSingle' scmp 0 ==if{ 1 (>L:GAUGE_ANUM_TEST,bool) }(M:Event) 'LeftRelease' scmp 0 ==if{ 0 (>L:GAUGE_ANUM_TEST,bool) } </Click>
</Area>
</Mouse>
</Gauge>
 
Top