• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v5 2D popup visibility gauge passing L:var to external model

Messages
150
I'm trying to make a 2D pop up gauge to control visibility of some ground equipment in the external mdl and also the vc mdl - at least where physically visible.

The gauge uses simple switches to set the L:var, but the part isn't controlled by it.

<PartInfo>
<Name>ge_equipment</Name>
<Visibility>
<Parameter>
<Code>(L:ge_equipment, bool) 1 == if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</PartInfo>

<Gauge Name="GE equipment" Version="1.0">
<Element>
<Select>
<Value>(L:ge_equipment, bool)</Value>
<Case Value="0">
<Image Name="ECU_SW_OFF.bmp" />
</Case>
<Case Value="1">
<Image Name="ECU_SW_ON.bmp" />
</Case>
</Select>
</Element>
<Mouse>
<Cursor Type="Hand"/>
<Click>(L:ge_equipment,bool) ! (&gt;L:ge_equipment,bool)</Click>
</Mouse>
</Gauge>

What am I doing wrong, or can L:vars not be passed this way?
 
I do this all the time, so the procedure is fine. I don't know why yours is not working, though.
 
Im just assuming you didnt...
You can debug the Lvar and see wether it is being set indeed?
 
Im just assuming you didnt...
You can debug the Lvar and see wether it is being set indeed?
Hi,

Yes the Lvar is being set according to Doug Dawson's great Lvar monitoring gauge. Switches from 0 to 1 - no race conditions either.

It's odd! How are you guys doing it - does it differ from the above?
 
I had something similar in the past, story short I figured the Lvars used in the logic and animation differ by one capital letter🙈 I felt so stupid...
😄
 
I had something similar in the past, story short I figured the Lvars used in the logic and animation differ by one capital letter🙈 I felt so stupid...
😄
I usually copy and paste the name, and I've checked all are the same! But it must be something stupid....
 
Yet another lesson from the past...
same issue but this time the logic was ok but the animation sprite where the same despite different names..somehow i screw them up lost a day bunking my head for nothing🙈
Most of the times stupidity but we are so fixed😄
 
Still cannot fathom why this doesn't work. L var is 100% being set by the 2D pop gauge switch, part is 100% called the same name (copied and pasted) but still the part in the external model stays visible, regardless of L var bool state. Even renamed the part to be sure it's not something odd. Any more suggestions greatly received!

<PartInfo>
<Name>geequipment</Name>
<Visibility>
<Parameter>
<Code>
(L:ge_equipment,bool) 1 == ; if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>

<Gauge Name="GE equipment" Version="1.0">
<Element>
<Select>
<Value>(L:ge_equipment,bool)</Value>
<Case Value="0">
<Image Name="ECU_SW_OFF.bmp" />
</Case>
<Case Value="1">
<Image Name="ECU_SW_ON.bmp" />
</Case>
</Select>
</Element>
<Mouse>
<Tooltip>Aircraft protective covers</Tooltip>
<Cursor Type="Hand"/>
<Click>(L:ge_equipment,bool) ! (&gt;L:ge_equipment,bool)</Click>
</Mouse>
</Gauge>
 
..hmmm not sure it will make a difference but can you remove the semicolon in the conditional code Im not sure it should be there....
<Code>
(L:ge_equipment,bool) 1 == ; if{ 1 } els{ 0 }
</Code>
 
<PartInfo>
<Name>ge_equipment</Name>
<Visibility>
<Parameter>
<Code>(L:ge_equipment, bool) </Code>
</Parameter>
</Visibility>
</PartInfo>
 
Back
Top