getShotInfo: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "↵|version1= 2.18↵↵|branch= dev↵" to " |version1= 2.18 ") |
||
(7 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.18 | |version1= 2.18 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
Line 12: | Line 10: | ||
|s1= [[getShotInfo]] shot | |s1= [[getShotInfo]] shot | ||
|p1= shot: [[Object]] | |p1= shot: [[Object]] - shot projectile | ||
|r1= [[Array]] in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered], where: | |r1= [[Array]] in format [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion], where: | ||
* 0 - effectiveTimeToLive: [[Number]] - how much more shot has to live. | * 0 - effectiveTimeToLive: [[Number]] - how much more shot has to live. | ||
Line 21: | Line 19: | ||
* 3 - triggerIsForced: [[Boolean]] - [[true]] if shot ammo was triggered with [[triggerAmmo]]. | * 3 - triggerIsForced: [[Boolean]] - [[true]] if shot ammo was triggered with [[triggerAmmo]]. | ||
* 4 - shownTracer: [[Boolean]] - [[true]] if the shot shown as tracer. | * 4 - shownTracer: [[Boolean]] - [[true]] if the shot shown as tracer. | ||
* 5 - isReal: [[Boolean]] - [[true]] | * 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. | * 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. | |||
|s2= shot [[getShotInfo]] index | |s2= shot [[getShotInfo]] index | ||
|p21= shot: [[Object]] | |p21= shot: [[Object]] - shot projectile | ||
|p22= index: [[Number]] - property index (see main syntax, for example 1 for fuseDistanceLeft) | |p22= index: [[Number]] - property index (see main syntax, for example 1 for fuseDistanceLeft) | ||
|r2= [[Anything]] - depends on the requested property, or [[Nothing]] | |r2= [[Anything]] - depends on the requested property, or [[Nothing]] | ||
Line 32: | Line 31: | ||
|x2= <sqf>private _fuseDistanceLeft = shot1 getShotInfo 1;</sqf> | |x2= <sqf>private _fuseDistanceLeft = shot1 getShotInfo 1;</sqf> | ||
|seealso= [[ | |seealso= [[getShotParents]] [[missileTarget]] [[triggerAmmo]] [[getObjectType]] [[getObjectTextures]] [[objectParent]] [[setVelocityTransformation]] [[getUnitFreefallInfo]] [[getEntityInfo]] [[getModelInfo]] | ||
}} | }} |
Latest revision as of 16:08, 8 October 2024
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], 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 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.
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:
- Example 2:
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 or on the Forums.
Only post proven facts here! Add Note