aimedAtTarget: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("serv...) |
Lou Montana (talk | contribs) (Add Optional information) |
||
(23 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2oa | |game1= arma2oa | ||
|version1= 1.50 | |||
|1. | |game2= tkoh | ||
|version2= 1.00 | |||
| | |game3= arma3 | ||
|version3= 0.50 | |||
| | |||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
Line 13: | Line 14: | ||
|gr2= Weapons | |gr2= Weapons | ||
|descr= Returns how good a vehicle's weapon is aimed at the target. | |||
| | |s1= vehicle [[aimedAtTarget]] [target, weapon] | ||
| [[ | |p1= vehicle: [[Object]] - vehicle only, not unit | ||
| [[ | |p2= target: [[Object]] | ||
|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 | |||
|x1= <sqf>_aimingQuality = heli aimedAtTarget [target];</sqf> | |||
< | |x2= <sqf>_aimingQuality = heli aimedAtTarget [target, "M197"];</sqf> | ||
</ | |||
|seealso= [[fireAtTarget]] | |||
}} | |||
{{Note | |||
|user= Killzone_Kid | |||
{{ | |timestamp= 20131119150200 | ||
|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. | |||
1 doesn't mean you are going to hit the target, while 0 means you're definitely off. | |||
}} |
Latest revision as of 12:17, 1 April 2024
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:
- Example 2:
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 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.