Difference between revisions of "DCS func getParking"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= getParking |vNum= 2.5.2 |par1= Airbase |par2= |par3= |par4= |desc= Returns a table of parking data for a given airb...")
 
Line 13: Line 13:
 
|par4=
 
|par4=
  
|desc= Returns a table of parking data for a given airbase. If the optional value is passed only available parking will be returned, otherwise all parking at the base is returned. Term types have a value of 16, 68, or 104.
+
|desc= Returns a table of parking data for a given airbase. If the optional value is passed only available parking will be returned, otherwise all parking at the base is returned. Term types have the following enumerated values:
 +
  16 : Valid spawn points on runway
 +
  40 : Helicopter only spawn 
 +
  68 : Hardened Air Shelter
 +
  72 : Open/Shelter air airplane only
 +
  104: Open air spawn
 +
 
 +
Note that only Caucuses will return 68 as it is the only map currently with hardened air shelters.
 +
 
 +
104 are also generally larger, but does not guarantee a large aircraft like the B-52 or a C-130 are capable of spawning there.
 +
 
  
 
Term_index is the id for the parking
 
Term_index is the id for the parking

Revision as of 09:45, 31 May 2018

Scripting Root

Envrioment: Mission Scripting
Function: getParking Added with: 2.5.2
Member Of: Airbase
Syntax: table Airbase.getParking(Class Self , boolean available)
Description: Returns a table of parking data for a given airbase. If the optional value is passed only available parking will be returned, otherwise all parking at the base is returned. Term types have the following enumerated values:
 16 : Valid spawn points on runway
 40 : Helicopter only spawn  
 68 : Hardened Air Shelter
 72 : Open/Shelter air airplane only
 104: Open air spawn

Note that only Caucuses will return 68 as it is the only map currently with hardened air shelters.

104 are also generally larger, but does not guarantee a large aircraft like the B-52 or a C-130 are capable of spawning there.


Term_index is the id for the parking

vTerminal pos is its vec3 position in the world

fDistToRW is the distance to the take-off position for the active runway from the parking.


Return Value: table
Return Example: Table:
 [1] = 
 {
  ["Term_Index"] = 56,
  ["vTerminalPos"] = 
  {
   ["y"] = 20.010303497314,
   ["x"] = -7676.2456054688,
   ["z"] = 293953.5625,
  }, -- end of ["vTerminalPos"]
  ["TO_AC"] = false,
  ["Term_Index_0"] = -1,
  ["Term_Type"] = 68,
  ["fDistToRW"] = 451.77697753906,
}, -- end of [3]
[2] = 
{
  ["Term_Index"] = 55,
  ["vTerminalPos"] = 
  {
   ["y"] = 20.010303497314,
   ["x"] = -7178.9565429688,
   ["z"] = 294729.28125,
  }, -- end of ["vTerminalPos"]
  ["TO_AC"] = false,
  ["Term_Index_0"] = -1,
  ["Term_Type"] = 104,
  ["fDistToRW"] = 1477.7482910156,
}
Examples:
Related Functions: Airbase Functions: getCallsign, getUnit, getID, getCategoryEx, getParking, getRunways, getTechObjectPos, getDispatcherTowerPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,
Notes: Function is WIP and is subject to change from its initial implementation in 2.5.2.