---
name: "setUnloadInCombat"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "1.36"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setUnloadInCombat
revid: 336388
updated: 2022-12-31T20:54:06Z
---

# setUnloadInCombat

*Command · Unit Control · Arma 3 v1.36*

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

## Description

Sets whether or not cargo or turret units *should* get out of vehicle when in combat. If **true**, vehicle will stop and units will dismount. Vehicle must be local. The command resets last time unit had reacted to an enemy as well as forcing [orderGetIn](../commands/orderGetIn.md) [false](../commands/false.md) if [canUnloadInCombat](../commands/canUnloadInCombat.md) is permitted by config

## Syntax

```sqf
vehicle setUnloadInCombat [allowCargo, allowTurrets]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md)
- `allowCargo`: [Boolean](../topics/Boolean.md)
- `allowTurrets`: [Boolean](../topics/Boolean.md)

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

## Examples

### Example 1

```sqf
_veh setUnloadInCombat [true, false];
```

## See also

[getUnloadInCombat](../commands/getUnloadInCombat.md) · [canUnloadInCombat](../commands/canUnloadInCombat.md) · [allowCrewInImmobile](../commands/allowCrewInImmobile.md) · [isAllowedCrewInImmobile](../commands/isAllowedCrewInImmobile.md)

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