Difference between revisions of "DCS Class Airbase"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
(3 intermediate revisions by one other user not shown)
Line 10: Line 10:
 
|desc= Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
 
|desc= Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
  
|type= Airbase.Category enumerator that stores types of airbases by category.
+
|type= Airbase.Category enumerator that stores types of airbases.
 
+
Note that Airbase.Category values are <u>not</u> obtained by calling ''airbase'':getCategory() - that calls Object.getCategory(''airbase'') and will <u>always</u> return the value Object.Category.BASE.  Instead you need to use ''airbase'':getDesc().category to obtain the Airbase.Category!
 
  Airbase.Category = {
 
  Airbase.Category = {
   AIRDROME,
+
   AIRDROME = 0,
   HELIPAD,
+
   HELIPAD = 1,  
   SHIP
+
   SHIP = 2,
 
   
 
   
  
Line 22: Line 22:
 
   category = Airbase.Category
 
   category = Airbase.Category
 
  }
 
  }
 +
A sample return of getDesc() on an airbase.
 +
 +
    {
 +
        ["life"] = 3600,
 +
        ["attributes"] = {
 +
            ["Airfields"] = true,
 +
        },
 +
        ["_origin"] = "",
 +
        ["category"] = 0,
 +
        ["typeName"] = "Anapa-Vityazevo",
 +
        ["displayName"] = "Anapa-Vityazevo", 
 +
    }
  
 
|staticFuncs= [[DCS_func_getByName|Airbase.getByName]]
 
|staticFuncs= [[DCS_func_getByName|Airbase.getByName]]
Line 42: Line 54:
  
 
}}
 
}}
 +
[[Category:Game Patch 1.2.4|Airbase class]]

Latest revision as of 00:53, 4 January 2023

Scripting Root

Class Name: Airbase Added with: 1.2.4
Extends: none
Inherits: Object, Coalition Object
Description: Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
Member Functions: getCallsign, getUnit, getID, getCategoryEx, getParking, getRunways, getTechObjectPos, getDispatcherTowerPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,

Inherited from Object Class: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Inherited from Coalition Object Class: getCoalition, getCountry

Obtained Via: Static Functions Functions Events
Airbase.getByName

Airbase.getDescByName

coalition.getAirbases takeoff, land, base_captured

For ships: shot, hit, dead, birth, shooting_start, shooting_end

Enumerator Types: Airbase.Category enumerator that stores types of airbases.

Note that Airbase.Category values are not obtained by calling airbase:getCategory() - that calls Object.getCategory(airbase) and will always return the value Object.Category.BASE. Instead you need to use airbase:getDesc().category to obtain the Airbase.Category!

Airbase.Category = {
  AIRDROME = 0,
  HELIPAD = 1, 
  SHIP = 2,
Description Table Structure: Airbase Description Table
Airbase.Desc = extends Desc {
  category = Airbase.Category
}

A sample return of getDesc() on an airbase.

   { 
       ["life"] = 3600, 
       ["attributes"] = { 
           ["Airfields"] = true, 
       }, 
       ["_origin"] = "", 
       ["category"] = 0, 
       ["typeName"] = "Anapa-Vityazevo", 
       ["displayName"] = "Anapa-Vityazevo",  
   }
Notes: