aimedAtTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - ">Posted on November ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-11-$1")
(Add Optional information)
 
Line 14: Line 14:
|gr2= Weapons
|gr2= Weapons


|descr= Returns how good the weapon of the vehicle is aimed at the target.
|descr= Returns how good a vehicle's weapon is aimed at the target.


|s1= vehicle [[aimedAtTarget]] [target, weapon]
|s1= vehicle [[aimedAtTarget]] [target, weapon]


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]] - vehicle only, not unit


|p2= target: [[Object]]
|p2= target: [[Object]]


|p3= weapon: [[String]] - (Optional)
|p3= weapon: [[String]] - (Optional) if not provided, checks all weapons; if provided, checks that weapon only


|r1= [[Number]] in range 0..1
|r1= [[Number]] in range 0..1 - 0 if no weapons or if ''weapon'' was provided and not found


|x1= <sqf>_aimingQuality = heli aimedAtTarget [target];</sqf>
|x1= <sqf>_aimingQuality = heli aimedAtTarget [target];</sqf>
Line 33: Line 33:
}}
}}


<dl class="command_description">
{{Note
 
|user= Killzone_Kid
<dt></dt>
|timestamp= 20131119150200
<dd class="notedate">Posted on 2013-11-19</dd>
|text= The command doesn't work with soldier weapons, only vehicle weapons (in {{arma3}} at least). The return value is either 1 or 0, very rarely the value falls in between.
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
1 doesn't mean you are going to hit the target, while 0 means you're definitely off.
<dd class="note">
}}
The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between. 1 doesn't mean you are going to hit the target, while 0 means you're definitely off.
</dd>
 
</dl>

Latest revision as of 13:17, 1 April 2024

Hover & click on the images for description

Description

Description:
Returns how good a vehicle's weapon is aimed at the target.
Groups:
Object ManipulationWeapons

Syntax

Syntax:
vehicle aimedAtTarget [target, weapon]
Parameters:
vehicle: Object - vehicle only, not unit
target: Object
weapon: String - (Optional) if not provided, checks all weapons; if provided, checks that weapon only
Return Value:
Number in range 0..1 - 0 if no weapons or if weapon was provided and not found

Examples

Example 1:
_aimingQuality = heli aimedAtTarget [target];
Example 2:
_aimingQuality = heli aimedAtTarget [target, "M197"];

Additional Information

See also:
fireAtTarget

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
Killzone_Kid - c
Posted on Nov 19, 2013 - 15:02 (UTC)
The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between. 1 doesn't mean you are going to hit the target, while 0 means you're definitely off.