Canvas ND framework: Difference between revisions

Jump to navigation Jump to search
Line 32: Line 32:


If you are facing problems with the steps outlined above, please get in touch via the article's talk page or the forum, so that the instructions can be improved accordingly. Thank you!
If you are facing problems with the steps outlined above, please get in touch via the article's talk page or the forum, so that the instructions can be improved accordingly. Thank you!
More detailed instruction. See if it could help.
ND integration: How it was done on the mirage 2000 :
The integration is simple :
0) Have a update compiled version of flightgear.
1) Have the 3D model in this way :
3D MFD ->
  - a) 3D Border (border of the screen, with scew etc)
  - b) 3D Button/swith, molette, turnable button
  - c) A 3D Screen object, with :
    - perfect size
    - Single texture, -> with perfect size
    - Perfect size of the UVmap
2) Copy pasta ND.nas
2.1)Add the ND.nas in your basis xml file at Nasal part.
3) Edit ND.nas :
  -a) Rename the screen to match with the object in 1)c)
  -b) If it a single mfd, you do not need another object, so suppress the line (when it's calling the object itself)
  -c) Keep the properties name -> it's just ok. We just need to input it with xml button in 1)b)
4) Code the xml itself.
Really simple, it's just playing with properties : for example this for airport property :
  <!--######################## Airports ############################-->
  <animation>
    <type>pick</type>
    <object-name>bt-h1</object-name>
    <visible>true</visible>
    <action>
        <button>0</button>
        <binding>
        <command>property-toggle</command>
        <property>/instrumentation/efis/inputs/arpt</property>
        </binding>
    </action>
  </animation>
Or here again for the range selection :
  <animation>
    <type>pick</type>
    <object-name>trim1</object-name>
    <action>
      <button>4</button>
      <!--  scroll up -->
      <repeatable>false</repeatable> 
      <binding>
                <command>property-cycle</command>
                <property>/instrumentation/efis/inputs/range-nm</property>
                <value>10</value>
                <value>20</value>
                <value>40</value>
                <value>80</value>
                <value>160</value>
                <value>320</value>
      </binding> 
    </action>
  </animation>
  <animation>
    <type>pick</type>
    <object-name>trim1</object-name>
    <action>
      <button>3</button>
      <!--  scroll up -->
      <repeatable>false</repeatable>
 
      <binding>
                <command>property-cycle</command>
                <property>/instrumentation/efis/inputs/range-nm</property>
                <value>320</value>
                <value>160</value>
                <value>80</value>
                <value>40</value>
                <value>20</value>
                <value>10</value>             
      </binding> 
    </action>
  </animation>
5) Then you can optionnaly put this :
  <animation>
  <type>pick</type>
  <object-name>blackbkd</object-name>
  <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>mirage2000.showNd();</script>
      </binding>
  </action>
  </animation>
Where 'blackbkd' is the screen 1)c). This last thing allow you to open a dialog box with what the actual canvas should display in your 1)c) screen. This is very usefull to check all the differents step when something isn't working well.
Normally following these step, you should have a working Mfd.


=== Cockpit switches ===
=== Cockpit switches ===
89

edits

Navigation menu