DCS Class Unit: Difference between revisions

From DCS World Wiki - Hoggitworld.com
m 1 revision imported
 
No edit summary
Line 12: Line 12:
|type= enumerator for Unit categories
|type= enumerator for Unit categories
  Unit.Category = {
  Unit.Category = {
   AIRPLANE,
   AIRPLANE     = 0,
   HELICOPTER,
   HELICOPTER   = 1,
   GROUND_UNIT,
   GROUND_UNIT   = 2,
   SHIP,
   SHIP         = 3,
   STRUCTURE
   STRUCTURE     = 4
  }
  }


Refueling system
Refueling system
  Unit.RefuelingSystem = {
  Unit.RefuelingSystem = {
   BOOM_AND_RECEPTACLE,
   BOOM_AND_RECEPTACLE   = 0,
   PROBE_AND_DROGUE
   PROBE_AND_DROGUE     = 1
  }
  }


Line 28: Line 28:


  Unit.SensorType = {
  Unit.SensorType = {
   OPTIC,
   OPTIC     = 0,
   RADAR,
   RADAR     = 1,
   IRST,
   IRST     = 2,
   RWR
   RWR       = 3
  }
  }
Optic Types
Optic Types


  Unit.OpticType = {
  Unit.OpticType = {
   TV, --TV-sensor
   TV     = 0, --TV-sensor
   LLTV, --Low-level TV-sensor
   LLTV   = 1, --Low-level TV-sensor
   IR --Infra-Red optic sensor
   IR     = 2  --Infra-Red optic sensor
  }
  }


Line 44: Line 44:


  Unit.RadarType = {
  Unit.RadarType = {
   AS, --air search radar
   AS   = 0, --air search radar
   SS --surface/land search radar
   SS   = 1 --surface/land search radar
  }
  }
|structures=
|structures=

Revision as of 02:53, 16 April 2021

Scripting Root

Class Name: Unit Added with: 1.2.0
Extends:
Inherits: Object, Coalition Object
Description: Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
Member Functions: isActive, getPlayerName, getID, getNumber, getCategoryEx, getObjectID, getController, getGroup, getCallsign, getLife, getLife0, getFuel, getAmmo, getSensors, hasSensors, getRadar, getDrawArgumentValue, getNearestCargos, enableEmission, getDescentCapacity

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
Unit.getByName

Unit.getDescByName

Group Class Functions: getUnits, getUnit shot, hit, takeoff, land, crash, ejection, refueling, dead, pilot_dead, base_captured, refueling_stop, birth, human_failure, engine_startup, engine_shutdown, player_enter_unit, player_leave_unit, shooting_start, shooting_end
Enumerator Types: enumerator for Unit categories
Unit.Category = {
  AIRPLANE      = 0,
  HELICOPTER    = 1,
  GROUND_UNIT   = 2,
  SHIP          = 3,
  STRUCTURE     = 4
}

Refueling system

Unit.RefuelingSystem = {
  BOOM_AND_RECEPTACLE   = 0,
  PROBE_AND_DROGUE      = 1
}

Sensor Types

Unit.SensorType = {
  OPTIC     = 0,
  RADAR     = 1,
  IRST      = 2,
  RWR       = 3
}

Optic Types

Unit.OpticType = {
  TV     = 0, --TV-sensor
  LLTV   = 1, --Low-level TV-sensor
  IR     = 2  --Infra-Red optic sensor
}

Radar Types

Unit.RadarType = {
  AS    = 0, --air search radar
  SS    = 1 --surface/land search radar
}
Description Table Structure:
Notes: