Module Wrapper.Airbase
Wrapper -- AIRBASE is a wrapper class to handle the DCS Airbase objects.
Author: FlightControl
Contributions: funkyfranky
Global(s)
Global AIRBASE |
Wrapper class to handle the DCS Airbase objects:
|
Wrapper class to handle the DCS Airbase objects:
- Support all DCS Airbase APIs.
- Enhance with Airbase specific APIs not in the DCS Airbase API set.
AIRBASE reference methods
For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the _DATABASE object. This is done at the beginning of the mission (when the mission starts).
The AIRBASE class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference using the DCS Airbase or the DCS AirbaseName.
Another thing to know is that AIRBASE objects do not "contain" the DCS Airbase object. The AIRBASE methods will reference the DCS Airbase object by name when it is needed during API execution. If the DCS Airbase object does not exist or is nil, the AIRBASE methods will return nil and log an exception in the DCS.log file.
The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:
- AIRBASE.Find(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase object.
- AIRBASE.FindByName(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase name.
IMPORTANT: ONE SHOULD NEVER SANATIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).
DCS Airbase APIs
The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method. To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() is implemented in the AIRBASE class as AIRBASE.GetName().
Type(s)
| Fields and Methods inherited from AIRBASE | Description |
|---|---|
|
Enumeration to identify the airbases in the Caucasus region. |
|
|
Function that checks if at leat one unit of a group has been spawned close to a spawn point on the runway. |
|
|
Finds a AIRBASE from the _DATABASE using a DCSAirbase object. |
|
|
Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase. |
|
|
Seach unoccupied parking spots at the airbase for a specific group of aircraft. |
|
|
Get all airbases of the current map. |
|
|
Get the DCS object of an airbase |
|
|
Get the coordinates of free parking spots at an airbase. |
|
|
Get number of free parking spots at an airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Returns a table of parking data for a given airbase. |
|
|
Get the coordinates of all parking spots at an airbase. |
|
|
Get number of parking spots at an airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Get the airbase zone. |
|
|
Place markers of parking spots on the F10 map. |
|
|
These are all airbases of Nevada:
|
|
|
These are all airbases of Normandy:
|
|
|
These are all airbases of the Persion Gulf Map:
|
|
|
Create a new AIRBASE from DCSAirbase. |
|
|
Helper function to check for the correct terminal type including "artificial" ones. |
| Fields and Methods inherited from POSITIONABLE | Description |
|---|---|
|
Add cargo. |
|
|
Get cargo item count. |
|
|
Clear all cargo. |
|
|
Destroys the POSITIONABLE. |
|
|
Signal a flare at the position of the POSITIONABLE. |
|
|
Signal a green flare at the position of the POSITIONABLE. |
|
|
Signal a red flare at the position of the POSITIONABLE. |
|
|
Signal a white flare at the position of the POSITIONABLE. |
|
|
Signal a yellow flare at the position of the POSITIONABLE. |
|
|
Returns the altitude of the POSITIONABLE. |
|
|
Returns the Angle of Attack of a positionable. |
|
|
Create a Core.Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals |
|
|
Get the bounding box of the underlying POSITIONABLE DCS Object. |
|
|
Get the bounding radius of the underlying POSITIONABLE DCS Object. |
|
|
Get all contained cargo. |
|
|
Get Cargo Bay Free Weight in kg. |
|
|
Returns the unit's climb or descent angle. |
|
|
Returns a COORDINATE object indicating the point in 3D of the POSITIONABLE within the mission. |
|
|
Returns the POSITIONABLE heading in degrees. |
|
|
Returns the POSITIONABLE height in meters. |
|
|
Get the last assigned laser code |
|
|
Returns a message with the callsign embedded (if there is one). |
|
|
Returns the message text with the callsign embedded (if there is one). |
|
|
Returns a message of a specified type with the callsign embedded (if there is one). |
|
|
Returns a {@DCS#Vec3} table of the objects current orientation in 3D space. |
|
|
Returns a {@DCS#Vec3} table of the objects current X orientation in 3D space, i.e. |
|
|
Returns a {@DCS#Vec3} table of the objects current Y orientation in 3D space, i.e. |
|
|
Returns a {@DCS#Vec3} table of the objects current Z orientation in 3D space, i.e. |
|
|
Returns the pitch angle of a unit. |
|
|
Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission. |
|
|
Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission. |
|
|
Returns a pos3 table of the objects current position and orientation in 3D space. |
|
|
Returns the DCS#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission. |
|
|
Create a Core.Radio#RADIO, to allow radio transmission for this POSITIONABLE. |
|
|
Returns a random DCS#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission. |
|
|
Returns the roll angle of a unit. |
|
|
Get the Spot |
|
|
Returns the DCS#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission. |
|
|
Returns the DCS#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission. |
|
|
Returns the a Velocity object from the positionable. |
|
|
Returns the POSITIONABLE velocity in km/h. |
|
|
Returns the POSITIONABLE velocity in meters per second. |
|
|
Returns the POSITIONABLE velocity Vec3 vector. |
|
|
Returns the yaw angle of a unit. |
|
|
Returns if carrier has given cargo. |
|
|
Returns true if the POSITIONABLE is in the air. |
|
|
Returns if the Positionable is located above a runway. |
|
|
Returns if the unit is of an air category. |
|
|
Is cargo bay empty. |
|
|
Returns if the unit is of an ground category. |
|
|
Check if the POSITIONABLE is lasing a target |
|
|
Stop Lasing a POSITIONABLE |
|
|
Start Lasing a POSITIONABLE |
|
|
Send a message to the players in the Wrapper.Group. |
|
|
Send a message to all coalitions. |
|
|
Send a message to the blue coalition. |
|
|
Send a message to a client. |
|
AIRBASE:MessageToCoalition(Message, Duration, MessageCoalition, Name) |
Send a message to a coalition. |
AIRBASE:MessageToGroup(Message, Duration, MessageGroup, Name) |
Send a message to a Wrapper.Group. |
|
Send a message to the red coalition. |
|
AIRBASE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name) |
Send a message to a Core.Set#SET_GROUP. |
AIRBASE:MessageTypeToCoalition(Message, MessageType, MessageCoalition, Name) |
Send a message to a coalition. |
AIRBASE:MessageTypeToGroup(Message, MessageType, MessageGroup, Name) |
Send a message of a message type to a Wrapper.Group. |
|
Create a new POSITIONABLE from a DCSPositionable |
|
|
Remove cargo. |
|
|
Set Cargo Bay Weight Limit in kg. |
|
|
Smoke the POSITIONABLE. |
|
|
Smoke the POSITIONABLE Blue. |
|
|
Smoke the POSITIONABLE Green. |
|
|
Smoke the POSITIONABLE Orange. |
|
|
Smoke the POSITIONABLE Red. |
|
|
Smoke the POSITIONABLE White. |
|
| Fields and Methods inherited from IDENTIFIABLE | Description |
|---|---|
|
Gets the CallSign of the IDENTIFIABLE, which is a blank by default. |
|
|
Returns category of the DCS Identifiable. |
|
|
Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor. |
|
|
Returns coalition of the Identifiable. |
|
|
Returns the name of the coalition of the Identifiable. |
|
|
Returns country of the Identifiable. |
|
|
Returns country name of the Identifiable. |
|
|
Returns Identifiable descriptor. |
|
|
Returns DCS Identifiable object name. |
|
|
Returns the type name of the DCS Identifiable. |
|
|
Check if the Object has the attribute. |
|
|
The name of the identifiable. |
|
|
Returns if the Identifiable is alive. |
|
|
Create a new IDENTIFIABLE from a DCSIdentifiable |
| Fields and Methods inherited from OBJECT | Description |
|---|---|
|
Destroys the OBJECT. |
|
|
Returns the unit's unique identifier. |
|
|
Create a new OBJECT from a DCSObject |
|
|
The name of the Object. |
| Fields and Methods inherited from BASE | Description |
|---|---|
|
The ID number of the class. |
|
|
The name of the class. |
|
|
The name of the class concatenated with the ID number of the class. |
|
|
Clear the state of an object. |
|
AIRBASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
|
Creation of a Remove Unit Event. |
|
|
Creation of a Takeoff Event. |
|
|
Log an exception which will be traced always. |
|
|
Returns the event dispatcher |
|
|
Remove all subscribed events |
|
|
Trace a function call. |
|
|
Trace a function call level 2. |
|
|
Trace a function call level 3. |
|
|
Get the ClassID of the class instance. |
|
|
Get the ClassName of the class instance. |
|
|
Get the ClassName + ClassID of the class instance. |
|
|
Get the Class Event processing Priority. |
|
|
This is the worker method to retrieve the Parent class. |
|
|
Get a Value given a Key from the Object. |
|
|
Subscribe to a DCS Event. |
|
|
Log an information which will be traced always. |
|
|
This is the worker method to inherit from a parent class. |
|
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
|
Enquires if tracing is on (for the class). |
|
|
BASE constructor. |
|
|
Occurs when an object is completely destroyed. |
|
|
Occurs when a ground unit captures either an airbase or a farp. |
|
|
Occurs when any object is spawned into the mission. |
|
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
|
Occurs when an object is dead. |
|
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
Occurs when any aircraft shuts down its engines. |
|
|
Occurs when any aircraft starts its engines. |
|
|
Occurs whenever an object is hit by a weapon. |
|
|
Occurs when any system fails on a human controlled aircraft. |
|
|
Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on. |
|
|
Occurs when a mission ends |
|
|
Occurs when a mission starts |
|
|
Occurs when the pilot of an aircraft is killed. |
|
|
Occurs when any player assumes direct control of a unit. |
|
|
Occurs when any player relieves control of a unit to the AI. |
|
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
|
Occurs when an aircraft is finished taking fuel. |
|
|
Occurs when any unit stops firing its weapon. |
|
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
|
Occurs whenever any unit in a mission fires a weapon. |
|
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
|
Schedule a new time event. |
|
AIRBASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class Event processing Priority. |
|
|
Set a state or property of the Object given a Key and a Value. |
|
|
Trace a function logic level 1. |
|
|
Trace a function logic level 2. |
|
|
Trace a function logic level 3. |
|
|
Trace all methods in MOOSE |
|
|
Set tracing for a class |
|
|
Set tracing for a specific method of class |
|
|
Set trace level |
|
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
|
UnSubscribe to a DCS event. |
|
AIRBASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
AIRBASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from AIRBASE.ParkingSpot | Description |
|---|---|
|
Coordinate of the parking spot. |
|
|
Distance to runway in meters. Currently bugged and giving the same number as the TerminalID. |
|
|
This spot is currently free, i.e. there is no alive aircraft on it at the present moment. |
|
|
Takeoff or landing aircarft. I.e. this stop is occupied currently by an aircraft until it took of or until it landed. |
|
|
Terminal ID of the spot. Generally, this is not the same number as displayed in the mission editor. |
|
|
Unknown what this means. If you know, please tell us! |
|
|
Type of the spot, i.e. for which type of aircraft it can be used. |
| Fields and Methods inherited from AIRBASE.TerminalType | Description |
|---|---|
|
244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft. |
|
|
40: Special spots for Helicopers. |
|
|
216: Combines HelicopterOnly, OpenMed and OpenBig. |
|
|
104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there. |
|
|
72: Open/Shelter air airplane only. |
|
|
176: Combines OpenMed and OpenBig spots. |
|
|
16: Valid spawn points on runway. |
|
|
68: Hardened Air Shelter. Currently only on Caucaus map. |
Field(s)
Enumeration to identify the airbases in the Caucasus region.
These are all airbases of Caucasus:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
These are all airbases of Nevada:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mellan_Airstrip
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport_3Q0
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
These are all airbases of Normandy:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
These are all airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Kochak
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Kerman_Airport
Function(s)
Function that checks if at leat one unit of a group has been spawned close to a spawn point on the runway.
Defined in:
AIRBASE
Parameters:
Wrapper.Group#GROUP group
Group to be checked.
#number radius
Radius around the spawn point to be checked. Default is 50 m.
#boolean despawn
If true, the group is destroyed.
Return value:
#boolean:
True if group is within radius around spawn points on runway.
Finds a AIRBASE from the _DATABASE using a DCSAirbase object.
Defined in:
AIRBASE
Parameter:
DCS#Airbase DCSAirbase
An existing DCS Airbase object reference.
Return value:
self
Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.
Seach unoccupied parking spots at the airbase for a specific group of aircraft.
The routine also optionally checks for other unit, static and scenery options in a certain radius around the parking spot. The dimension of the spawned aircraft and of the potential obstacle are taken into account. Note that the routine can only return so many spots that are free.
Defined in:
AIRBASE
Parameters:
Wrapper.Group#GROUP group
Aircraft group for which the parking spots are requested.
#AIRBASE.TerminalType terminaltype
(Optional) Only search spots at a specific terminal type. Default is all types execpt on runway.
#number scanradius
(Optional) Radius in meters around parking spot to scan for obstacles. Default 50 m.
#boolean scanunits
(Optional) Scan for units as obstacles. Default true.
#boolean scanstatics
(Optional) Scan for statics as obstacles. Default true.
#boolean scanscenery
(Optional) Scan for scenery as obstacles. Default false. Can cause problems with e.g. shelters.
#boolean verysafe
(Optional) If true, wait until an aircraft has taken off until the parking spot is considered to be free. Defaul false.
#number nspots
(Optional) Number of freeparking spots requested. Default is the number of aircraft in the group.
#table parkingdata
(Optional) Parking spots data table. If not given it is automatically derived from the GetParkingSpotsTable() function.
Return value:
#table:
Table of coordinates and terminal IDs of free parking spots. Each table entry has the elements .Coordinate and .TerminalID.
Get all airbases of the current map.
This includes ships and FARPS.
Defined in:
AIRBASE
Parameter:
DCS#Coalition coalition
(Optional) Return only airbases belonging to the specified coalition. By default, all airbases of the map are returned.
Return value:
#table:
Table containing all airbase objects of the current map.
Get the DCS object of an airbase
Get the coordinates of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#table:
Table of coordinates of the free parking spots.
Get number of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#number:
Number of free parking spots at this airbase.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#table:
Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Returns a table of parking data for a given airbase.
If the optional parameter available is true 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.
Table entries:
- 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.
Defined in:
AIRBASE
Parameter:
#boolean available
If true, only available parking spots will be returned.
Return value:
#table:
Table with parking data. See https://wiki.hoggitworld.com/view/DCS_func_getParking
Get the coordinates of all parking spots at an airbase.
Optionally only those of a specific terminal type. Spots on runways are excluded if not explicitly requested by terminal type.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
(Optional) Terminal type. Default all.
Return value:
#table:
Table of coordinates of parking spots.
Get number of parking spots at an airbase.
Optionally, a specific terminal type can be requested.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
Terminal type of which the number of spots is counted. Default all spots but spawn points on runway.
Return value:
#number:
Number of parking spots at this airbase.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
Terminal type.
Return value:
#table:
Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Get the airbase zone.
Place markers of parking spots on the F10 map.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type for which marks should be placed.
#boolean mark
If false, do not place markers but only give output to DCS.log file. Default true.
Create a new AIRBASE from DCSAirbase.
Defined in:
AIRBASE
Parameter:
#string AirbaseName
The name of the airbase.
Return value:
Helper function to check for the correct terminal type including "artificial" ones.
Defined in:
AIRBASE
Parameters:
#number Term_Type
Termial type from getParking routine.
#AIRBASE.TerminalType termtype
Terminal type from AIRBASE.TerminalType enumerator.
Return value:
#boolean:
True if terminal types match.
Field(s)
Enumeration to identify the airbases in the Caucasus region.
These are all airbases of Caucasus:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
These are all airbases of Nevada:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mellan_Airstrip
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport_3Q0
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
These are all airbases of Normandy:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
These are all airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Kochak
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Kerman_Airport
Function(s)
Add cargo.
Get cargo item count.
Destroys the POSITIONABLE.
Defined in:
Parameter:
#boolean GenerateEvent
(Optional) true if you want to generate a crash or dead event for the unit.
Return value:
#nil:
The DCS Unit is not existing or alive.
Usages:
-- Air unit example: destroy the Helicopter and generate a S_EVENT_CRASH for each unit in the Helicopter group. Helicopter = UNIT:FindByName( "Helicopter" ) Helicopter:Destroy( true )-- Ground unit example: destroy the Tanks and generate a S_EVENT_DEAD for each unit in the Tanks group. Tanks = UNIT:FindByName( "Tanks" ) Tanks:Destroy( true )-- Ship unit example: destroy the Ship silently. Ship = STATIC:FindByName( "Ship" ) Ship:Destroy()-- Destroy without event generation example. Ship = STATIC:FindByName( "Boat" ) Ship:Destroy( false ) -- Don't generate an event upon destruction.
Signal a flare at the position of the POSITIONABLE.
Signal a green flare at the position of the POSITIONABLE.
Defined in:
Signal a red flare at the position of the POSITIONABLE.
Defined in:
Signal a white flare at the position of the POSITIONABLE.
Defined in:
Signal a yellow flare at the position of the POSITIONABLE.
Defined in:
Returns the altitude of the POSITIONABLE.
Defined in:
Return values:
Returns the Angle of Attack of a positionable.
Create a Core.Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals
Get the bounding box of the underlying POSITIONABLE DCS Object.
Defined in:
Return values:
Get the bounding radius of the underlying POSITIONABLE DCS Object.
Defined in:
Parameter:
#number mindist
(Optional) If bounding box is smaller than this value, mindist is returned.
Return value:
The bounding radius of the POSITIONABLE or #nil if the POSITIONABLE is not existing or alive.
Get all contained cargo.
Get Cargo Bay Free Weight in kg.
Returns the unit's climb or descent angle.
Defined in:
Return value:
#number:
Climb or descent angle in degrees.
Returns a COORDINATE object indicating the point in 3D of the POSITIONABLE within the mission.
Defined in:
Return value:
The COORDINATE of the POSITIONABLE.
Returns the POSITIONABLE heading in degrees.
Defined in:
Return values:
#number:
The POSITIONABLE heading
#nil:
The POSITIONABLE is not existing or alive.
Returns the POSITIONABLE height in meters.
Defined in:
Return values:
Get the last assigned laser code
Returns a message with the callsign embedded (if there is one).
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Return value:
Returns the message text with the callsign embedded (if there is one).
Defined in:
Parameters:
#string Message
The message text
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Return value:
#string:
The message text
Returns a message of a specified type with the callsign embedded (if there is one).
Defined in:
Parameters:
#string Message
The message text
Core.Message#MESSAGE MessageType
MessageType The message type.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Return value:
Returns a {@DCS#Vec3} table of the objects current orientation in 3D space.
X, Y, Z values are unit vectors defining the objects orientation. X is the orientation parallel to the movement of the object, Z perpendicular and Y vertical orientation.
Defined in:
Return values:
Returns a {@DCS#Vec3} table of the objects current X orientation in 3D space, i.e.
along the direction of movement.
Defined in:
Return value:
X orientation, i.e. parallel to the direction of movement.
Returns a {@DCS#Vec3} table of the objects current Y orientation in 3D space, i.e.
vertical orientation.
Returns a {@DCS#Vec3} table of the objects current Z orientation in 3D space, i.e.
perpendicular to direction of movement.
Defined in:
Return value:
Z orientation, i.e. perpendicular to movement.
Returns the pitch angle of a unit.
Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.
Defined in:
Return values:
The 2D point vector of the POSITIONABLE.
#nil:
The POSITIONABLE is not existing or alive.
Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.
Defined in:
Return values:
The 3D point vector of the POSITIONABLE.
#nil:
The POSITIONABLE is not existing or alive.
Returns a pos3 table of the objects current position and orientation in 3D space.
X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin.
Defined in:
Return value:
Table consisting of the point and orientation tables.
Returns the DCS#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.
Defined in:
Return values:
The 3D position vectors of the POSITIONABLE.
#nil:
The POSITIONABLE is not existing or alive.
Create a Core.Radio#RADIO, to allow radio transmission for this POSITIONABLE.
Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message
Returns a random DCS#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.
Defined in:
Parameter:
#number Radius
Return values:
Usage:
-- If Radius is ignored, returns the DCS#Vec3 of first UNIT of the GROUP
Returns the roll angle of a unit.
Defined in:
Get the Spot
Returns the DCS#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.
Defined in:
Return values:
Returns the DCS#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.
Defined in:
Return values:
Returns the a Velocity object from the positionable.
Defined in:
Return values:
Velocity The Velocity object.
#nil:
The POSITIONABLE is not existing or alive.
Returns the POSITIONABLE velocity in km/h.
Returns the POSITIONABLE velocity in meters per second.
Defined in:
Return value:
#number:
The velocity in meters per second.
Returns the POSITIONABLE velocity Vec3 vector.
Defined in:
Return values:
Returns the yaw angle of a unit.
Returns if carrier has given cargo.
Defined in:
Parameter:
Cargo
Return value:
Cargo
Returns true if the POSITIONABLE is in the air.
Polymorphic, is overridden in GROUP and UNIT.
Defined in:
Return values:
#boolean:
true if in the air.
#nil:
The POSITIONABLE is not existing or alive.
Returns if the Positionable is located above a runway.
Defined in:
Return values:
#boolean:
true if Positionable is above a runway.
#nil:
The POSITIONABLE is not existing or alive.
Returns if the unit is of an air category.
If the unit is a helicopter or a plane, then this method will return true, otherwise false.
Defined in:
Return value:
#boolean:
Air category evaluation result.
Returns if the unit is of an ground category.
If the unit is a ground vehicle or infantry, this method will return true, otherwise false.
Defined in:
Return value:
#boolean:
Ground category evaluation result.
Check if the POSITIONABLE is lasing a target
Stop Lasing a POSITIONABLE
Start Lasing a POSITIONABLE
Send a message to the players in the Wrapper.Group.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to all coalitions.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to the blue coalition.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to a client.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
Wrapper.Client#CLIENT Client
The client object receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to a coalition.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
DCS#coalition MessageCoalition
The Coalition receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to a Wrapper.Group.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
Wrapper.Group#GROUP MessageGroup
The GROUP object receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to the red coalition.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to a Core.Set#SET_GROUP.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
DCS#Duration Duration
The duration of the message.
Core.Set#SET_GROUP MessageSetGroup
The SET_GROUP collection receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message to a coalition.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
Core.Message#MESSAGE.Type MessageType
The message type that determines the duration.
DCS#coalition MessageCoalition
The Coalition receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Send a message of a message type to a Wrapper.Group.
The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
Defined in:
Parameters:
#string Message
The message text
Core.Message#MESSAGE.Type MessageType
The message type that determines the duration.
Wrapper.Group#GROUP MessageGroup
The GROUP object receiving the message.
#string Name
(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
Create a new POSITIONABLE from a DCSPositionable
Defined in:
Parameter:
#string PositionableName
The POSITIONABLE name
Return value:
self
Remove cargo.
Set Cargo Bay Weight Limit in kg.
Smoke the POSITIONABLE.
Defined in:
Parameters:
Utilities.Utils#SMOKECOLOR SmokeColor
The color to smoke to positionable.
#number Range
The range in meters to randomize the smoking around the positionable.
#number AddHeight
The height in meters to add to the altitude of the positionable.
Field(s)
Enumeration to identify the airbases in the Caucasus region.
These are all airbases of Caucasus:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
These are all airbases of Nevada:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mellan_Airstrip
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport_3Q0
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
These are all airbases of Normandy:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
These are all airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Kochak
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Kerman_Airport
Function(s)
Gets the CallSign of the IDENTIFIABLE, which is a blank by default.
Defined in:
Return value:
#string:
The CallSign of the IDENTIFIABLE.
Returns category of the DCS Identifiable.
Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.
Defined in:
Return value:
#string:
The DCS Identifiable Category Name
Returns coalition of the Identifiable.
Defined in:
Return values:
Returns the name of the coalition of the Identifiable.
Defined in:
Return values:
#string:
The name of the coalition.
#nil:
The DCS Identifiable is not existing or alive.
Returns country of the Identifiable.
Defined in:
Return values:
Returns country name of the Identifiable.
Returns Identifiable descriptor.
Descriptor type depends on Identifiable category.
Defined in:
Return values:
Returns DCS Identifiable object name.
The function provides access to non-activated objects too.
Defined in:
Return values:
#string:
The name of the DCS Identifiable.
#nil:
The DCS Identifiable is not existing or alive.
Returns the type name of the DCS Identifiable.
Defined in:
Return values:
#string:
The type name of the DCS Identifiable.
#nil:
The DCS Identifiable is not existing or alive.
Check if the Object has the attribute.
Defined in:
Parameter:
#string AttributeName
The attribute name.
Return values:
#boolean:
true if the attribute exists.
#nil:
The DCS Identifiable is not existing or alive.
Returns if the Identifiable is alive.
If the Identifiable is not alive, nil is returned.
If the Identifiable is alive, true is returned.
Defined in:
Return values:
#boolean:
true if Identifiable is alive.
#nil:
if the Identifiable is not existing or is not alive.
Create a new IDENTIFIABLE from a DCSIdentifiable
Defined in:
Parameter:
#string IdentifiableName
The DCS Identifiable name
Return value:
self
Field(s)
Enumeration to identify the airbases in the Caucasus region.
These are all airbases of Caucasus:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
These are all airbases of Nevada:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mellan_Airstrip
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport_3Q0
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
These are all airbases of Normandy:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
These are all airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Kochak
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Kerman_Airport
Function(s)
Destroys the OBJECT.
Defined in:
Return values:
#boolean:
true if the object is destroyed.
#nil:
The DCS Unit is not existing or alive.
Returns the unit's unique identifier.
Defined in:
Return value:
ObjectID or #nil if the DCS Object is not existing or alive. Note that the ID is passed as a string and not a number.
Create a new OBJECT from a DCSObject
Field(s)
Enumeration to identify the airbases in the Caucasus region.
These are all airbases of Caucasus:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
These are all airbases of Nevada:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mellan_Airstrip
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport_3Q0
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
These are all airbases of Normandy:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
These are all airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Kochak
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Kerman_Airport
Function(s)
Clear the state of an object.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
StateName
The key that is should be cleared.
Creation of a Birth Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
#string IniUnitName
The initiating unit name.
place
subplace
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Dead Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Defined in:
Parameters:
#BASE Child
is the Child class from which the Parent class needs to be retrieved.
FromClass
Return value:
Get a Value given a Key from the Object.
Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS Event
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an object is completely destroyed.
initiator : The unit that is was destroyed.
Occurs when a ground unit captures either an airbase or a farp.
initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed
Occurs when an object is dead.
initiator : The unit that is dead.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
initiator : The unit that had the failure
Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.
Can be an Airbase Object, FARP, or Ships
Occurs when a mission ends
Occurs when a mission starts
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. initiator : The unit that the pilot has died in.
Occurs when any player assumes direct control of a unit.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
initiator : The unit that was receiving fuel.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. initiator : The unit that was doing the shooing.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. initiator : The unit that is doing the shooing. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#number:
The ScheduleID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure.
- The main event handling function... This function captures all events generated for the class.
@param #BASE self
@param DCS#Event event
AIRBASE.ParkingSpot ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Field(s)
Distance to runway in meters. Currently bugged and giving the same number as the TerminalID.
This spot is currently free, i.e. there is no alive aircraft on it at the present moment.
Takeoff or landing aircarft. I.e. this stop is occupied currently by an aircraft until it took of or until it landed.
Terminal ID of the spot. Generally, this is not the same number as displayed in the mission editor.
Unknown what this means. If you know, please tell us!
Type of the spot, i.e. for which type of aircraft it can be used.
Function(s)
Terminal Types of parking spots.
See also https://wiki.hoggitworld.com/view/DCS_func_getParking
Supported types are:
- AIRBASE.TerminalType.Runway = 16: Valid spawn points on runway.
- AIRBASE.TerminalType.HelicopterOnly = 40: Special spots for Helicopers.
- AIRBASE.TerminalType.Shelter = 68: Hardened Air Shelter. Currently only on Caucaus map.
- AIRBASE.TerminalType.OpenMed = 72: Open/Shelter air airplane only.
- AIRBASE.TerminalType.OpenBig = 104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there.
- AIRBASE.TerminalType.OpenMedOrBig = 176: Combines OpenMed and OpenBig spots.
- AIRBASE.TerminalType.HelicopterUnsable = 216: Combines HelicopterOnly, OpenMed and OpenBig.
- AIRBASE.TerminalType.FighterAircraft = 244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft.
Field(s)
244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft.
40: Special spots for Helicopers.
216: Combines HelicopterOnly, OpenMed and OpenBig.
104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there.
72: Open/Shelter air airplane only.
176: Combines OpenMed and OpenBig spots.
16: Valid spawn points on runway.
68: Hardened Air Shelter. Currently only on Caucaus map.