AI Systems: Difference between revisions

Jump to navigation Jump to search
237 bytes added ,  7 November 2017
Line 115: Line 115:
</syntaxhighlight>
</syntaxhighlight>


It looks much the same as the ship AI code. There are two differences, the <class> item and the <bank> item. If the class is set to "tanker" the airplane will allow you to refuel if you can get close behind it. The bank is of course similar to the ship's rudder. In the above example the A-4 will be orbiting to the left at 15 degrees of bank. You can also create a ship or airplane with a flight plan. In this case the object will follow the flight plan, and then delete itself when it reaches the end. The flight plans are kept in {{fgdata file|AI/FlightPlans}}. To create an airplane with a flightplan do this:
It looks much the same as the ship AI code. There are two differences, the <class> item and the <bank> item.
* The <code>class</code> specifies the type of aircraft and its flight characteristics. You can find the allowed values for this property in {{fgdata file|AI/Aircraft/performancedb.xml}}. If the class is set to "tanker" the airplane actually is configured to be a tanker, than it will allow you to refuel if you can get close behind it. The bank is of course similar to the ship's rudder. In the above example the A-4 will be orbiting to the left at 15 degrees of bank.  
 
You can also create a ship or airplane with a flight plan. In this case the object will follow the flight plan, and then delete itself when it reaches the end. The flight plans are kept in {{fgdata file|AI/FlightPlans}}. To create an airplane with a flightplan do this:
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<entry>
<entry>
648

edits

Navigation menu