Livery over MP

From FlightGear wiki
Revision as of 15:15, 8 October 2008 by Gijs (talk | contribs) (New page: On this page we describe how you make use of a script to get a livery selection dialog in FlightGear. To get new liveries into FlightGear CVS, you need to have them availabe with this ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

On this page we describe how you make use of a script to get a livery selection dialog in FlightGear. To get new liveries into FlightGear CVS, you need to have them availabe with this script.

Using the MP livery script

We have to make a directory to store our liveries in. Let's make it Aircraft/Sikorsky-76C/Models/Liveries.

Livery files

For every liverie we need to make a file. Let's say we got a Rescue livery, we than need to make a file called Rescue.xml into our Models/Liveries directory.

<?xml version="1.0"?>

<PropertyList>
 <sim>
  <model>
   <livery>
    <name type="string">Rescue</name>
    <index type="int">0</index>
    <texture>S76livery0.rgb</texture>
   </livery>
  </model>
 </sim>
</PropertyList>

Model .xml file

<nasal>
 <load>
  var livery_update = aircraft.livery_update.new("Aircraft/Sikorsky-76C/Models/Liveries", 10);
 </load>

 <unload>
  livery_update.stop();
 </unload>
</nasal>

<animation>
 <type>material</type>
  <object-name>LHgeardoor</object-name>
  <object-name>RHgeardoor</object-name>
  <object-name>S76C</object-name>
  <object-name>RF.door</object-name>
  <object-name>LF.door</object-name>
  <object-name>Rr.Door</object-name>
  <object-name>Lr.Door</object-name>
  <object-name>RHbaggage</object-name>
  <object-name>LHbaggage</object-name>
  <object-name>RHfrtgeardoor</object-name>
  <object-name>LHfrtgeardoor</object-name>
  <property-base>/sim/model/livery</property-base>
  <texture-prop>texture</texture-prop>
  <texture>S76livery.rgb</texture>
</animation>

.nas file

aircraft.livery.init("Aircraft/Sikorsky-76C/Models/Liveries", "sim/model/livery/name", "sim/model/livery/index");

-set.xml file

<model>
 <path>Aircraft/Sikorsky-76C/Models/s76c.xml</path>
 <start-idling type="bool"></start-idling>
 <variant type="int">1</variant>
</model>