Module Identifiable

Wrapper -- IDENTIFIABLE is an intermediate class wrapping DCS Object class derived Objects.


Author: FlightControl

Contributions:


Global(s)

IDENTIFIABLE

IDENTIFIABLE class, extends Object#OBJECT

The IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

  • Support all DCS Identifiable APIs.

Type IDENTIFIABLE

IDENTIFIABLE:GetCallsign()

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

IDENTIFIABLE:GetCategory()

Returns category of the DCS Identifiable.

IDENTIFIABLE:GetCategoryName()

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

IDENTIFIABLE:GetCoalition()

Returns coalition of the Identifiable.

IDENTIFIABLE:GetCoalitionName()

Returns the name of the coalition of the Identifiable.

IDENTIFIABLE:GetCountry()

Returns country of the Identifiable.

IDENTIFIABLE:GetDesc()

Returns Identifiable descriptor.

IDENTIFIABLE:GetName()

Returns DCS Identifiable object name.

IDENTIFIABLE:GetThreatLevel()
IDENTIFIABLE:GetTypeName()

Returns the type name of the DCS Identifiable.

IDENTIFIABLE:HasAttribute(AttributeName)

Check if the Object has the attribute.

IDENTIFIABLE.IdentifiableName

The name of the identifiable.

IDENTIFIABLE:IsAlive()

Returns if the Identifiable is alive.

IDENTIFIABLE:New(IdentifiableName)

Create a new IDENTIFIABLE from a DCSIdentifiable

Global(s)

#IDENTIFIABLE IDENTIFIABLE

IDENTIFIABLE class, extends Object#OBJECT

The IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

  • Support all DCS Identifiable APIs.
  • Enhance with Identifiable specific APIs not in the DCS Identifiable API set.
  • Manage the "state" of the DCS Identifiable.

IDENTIFIABLE constructor

The IDENTIFIABLE class provides the following functions to construct a IDENTIFIABLE instance:

Type Identifiable

Type IDENTIFIABLE

Extends Wrapper.Object#OBJECT

Field(s)

IDENTIFIABLE:GetCallsign()

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

Return value

#string: The CallSign of the IDENTIFIABLE.

IDENTIFIABLE:GetCategory()

Returns category of the DCS Identifiable.

Return value

Dcs.DCSWrapper.Object#Object.Category: The category ID

IDENTIFIABLE:GetCategoryName()

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

Return value

#string: The DCS Identifiable Category Name

IDENTIFIABLE:GetCoalition()

Returns coalition of the Identifiable.

Return values

  1. Dcs.DCSCoalitionWrapper.Object#coalition.side: The side of the coalition.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:GetCoalitionName()

Returns the name of the coalition of the Identifiable.

Return values

  1. #string: The name of the coalition.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:GetCountry()

Returns country of the Identifiable.

Return values

  1. Dcs.DCScountry#country.id: The country identifier.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:GetDesc()

Returns Identifiable descriptor.

Descriptor type depends on Identifiable category.

Return values

  1. Dcs.DCSWrapper.Identifiable#Identifiable.Desc: The Identifiable descriptor.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:GetName()

Returns DCS Identifiable object name.

The function provides access to non-activated objects too.

Return values

  1. #string: The name of the DCS Identifiable.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:GetThreatLevel()
IDENTIFIABLE:GetTypeName()

Returns the type name of the DCS Identifiable.

Return values

  1. #string: The type name of the DCS Identifiable.

  2. #nil: The DCS Identifiable is not existing or alive.

IDENTIFIABLE:HasAttribute(AttributeName)

Check if the Object has the attribute.

Parameter

  • #string AttributeName : The attribute name.

Return values

  1. #boolean: true if the attribute exists.

  2. #nil: The DCS Identifiable is not existing or alive.

#string IDENTIFIABLE.IdentifiableName

The name of the identifiable.

IDENTIFIABLE:IsAlive()

Returns if the Identifiable is alive.

If the Identifiable is not alive, nil is returned.
If the Identifiable is alive, true is returned.

Return values

  1. #boolean: true if Identifiable is alive.

  2. #nil: if the Identifiable is not existing or is not alive.

IDENTIFIABLE:New(IdentifiableName)

Create a new IDENTIFIABLE from a DCSIdentifiable

Parameter

Return value

#IDENTIFIABLE: self