Flight Path: Difference between revisions

m (→‎Current Usage: clean up,)
mNo edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lowercase}}
A '''flight path''' is a set of points that plots the path for an NPC flying vehicle in [[Grand Theft Auto III]] and [[Grand Theft Auto: Vice City]]. It is defined in a <code>flight*.dat</code> file located in the <code>\data\paths\</code> directory. The following files contain paths for these flying vehicles:
The '''flight.dat''' files controls the movements of NPC airbourne vehicles in GTA3 and Vice City. These files are located in the data/paths folder in the GTA3 or Vice City directory. The <code>flight.dat</code> controls the Boeing jets. The <code>flight2.dat</code> controls the Dodo. The <code>flight3.dat</code> controls the Dodo used in "S.A.M." in GTA3 and the Police Maverick in Vice City. The <code>flight4.dat</code> controls the Dodo used in "A Drop In The Ocean" in GTA3. These airbourne vehicles are not solid so you cannot collide into them and there are no drivers in them.
{|class="wikitable"
|
|style="text-align: center; width: 16em;" |{{Icon|3}}
|style="text-align: center; width: 16em;" |{{Icon|VC}}
|-
|<code>flight.dat</code> ||style="text-align: center;" colspan="2" |[[Airtrain]]
|-
|<code>flight2.dat</code> ||style="text-align: center;" colspan="2" |[[DeadDodo]]
|-
|<code>flight3.dat</code> ||DeadDodo used in "[[S.A.M.]]" ||[[Police Maverick]]
|-
|<code>flight4.dat</code> ||DeadDodo used in "[[A Drop In The Ocean]]"
|}
These flying vehicles are not solid so you cannot collide into them and there are no drivers in them. DeadDodos can be destroyed by shooting a [[Rocket Launcher|rocket]] through them. In an early GTA III commercial, the Airtrain is seen being destroyed by the rocket. This feature can be enabled through Silent's [http://www.gtagarage.com/mods/show.php?id=26526 "Destroyable Airtrain"] mod.


==Format==
== Format ==
The file starts with the number of coordinates that will be used in the file. The rest of the file are X, Y, and Z coordinates linked as a path in the game.
{|class="wikitable center-col-1"
!style="width: 4em;" |{{Icon|3}} {{Icon|VC}}
!style="width: 8em;" |Type
!Description
|-
!colspan="3" |Section 1: Number of path nodes
|-
|A ||integer ||The number of lines that are to be read from the file.
|-
!colspan="3" |Section 2: Path nodes
|-
|A,B,C ||float[3] ||X, Y, Z coordinates, each line linked to create a path
|}
For <code>flight.dat</code> in GTA III, if the point is below the ground, the game internally replaces the z-coordinate with the ground z at that point. In GTA Vice City, the game internally replaces any z-coordinate below 14.0 with 14.0. This is primarily used to determine the landing and takeoff points and allow aircraft to taxi on the surface.


==Using It==
== Mission script ==
The following is for GTA3 only. Opcode [[0358]] is used to create the Dodo in GTA3 to follow the path from the flight4.dat file. Opcode [[0359]] checks if the Dodo is destroyed. Opcode [[033A]] creates the Dodo in GTA3 to follow the path from the flight3.dat file. Opcode [[033B]] checks if the Dodo landed on the ground and opcode [[033C]] checks if the Dodo is destroyed. Opcode [[035A]] gets the coordinates of both of the Dodos.
These opcodes can be used in GTA III to spawn and check the Dodo along the flight paths.
* 033A, spawns a Dodo to follow the path from the <code>flight3.dat</code> file
* 033B, checks if the flight3 Dodo has completed the trip
* 033C, checks if the flight3 Dodo has been shot down
* 0358, spawns a Dodo to follow the path from the <code>flight4.dat</code> file
* 0359, checks if the flight4 Dodo has been shot down
* 035A, gets the coordinates of the flight3 Dodo
* 03A6, gets the coordinates of the flight4 Dodo


==Current Usage==
{{fdl}}
Not much is known about these files other than what is above.
{{3-navi}}
 
{{VC-navi}}
[[Category:Map Formats]][[Category:GTA III Modifications]][[Category:GTA Vice City]]{{fdl}}
[[Category:Map Formats]]

Latest revision as of 13:17, 21 July 2018

A flight path is a set of points that plots the path for an NPC flying vehicle in Grand Theft Auto III and Grand Theft Auto: Vice City. It is defined in a flight*.dat file located in the \data\paths\ directory. The following files contain paths for these flying vehicles:

GTA III GTA Vice City
flight.dat Airtrain
flight2.dat DeadDodo
flight3.dat DeadDodo used in "S.A.M." Police Maverick
flight4.dat DeadDodo used in "A Drop In The Ocean"

These flying vehicles are not solid so you cannot collide into them and there are no drivers in them. DeadDodos can be destroyed by shooting a rocket through them. In an early GTA III commercial, the Airtrain is seen being destroyed by the rocket. This feature can be enabled through Silent's "Destroyable Airtrain" mod.

Format

GTA III GTA Vice City Type Description
Section 1: Number of path nodes
A integer The number of lines that are to be read from the file.
Section 2: Path nodes
A,B,C float[3] X, Y, Z coordinates, each line linked to create a path

For flight.dat in GTA III, if the point is below the ground, the game internally replaces the z-coordinate with the ground z at that point. In GTA Vice City, the game internally replaces any z-coordinate below 14.0 with 14.0. This is primarily used to determine the landing and takeoff points and allow aircraft to taxi on the surface.

Mission script

These opcodes can be used in GTA III to spawn and check the Dodo along the flight paths.

  • 033A, spawns a Dodo to follow the path from the flight3.dat file
  • 033B, checks if the flight3 Dodo has completed the trip
  • 033C, checks if the flight3 Dodo has been shot down
  • 0358, spawns a Dodo to follow the path from the flight4.dat file
  • 0359, checks if the flight4 Dodo has been shot down
  • 035A, gets the coordinates of the flight3 Dodo
  • 03A6, gets the coordinates of the flight4 Dodo
Copyrighted

This page is licensed under the GNU Free Documentation Licence. This page has a separate license to the CC-BY-SA that applies to most of Grand Theft Wiki.

The full text of the GNU FDL v1.2 is here. Click the "History" button to see the full list of authors. See Grand Theft Wiki:Copyright for more detail on our copyright policy.

GNU Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
See Grand Theft Wiki:Copyright for more information.