2.9.10.4160

interface l_Unit {
    Category: {
        AIRPLANE: number;
        GROUND_UNIT: number;
        HELICOPTER: number;
        SHIP: number;
        STRUCTURE: number;
    };
    className_: string;
    OpticType: { IR: number; LLTV: number; TV: number };
    parentClass_: {
        Category: {
            BASE: number;
            CARGO: number;
            SCENERY: number;
            STATIC: number;
            UNIT: number;
            VOID: number;
            WEAPON: number;
        };
        className_: string;
        database_: { getCategoryEx(...args: any[]): unknown };
        parentClass_: { className_: string };
        cancelChoosingCargo(...args: any[]): unknown;
        destroy(...args: any[]): unknown;
        getAttributes(...args: any[]): unknown;
        getCategory(...args: any[]): unknown;
        getName(...args: any[]): unknown;
        getPoint(...args: any[]): unknown;
        getPosition(...args: any[]): unknown;
        getTypeName(...args: any[]): unknown;
        getVelocity(...args: any[]): unknown;
        hasAttribute(...args: any[]): unknown;
        inAir(...args: any[]): unknown;
        isExist(...args: any[]): unknown;
        tonumber(...args: any[]): unknown;
    };
    RadarType: { AS: number; SS: number };
    RefuelingSystem: { BOOM_AND_RECEPTACLE: number; PROBE_AND_DROGUE: number };
    SensorType: { IRST: number; OPTIC: number; RADAR: number; RWR: number };
    canShipLanding(...args: any[]): unknown;
    checkOpenRamp(...args: any[]): unknown;
    disembarking(...args: any[]): unknown;
    enableEmission(...args: any[]): unknown;
    getAirbase(...args: any[]): unknown;
    getAmmo(): undefined | UnitAmmoItem[];
    getByName(name: string): undefined | l_Unit;
    getCallsign(...args: any[]): unknown;
    getCargosOnBoard(...args: any[]): unknown;
    getCategory(): number;
    getCategoryEx(...args: any[]): unknown;
    getCoalition(): number;
    getCommunicator(...args: any[]): unknown;
    getController(): l_Controller;
    getCountry(): number;
    getDesc(): UnitDesc;
    getDescByName(...args: any[]): unknown;
    getDescentCapacity(...args: any[]): unknown;
    getDescentOnBoard(...args: any[]): unknown;
    getDrawArgumentValue(...args: any[]): unknown;
    getForcesName(...args: any[]): unknown;
    getFuel(): number;
    getFuelLowState(...args: any[]): unknown;
    getGroup(...args: any[]): unknown;
    getID(): number;
    getLife(): number;
    getLife0(): number;
    getName(): string;
    getNearestCargos(...args: any[]): unknown;
    getNearestCargosForAircraft(...args: any[]): unknown;
    getNumber(...args: any[]): unknown;
    getObjectID(...args: any[]): unknown;
    getPlayerName(...args: any[]): unknown;
    getPoint(): l_Vec3;
    getPosition(): l_Position3;
    getRadar(...args: any[]): unknown;
    getSeats(...args: any[]): unknown;
    getSensors(...args: any[]): unknown;
    getTypeName(): string;
    getVelocity(): l_Vec3;
    hasCarrier(...args: any[]): unknown;
    hasSensors(...args: any[]): unknown;
    isActive(): boolean;
    LoadOnBoard(...args: any[]): unknown;
    markDisembarkingTask(...args: any[]): unknown;
    OldCarrierMenuShow(...args: any[]): unknown;
    openRamp(...args: any[]): unknown;
    tonumber(...args: any[]): unknown;
    UnloadCargo(...args: any[]): unknown;
    vtolableLA(...args: any[]): unknown;
}

Hierarchy (View Summary)

Properties

Category: {
    AIRPLANE: number;
    GROUND_UNIT: number;
    HELICOPTER: number;
    SHIP: number;
    STRUCTURE: number;
}
className_: string
OpticType: { IR: number; LLTV: number; TV: number }
parentClass_: {
    Category: {
        BASE: number;
        CARGO: number;
        SCENERY: number;
        STATIC: number;
        UNIT: number;
        VOID: number;
        WEAPON: number;
    };
    className_: string;
    database_: { getCategoryEx(...args: any[]): unknown };
    parentClass_: { className_: string };
    cancelChoosingCargo(...args: any[]): unknown;
    destroy(...args: any[]): unknown;
    getAttributes(...args: any[]): unknown;
    getCategory(...args: any[]): unknown;
    getName(...args: any[]): unknown;
    getPoint(...args: any[]): unknown;
    getPosition(...args: any[]): unknown;
    getTypeName(...args: any[]): unknown;
    getVelocity(...args: any[]): unknown;
    hasAttribute(...args: any[]): unknown;
    inAir(...args: any[]): unknown;
    isExist(...args: any[]): unknown;
    tonumber(...args: any[]): unknown;
}
RadarType: { AS: number; SS: number }
RefuelingSystem: { BOOM_AND_RECEPTACLE: number; PROBE_AND_DROGUE: number }
SensorType: { IRST: number; OPTIC: number; RADAR: number; RWR: number }

Methods

  • Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However, groups may have the same name as a unit or static object.

    This function can provide access to non activated units and groups.

    Parameters

    • name: string

    Returns undefined | l_Unit

  • Returns the controller of the specified object. Ships and ground units can only be controlled at a group level.

    Airplanes and helicopters can be controlled at both a group and unit level

    Returns l_Controller

  • Returns an enumerator that defines the country that an object currently belongs to

    Returns number

  • Returns a percentage of the current fuel remaining in an aircraft's inventory based on the maximum possible fuel load. Value ranges from 0.00 to 1.00. If external fuel tanks are present the value may display above 1.0. Fuel is always drained from the external tanks before moving to internal tanks. Ground vehicles and ships will always return a value of 1.

    Returns number

  • Returns a number which defines the unique mission id of a given object.

    Returns number

  • Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value.

    Returns number