aimedAtTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma2oa * +\| *1.([0-9]{2}) * *\|([^g]|g[^a])" to "| arma2oa |1.$1 |game2= tkoh |version2= 1.00 |game3= arma3 |version3= 0.50 |$2")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2oa
|game1= arma2oa
|1.51
|version1= 1.51


|game2= tkoh
|game2= tkoh
Line 10: Line 10:
|version3= 0.50
|version3= 0.50


| Returns how good the weapon of the vehicle is aimed at the target.
|gr1= Object Manipulation


| vehicle '''aimedAtTarget''' [target, weapon]
|gr2= Weapons


|gr1= Object Manipulation
|descr= Returns how good the weapon of the vehicle is aimed at the target.


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


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]]
|p2= [target, weapon]: [[Array]]
|p3= target: [[Object]]
|p4= weapon: [[String]] - (optional)


|r1=[[Number]] - 0...1
|p2= target: [[Object]]
 
|p3= weapon: [[String]] - (Optional)
 
|r1= [[Number]] in range 0..1


|x1= <code>_aimingQuality = heli [[aimedAtTarget]] [target];</code>
|x1= <code>_aimingQuality = heli [[aimedAtTarget]] [target];</code>
|x2= <code>_aimingQuality = heli [[aimedAtTarget]] [target,"M197"];</code>
 
|x2= <code>_aimingQuality = heli [[aimedAtTarget]] [target, "M197"];</code>


|seealso= [[fireAtTarget]]
|seealso= [[fireAtTarget]]
Line 38: Line 40:
<dd class="note">
<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.
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>
</dl>
[[Category:Arma 2: Operation Arrowhead: New Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 17:57, 13 June 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: Object
weapon: String - (Optional)
Return Value:
Number in range 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
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.