getShotInfo: Difference between revisions

From Bohemia Interactive Community
No edit summary
No edit summary
 
Line 12: Line 12:
|p1= shot: [[Object]] - shot projectile
|p1= shot: [[Object]] - shot projectile


|r1= [[Array]] in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion], where:
|r1= [[Array]] in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion, shotParent, shotInstigator], where:


* 0 - effectiveTimeToLive: [[Number]] - how much more shot has to live.
* 0 - effectiveTimeToLive: [[Number]] - how much more shot has to live.
Line 22: Line 22:
* 6 - isSubmunitionTriggered: [[Boolean]] - [[true]] if the shot contains submunition and it is triggered.
* 6 - isSubmunitionTriggered: [[Boolean]] - [[true]] if the shot contains submunition and it is triggered.
* 7 - isSetForDeletion: [[Boolean]] - [[true]] if the shot is already set for deletion but not yet removed from the scene.
* 7 - isSetForDeletion: [[Boolean]] - [[true]] if the shot is already set for deletion but not yet removed from the scene.
* 8 - shotParent: [[Object]] - the vehicle that produced shot.
* 8 - {{GVI|arma3|2.22}} shotParent: [[Object]] - the vehicle that produced shot.
* 9 - shotInstigator: [[Object]] - the person who pulled the trigger.
* 9 - {{GVI|arma3|2.22}} shotInstigator: [[Object]] - the person who pulled the trigger.


|s2= shot [[getShotInfo]] index
|s2= shot [[getShotInfo]] index

Latest revision as of 16:08, 17 December 2025

Hover & click on the images for description

Description

Description:
Returns various properties for the given shot.
Groups:
Object Manipulation

Syntax

Syntax:
getShotInfo shot
Parameters:
shot: Object - shot projectile
Return Value:
Array in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion, shotParent, shotInstigator], where:
  • 0 - effectiveTimeToLive: Number - how much more shot has to live.
  • 1 - fuseDistanceLeft: Number - how long shot has to travel more to get fused (undebarrel grenade for example).
  • 2 - timeToExplosion: Number - how long before shot fuse explodes (hand grenade for example) Arma 3 logo black.png 2.20 works on mines too.
  • 3 - triggerIsForced: Boolean - true if shot ammo was triggered with triggerAmmo.
  • 4 - shownTracer: Boolean - true if the shot shown as tracer.
  • 5 - isReal: Boolean - true if the shot is considered in damage events.
  • 6 - isSubmunitionTriggered: Boolean - true if the shot contains submunition and it is triggered.
  • 7 - isSetForDeletion: Boolean - true if the shot is already set for deletion but not yet removed from the scene.
  • 8 - Arma 3 logo black.png 2.22 shotParent: Object - the vehicle that produced shot.
  • 9 - Arma 3 logo black.png 2.22 shotInstigator: Object - the person who pulled the trigger.

Alternative Syntax

Syntax:
shot getShotInfo index
Parameters:
shot: Object - shot projectile
index: Number - property index (see main syntax, for example 1 for fuseDistanceLeft)
Return Value:
Anything - depends on the requested property, or Nothing

Examples

Example 1:
private _shotInfo = getShotInfo shot1;
Example 2:
private _fuseDistanceLeft = shot1 getShotInfo 1;

Additional Information

See also:
getShotParents missileTarget triggerAmmo getObjectType getObjectTextures objectParent setVelocityTransformation getUnitFreefallInfo getEntityInfo getModelInfo

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note