---
name: "moveInCargo"
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/moveInCargo
revid: 351994
updated: 2024-02-01T23:23:57Z
---

# moveInCargo

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

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

## Description

Moves a unit into a vehicle cargo position (immediately and without animation).

> [!NOTE]
> See AI Group Vehicle Management for more information.

> [!IMPORTANT]
> If the unit is already in a vehicle, nothing will happen. You should use [moveOut](../commands/moveOut.md) to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.

## Syntax

### Syntax 1

```sqf
unit moveInCargo vehicle
```

**Parameters:**

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

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

### Syntax 2

```sqf
unit moveInCargo [vehicle, cargoIndex, canReassign]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `vehicle`: [Object](../topics/Object.md)
- `cargoIndex`: [Number](../topics/Number.md)
- `canReassign`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) try to move *unit* into the first free *vehicle* cargo seat if *cargoIndex* is already occupied *(since arma3 2.08)*

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

## Examples

### Example 1

```sqf
_soldierOne moveInCargo _jeepOne;
```

### Example 2

```sqf
_soldierOne moveInCargo [_jeepOne, 1];
```

## Multiplayer

> [!NOTE]
> The command should execute where the **unit** (not **vehicle**) is local.

## See also

[moveInAny](../commands/moveInAny.md) · [moveInCommander](../commands/moveInCommander.md) · [moveInDriver](../commands/moveInDriver.md) · [moveInGunner](../commands/moveInGunner.md) · [moveInTurret](../commands/moveInTurret.md) · [assignAsCargo](../commands/assignAsCargo.md) · [assignAsCommander](../commands/assignAsCommander.md) · [assignAsDriver](../commands/assignAsDriver.md) · [assignAsGunner](../commands/assignAsGunner.md) · [getCargoIndex](../commands/getCargoIndex.md)

## Community notes

**Hardrock** — 2006-08-04

*Notes from before the conversion*

If you place a soldier in a vehicle with the moveInCargo command, he wont "know" he's in the vehicle, and thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint.
Therefore you have to use the [assignAsCargo](../commands/assignAsCargo.md) command, in order for the AI to catch on. Something like this:

```sqf
_soldier moveInCargo helo1; _soldier assignAsCargo helo1;
```

---

**Ceeeb** — 2007-02-02

In **OFP v1.96**, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Cargo" action command.

---

**Killzone_Kid** — 2014-03-18

In Arma 3 when using the alternative syntax of [moveInCargo](../commands/moveInCargo.md), it is necessary to call [assignAsCargoIndex](../commands/assignAsCargoIndex.md) because it is not called automatically.

```sqf
unit1 moveInCargo [heli, 3];
unit1 assignAsCargoIndex [heli, 3];
```

Alternatively avoid this broken syntax all together and use:

```sqf
unit1 assignAsCargoIndex [heli, 3];
unit1 moveInCargo heli;
```

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