aimedAtTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?]]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma2oa |Game name=
| arma2oa |Game name=


|1.51|Game version=
|1.51|Game version=
____________________________________________________________________________________________


| Returns how good the weapon of the vehicle is aimed at the target. |DESCRIPTION=
| Returns how good the weapon of the vehicle is aimed at the target. |DESCRIPTION=
____________________________________________________________________________________________


| vehicle '''aimedAtTarget''' [target, weapon] |SYNTAX=
| vehicle '''aimedAtTarget''' [target, weapon] |SYNTAX=
Line 23: Line 20:


| [[Number]] - 0...1 |RETURNVALUE=
| [[Number]] - 0...1 |RETURNVALUE=
____________________________________________________________________________________________
   
   
|x1= <code> _aimingQuality = heli [[aimedAtTarget]] [target];</code> |EXAMPLE1=
|x1= <code> _aimingQuality = heli [[aimedAtTarget]] [target];</code> |EXAMPLE1=
|x2= <code> _aimingQuality = heli [[aimedAtTarget]] [target,"M197"];</code> |EXAMPLE2=
|x2= <code> _aimingQuality = heli [[aimedAtTarget]] [target,"M197"];</code> |EXAMPLE2=
____________________________________________________________________________________________


| [[fireAtTarget]] |SEEALSO=
| [[fireAtTarget]] |SEEALSO=

Revision as of 01:10, 17 January 2021

Hover & click on the images for description

Description

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

Syntax

Syntax:
vehicle aimedAtTarget [target, weapon]
Parameters:
vehicle: Object
[target, weapon]: Array
target: Object
weapon: String - (optional)
Return Value:
Number - 0...1

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

Notes

Posted on November 19, 2013
Killzone_Kid
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.

Bottom Section