Module Object
This module contains the OBJECT class.
1) Object#OBJECT class, extends Base#BASE
The Object#OBJECT class is a wrapper class to handle the DCS Object objects:
- Support all DCS Object APIs.
- Enhance with Object specific APIs not in the DCS Object API set.
- Manage the "state" of the DCS Object.
1.1) OBJECT constructor:
The OBJECT class provides the following functions to construct a OBJECT instance:
- Object#OBJECT.New(): Create a OBJECT instance.
1.2) OBJECT methods:
The following methods can be used to identify an Object object:
- Object#OBJECT.GetID(): Returns the ID of the Object object.
Global(s)
| OBJECT |
Type DCSObject
| DCSObject.id_ |
The ID of the controllable in DCS |
Type OBJECT
| OBJECT.ClassName | |
| OBJECT:GetCallSign() |
Returns the Object's callsign - the localized string. |
| OBJECT:GetCategoryName() |
Returns the DCS Object category name as defined within the DCS Object Descriptor. |
| OBJECT:GetCoalition() |
Returns coalition of the Object. |
| OBJECT:GetCountry() |
Returns country of the Object. |
| OBJECT:GetDesc() |
Returns Object descriptor. |
| OBJECT:GetName() |
Returns DCS Object object name. |
| OBJECT:GetTypeName() |
Returns the type name of the DCS Object. |
| OBJECT:IsAlive() |
Returns if the Object is alive. |
| OBJECT:New(ObjectName) |
Create a new OBJECT from a DCSObject |
| OBJECT.ObjectName |
The name of the Object. |
Global(s)
Type Object
Type DCSObject
A DCSObject
Field(s)
- DCSObject.id_
-
The ID of the controllable in DCS
Type OBJECT
The OBJECT class
Field(s)
- #string OBJECT.ClassName
- OBJECT:GetCallSign()
-
Returns the Object's callsign - the localized string.
Return values
-
#string: The Callsign of the Object.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:GetCategoryName()
-
Returns the DCS Object category name as defined within the DCS Object Descriptor.
Return value
#string: The DCS Object Category Name
- OBJECT:GetCoalition()
-
Returns coalition of the Object.
Return values
-
DCSCoalitionObject#coalition.side: The side of the coalition.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:GetCountry()
-
Returns country of the Object.
Return values
-
DCScountry#country.id: The country identifier.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:GetDesc()
-
Returns Object descriptor.
Descriptor type depends on Object category.
Return values
-
DCSObject#Object.Desc: The Object descriptor.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:GetName()
-
Returns DCS Object object name.
The function provides access to non-activated objects too.
Return values
-
#string: The name of the DCS Object.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:GetTypeName()
-
Returns the type name of the DCS Object.
Return values
-
#string: The type name of the DCS Object.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:IsAlive()
-
Returns if the Object is alive.
Return values
-
#boolean: true if Object is alive.
-
#nil: The DCS Object is not existing or alive.
-
- OBJECT:New(ObjectName)
-
Create a new OBJECT from a DCSObject
Parameter
-
DCSObject#Object ObjectName: The Object name
Return value
#OBJECT: self
-
- #string OBJECT.ObjectName
-
The name of the Object.