• 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 VC Button Script

Messages
246
Country
southafrica
I want to use another approach on my VC - maybe a better approach..

I have a custom MFD, with buttons, but want to animate my buttons in the VC. What are the principles of making buttons and knobs using the MakeMDL.xml? I guess the xml must point to the gauge or in that direction at least. If i can get the principle, I will be more than happy! :)
 
Jake, if you are using XML "gauges," then the XML script in the model will automatically "talk to the gauges" via the common (L:var,unit) variables you use...
 
Thanks Bill. Just a question though:
I am using this script for my buttons, but they do not animate when I click them. any idea why?

Code:
<part>
   <name>MFD_RADbut</name>
     <AnimLength>100</AnimLength>
   <animation>
      <parameter>
         <code>
       (A:CIRCUIT GENERAL PANEL ON, bool) 1 == if{ (L:Digi_Digi9 Switch, number) 4 == } els{ 0 }
     </code>
         <lag>100</lag>
      </parameter>
   </animation>
   <mouserect>
      <cursor>Hand</cursor>
      <callback_code>  
                      4 (&gt;L:Digi_Digi9 Switch, number)  
              </callback_code>
   </mouserect>
   </part>
 
Thanks Bill. Just a question though:
I am using this script for my buttons, but they do not animate when I click them. any idea why?

Yes, because this statement makes no sense at all:
Code:
     <code>
       (A:CIRCUIT GENERAL PANEL ON, bool) 1 == if{ (L:Digi_Digi9 Switch, number) 4 == } els{ 0 }
     </code>

Your are setting the value of the (L:Digi_Digi9 Switch,number) in the mouse callback, so you only need to read the variable:
Code:
     <code>
       (A:CIRCUIT GENERAL PANEL ON, bool) 1 == if{ (L:Digi_Digi9 Switch, number) } els{ 0 }
     </code>
 
Back
Top