DCS Class Weapon

From DCS World Wiki - Hoggitworld.com

Scripting Root

Class Name: Weapon Added with: 1.2.0
Inherits: Object, Coalition Object
Description: Represents a weapon object: shell, rocket, missile and bomb
Member Functions: getLauncher, getTarget

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
shot, hit, shooting_start, shooting_end
Enumerator Types: Weapon Flag is a complex enumerator used to describe the type of weapon. Information can be found on the linked page because it is a headache to summarize quickly.
  SHELL     0
  ROCKET    2
  BOMB      3
  INS                  1
  IR                   2
  RADAR_ACTIVE         3
  RADAR_PASSIVE        5
  TV                   6
  LASER                7
  TELE                 8
  AAM          1
  SAM          2
  BM           3
  ANTI_SHIP    4
  CRUISE       5
  OTHER        6
  AP                 0
  HE                 1
Description Table Structure: Common Weapon description table shared by all weapons:
Weapon.Desc = extends Object.Desc {
  category = enum Weapon.Category,
  warhead = {
    type = enum Weapon.WarheadType,
    mass = Mass,
    caliber = Distance,
    explosiveMass = Mass or nil, --for HE and AP(+HE) warheads only
    shapedExplosiveMass = Mass or nil, --for shaped explosive warheads only
    shapedExplosiveArmorThickness = Distance or nil ----for shaped explosive warheads only

Missile Description

Weapon.DescMissile = extends Weapon.Desc {    
  guidance = enum Weapon.GuidanceType,
  rangeMin = Distance,
  rangeMaxAltMin = Distance,
  rangeMaxAltMax = Distance,
  altMin = Distance,
  altMax = Distance,
  Nmax = number,
  fuseDist = Distance

Rocket Description

Weapon.DescRocket = extends Weapon.Desc {
  distMin = Distance,
  distMax = Distance

Bomb Description

Weapon.DescBomb = extends Weapon.Desc {    
  guidance = enum Weapon.GuidanceType,
  altMin = Distance,
  altMax = Distance,
Notes: Weapon objects can be gathered through the use of event handlers.