getShotInfo

From Bohemia Interactive Community
Revision as of 18:33, 16 February 2024 by Killzone Kid (talk | contribs) (Created page with "{{RV|type=command |game1= arma3 |version1= 2.18 |branch= dev |gr1= Object Manipulation |descr= Returns various properties for the given shot. |s1= getShotInfo shot |...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.18.

Description

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

Syntax

Syntax:
getShotInfo shot
Parameters:
shot: Object
Return Value:
Array in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered], 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).
  • 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 is the shot is concidered in damage events.
  • 6 - isSubmunitionTriggered: Boolean - true if the shot contains submunition and it is triggered.

Alternative Syntax

Syntax:
shot getShotInfo index
Parameters:
shot: Object
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:
cursorObject cursorTarget createSimpleObject getObjectType getObjectTextures objectParent setVelocityTransformation getUnitFreefallInfo getEntityInfo getShotInfo

Notes

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