• 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.

FS2004 Need help with xml

Messages
462
Country
germany
Ok guys....need some help here...Cannot for the life of me get the MFDs to turn on.....I know they are working as when I turn on the avionics I get the test screen (a large T) in the middle of the screens....
here is the code in makemdl.xml
Code:
-<part>
<name>ec155mfd1</name>
-<animation>
-<parameter>
<code>(L: MFD1_Main, bool) 100 *</code>
<lag>400</lag>
</parameter>
</animation>
-<mouserect>
<cursor>Hand</cursor>
<tooltip_text>SWITCH ON MFD1</tooltip_text>
<callback_code>(L: MFD1_Main,bool) ! (>L: MFD1_Main,bool)</callback_code>
</mouserect>
</part>
Now according to the gauge, this is the visibility code
Code:
<Visible> (A:Circuit general panel on, bool) (L:MFD1_Main,bool) ! &amp;&amp; (A:Avionics master switch,bool) &amp;&amp; (L:SMD_Test,bool) &amp;&amp;</Visible>

Anyone have any ideas on how to get the 3d switch to turn on the 2d MFD?
 
I don't know your exact gauge code, so just guessing here:

<Visible> (A:Circuit general panel on, bool) (L:MFD1_Main,bool) ! &amp;&amp; (A:Avionics master switch,bool) &amp;&amp; (L:SMD_Test,bool) &amp;&amp;</Visible>

Why do you animate a digital screen? :confused:
 
(L: MFD1_Main, bool)

I think that space should not be there...
 
Try:
Code:
<part>
<name>ec155mfd1</name>
<animation>
<parameter>
<code>(L:MFD1_Main, bool) 100 *</code>
<lag>400</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>SWITCH ON MFD1</tooltip_text>
<callback_code>(L:MFD1_Main,bool) ! (>L:MFD1_Main,bool)</callback_code>
</mouserect>
</part>

Note removed spaces from L: vars.

Code:
<Visible>(L:MFD1_Main,bool) (L:SMD_Test,bool) or (A:Circuit general panel on, bool) and (A:Avionics master switch,bool) and</Visible>

Note reshuffled conditions. I'm not sure if FS9 takes "and" and "or" instead of the more cryptic "&amp;&amp;" and "||".
 
1. Check if the Visibility tag is working. Start with one condition, see if it displays. Add the next condition, see if it still works, etc..

When all the default variables are ok, the problem must be with your (L:MFD1_Main,bool).

2. So read out your L:Var in-sim and check if your switch is working.

If the state of the L:Var doesn't change, when you click the switch, there must be problem with the animation code.

-> 3. Compare with defaults...


EDIT: 4. Try Bjoern's code first :D
 
Hi,

You might try:

Code:
<Visible>(L:MFD1_Main,bool) (L:SMD_Test,bool) or (A:Circuit general panel on, bool) and (A:Avionics master switch,bool) and</Visible>

Then MFDs should display when (L:MFD1_Main,bool) or (L:SMD_Test,bool), with general and avionics power available.

Tom
 
Ok...it is something within the L:var. Tried what you said and removed the SMD_test and the MFD comes on and off with the aviaonics switch...
3dsmax11193.jpg
 
Thanks guys! Managed to get it working! Replaced the line of code "Circuit general panel on" with "Master Battery" and removed the "SMD Test"....Screen comes on and off with the switch now!
I also was able to create a XML code for two of the switch covers on the overhead. I will be asking more XML questions in the future. Am I correct in assuming that the <string> in a gauge is the same as <callback code> in the makemdl.xml?
 
No. Scripts executed on mouse interactions in 2D gauges are wrapped in <Click> </Click> tags. <String> tags are used for displaying strings of text.
 
Back
Top