---
name: "setDestination"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setDestination
revid: 377507
updated: 2026-01-02T06:50:09Z
---

# setDestination

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

Locality: arguments **local** · effect **global**

## Description

Set the destination for path planning of the pilot.

Possible values for planningMode are:

- "DoNotPlan" - used when not moving
- "DoNotPlanFormation" - used in formation when simple path testing is used
- "LEADER PLANNED" - used for formation leader (full path finding used)
- "LEADER DIRECT" - used for DirectGo (like getin, supply)
- "FORMATION PLANNED" - used in formation when full path finding is used
- "VEHICLE PLANNED" - used for vehicle driver

Works best when used on [agents](../commands/agents.md). Using "LEADER PLANNED" will trigger `"PathCalculated"` [Event Handler](../topics/Event_Handlers.md#pathcalculated)

## Syntax

```sqf
object setDestination [position, planningMode, forceReplan]
```

**Parameters:**

- `object`: [Object](../topics/Object.md)
- `position`: [Position](../topics/Position.md)
- `planningMode`: [String](../topics/String.md)
- `forceReplan`: [Boolean](../topics/Boolean.md) - specifies if replanning of the path should be forced.

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

## Examples

### Example 1

```sqf
bob setDestination [screenToWorld [0.5,0.5], "LEADER PLANNED", true];
```

## See also

[expectedDestination](../commands/expectedDestination.md) · [doMove](../commands/doMove.md) · [calculatePath](../commands/calculatePath.md)

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