dcsext.objects.Weapon
Weapon class.
Contents
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