---
name: "setMissileTarget"
type: command
status: ok
groups: ["Object Manipulation", "Weapons"]
arma3_since: "1.92"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/setMissileTarget
revid: 373564
updated: 2025-05-22T22:04:50Z
---

# setMissileTarget

*Command · Object Manipulation, Weapons · Arma 3 v1.92*

## Description

Sets a guided missile target. Does not work for all types of missiles. If the target is dead, it is ignored. The target has to be inside the missile's configured targeting cone for the command to work.

## Syntax

### Syntax 1

```sqf
munition setMissileTarget target
```

**Parameters:**

- `munition`: [Object](../topics/Object.md) - missile
- `target`: [Object](../topics/Object.md) - valid missile target or [objNull](../commands/objNull.md) to cancel targeting

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if successful

### Syntax 2

*since arma3 2.18*

```sqf
munition setMissileTarget [target, force]
```

**Parameters:**

- `munition`: [Object](../topics/Object.md) - missile
- `target`: [Object](../topics/Object.md) - valid missile target or [objNull](../commands/objNull.md) to cancel targeting
- `force`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to force target (for example to target countermeasure flare object)

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if successful

## Examples

### Example 1

```sqf
missile1 setMissileTarget tank1;
```

### Example 2

```sqf
private _missile = createVehicle ["Missile_AGM_01_F", player modelToWorld [0,0,50], [], 0, "CAN_COLLIDE"];
_missile setDir getDir player;
private _target = createVehicle ["O_APC_Wheeled_02_rcws_v2_F", player modelToWorld [0,300,0], [], 0, "CAN_COLLIDE"];
_target setVehicleTiPars [1, 1, 1];
[_missile, _target] spawn {
    params ["_missile", "_target"];
    sleep 0.1;
    _missile setMissileTarget _target;
};
```

### Example 3

```sqf
_missile setMissileTarget objNull; // cancels targeting
```

### Example 4

```sqf
_missile setMissileTarget [flare1, true];
```

## See also

[missileTargetPos](../commands/missileTargetPos.md) · [setMissileTargetPos](../commands/setMissileTargetPos.md) · [missileTarget](../commands/missileTarget.md) · [missileState](../commands/missileState.md)

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