---
name: "assignedTarget"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/assignedTarget
revid: 364219
updated: 2024-05-06T09:38:11Z
---

# assignedTarget

*Command · Object Manipulation · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **local**

## Description

Returns the target assigned to an unit or the vehicle's [effectiveCommander](../commands/effectiveCommander.md). The target can be assigned by the group/vehicle/formation leader (as player via quick command menu or "target" complex command menu).

To unassign the target use [doWatch](../commands/doWatch.md) [objNull](../commands/objNull.md) or [commandWatch](../commands/commandWatch.md) [objNull](../commands/objNull.md) or as player and group leader order "no target" in the "target" complex command menu.

> [!NOTE]
> - This command does not return the target a unit is actually engaging ("attack unit"). For this information, see [getAttackTarget](../commands/getAttackTarget.md).
> - If a player is inside a vehicle as the [effectiveCommander](../commands/effectiveCommander.md), the vehicle's crew assignedTarget will always be [objNull](../commands/objNull.md).

## Syntax

```sqf
assignedTarget vehicleName
```

**Parameters:**

- `vehicleName`: [Object](../topics/Object.md)

**Returns:** [Object](../topics/Object.md)

## Examples

### Example 1

```sqf
_target = assignedTarget _T72;
```

## See also

[getAttackTarget](../commands/getAttackTarget.md) · [commandTarget](../commands/commandTarget.md) · [doTarget](../commands/doTarget.md) · [commandWatch](../commands/commandWatch.md) · [doWatch](../commands/doWatch.md) · [effectiveCommander](../commands/effectiveCommander.md) · [setEffectiveCommander](../commands/setEffectiveCommander.md)

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