---
name: "aimedAtTarget"
type: command
status: ok
groups: ["Object Manipulation", "Weapons"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/aimedAtTarget
revid: 363498
updated: 2024-04-01T11:17:25Z
---

# aimedAtTarget

*Command · Object Manipulation, Weapons · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.50*

## Description

Returns how good a vehicle's weapon is aimed at the target.

## Syntax

```sqf
vehicle aimedAtTarget [target, weapon]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md) - vehicle only, not unit
- `target`: [Object](../topics/Object.md)
- `weapon`: [String](../topics/String.md) - (Optional) if not provided, checks all weapons; if provided, checks that weapon only

**Returns:** [Number](../topics/Number.md) in range 0..1 - 0 if no weapons or if *weapon* was provided and not found

## Examples

### Example 1

```sqf
_aimingQuality = heli aimedAtTarget [target];
```

### Example 2

```sqf
_aimingQuality = heli aimedAtTarget [target, "M197"];
```

## See also

[fireAtTarget](../commands/fireAtTarget.md)

## Community notes

**Killzone_Kid** — 2013-11-19

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.

<sub>Source: [BI Community Wiki — aimedAtTarget](https://community.bistudio.com/wiki/aimedAtTarget) (revision 363498).</sub>
