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}}")
(Add Optional information)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2oa |Game name=
|game1= arma2oa
|version1= 1.50


|1.51|Game version=
|game2= tkoh
____________________________________________________________________________________________
|version2= 1.00


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


| vehicle '''aimedAtTarget''' [target, weapon] |SYNTAX=
|gr1= Object Manipulation


|gr1= Object Manipulation |GROUP1=
|gr2= Weapons


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


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


|p1= vehicle: [[Object]] |PARAMETER1=
|p1= vehicle: [[Object]] - vehicle only, not unit
|p2= [target, weapon]: [[Array]] |PARAMETER2=
|p3= target: [[Object]] |PARAMETER3=
|p4= weapon: [[String]] - (optional) |PARAMETER4=


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


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


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


<h3 style="display:none">Notes</h3>
|x1= <sqf>_aimingQuality = heli aimedAtTarget [target];</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on November 19, 2013
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]
<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.


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


<!-- Note Section END -->
|seealso= [[fireAtTarget]]
</dl>
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
 
|user= Killzone_Kid
[[Category:Arma 2: Operation Arrowhead: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
|timestamp= 20131119150200
{{GameCategory|arma2|Scripting Commands}}
|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.
{{GameCategory|arma3|Scripting Commands}}
1 doesn't mean you are going to hit the target, while 0 means you're definitely off.
{{GameCategory|tkoh|Scripting Commands}}
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

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.