dcsext.objects.Weapon

Weapon class.

Contents

  1. Description
  2. Metamethods
    1. weapon:__init(wpn, initiator, timeout)
  3. Methods
    1. weapon:exist()
    2. weapon:hasImpacted()
    3. weapon:getDesc()
    4. weapon:getWarheadPower()
    5. weapon:getImpactPoint()
    6. weapon:update(time, lookahead)

Description

Is a representation of a DCS Weapon object.

Metamethods

weapon:__init(wpn, initiator, timeout)

Parameters

wpn
initiator
timeout

Methods

weapon:exist()

A Weapon is considered to ‘exist’ if it has not taken too long to impact something and the DCS Weapon object still exists.

Returns

  • true if the weapon still exists.

weapon:hasImpacted()

Returns

  • true if the Weapon is believed to have impacted something.

weapon:getDesc()

Returns

  • Weapon description.

weapon:getWarheadPower()

Returns

  • the mass of the explosive used in the warhead.

weapon:getImpactPoint()

This is the point where the weapon is predicted to intersect with the ground or was deleted by the game.

Returns

  • impact point or nil if the weapon has not impacted yet

weapon:update(time, lookahead)

Parameters

time
current game time step
lookahead
seconds to predict the weapon’s future position