VR-Forces 5.2 Lua Function Documentation

Detonation

(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)

A collection of detonation parameters Includes the location of the detonation, munitionType of the detonation, the detonation result, Warhead type, fuse type, quanity in the detonation, and if more than one, rate of munitions.

Function List

getDetonationLocation ()
getDetonationResult () Returns the DIS enumeration representing the detonation result.
getFuze () Returns the DIS enumeration representing the fuze of the munition.
getMuntionType () Returns the munition type of the detonation
getQuantity () Returns the amount of munitions detonated in the event.
getRate () Returns the rate of fire, i.e.
getWarheadType () Returns the DIS enumeration representing the warhead of the munition.
isValid () Returns true if the detonation context is defined


Functions

getDetonationLocation ()

Return value:

    (Location3D) The location of the detonation
getDetonationResult ()
Returns the DIS enumeration representing the detonation result. Values are:
Other = 0,
EntityImpact = 1,
EntityProximate = 2,
GroundImpact = 3,
GroundProximate = 4,
Detonation = 5,
None = 6,
HE_HitSmall = 7,
HE_HitMedium = 8,
HE_HitLarge = 9,
ArmorPiercingHit = 10,
DirtBlastSmall = 11,
DirtBlastMedium = 12,
DirtBlastLarge = 13,
WaterBlastSmall = 14,
WaterBlastMedium = 15,
WaterBlastLarge = 16,
AirHit = 17,
BuildingHitSmall = 18,
BuildingHitMedium = 19,
BuildingHitLarge = 20,
MineClearingLineCharge = 21,
EnvironmentObjectImpact = 22,
EnvironmentObjectProximate = 23,
WaterImpact = 24,
AirBurst = 25

Return value:

    (integer) The DIS enumeration representing the detonation result
getFuze ()
Returns the DIS enumeration representing the fuze of the munition. See disEnums.h for DtDetonatorFuze enumerations

Return value:

    The DIS enumeration representing the fuze as an int.
getMuntionType ()
Returns the munition type of the detonation

Return value:

    (string) The entity type of the munition as a colon delimited string.
getQuantity ()
Returns the amount of munitions detonated in the event.

Return value:

    The quanity of munitions detonated as an int.
getRate ()
Returns the rate of fire, i.e. rounds per minute in the event.

Return value:

    The rate of fire, i.e. rounds per minute as an int.
getWarheadType ()
Returns the DIS enumeration representing the warhead of the munition. See disEnums.h for DtWarheadType enumerations

Return value:

    The IS enumeration representing the warhead as an int.
isValid ()
Returns true if the detonation context is defined

Return value:

    True if the detonation context is defined

Copyright© 2025 MAK Technologies, Inc. All rights reserved.