546
edits
Red Leader (talk | contribs) (Cleanup, although there are some more bits & pieces that could still be improved) |
|||
| Line 42: | Line 42: | ||
=== Models/model.xml === | === Models/model.xml === | ||
The first part is related to the nasal script. <code>aircraft.livery_update.new("Aircraft/747/Models/Liveries");</code> points FlightGear to the directory where we store our liveries. This is a different directory for every plane, but there should be only one folder for one plane, containing all the liveries for that plane. | The first part is related to the nasal script. <code>aircraft.livery_update.new("Aircraft/747/Models/Liveries");</code> points FlightGear to the directory where we store our liveries. This is a different directory for every plane, but there should be only one folder for one plane, containing all the liveries for that plane. | ||
In order to enable livery changes also for MP (Multi-Player) use, add the following code to your model.xml file: | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
| Line 49: | Line 51: | ||
<nasal> | <nasal> | ||
<load><![CDATA[ | <load> | ||
<!-- | |||
############################################################################## | |||
# The on-load Nasal is not executed when this file is loaded as the user | |||
# aircraft. The code is only executed if the file is loaded for a remote | |||
# aircraft in Multi-Player mode (MP) | |||
############################################################################## | |||
--> | |||
<![CDATA[ | |||
var livery_update = aircraft.livery_update.new("Aircraft/747/Models/Liveries"); | |||
]]> | |||
</load> | |||
<unload><![CDATA[ | <unload><![CDATA[ | ||
edits