---
name: "captive"
type: command
status: ok
groups: ["Object Manipulation", "Sides"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/captive
revid: 318573
updated: 2022-05-13T09:21:07Z
---

# captive

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

Locality: arguments **global**

## Description

Returns the captive state of the given unit (set with [setCaptive](../commands/setCaptive.md)). A captive unit will not be attacked by its enemies.

> [!IMPORTANT]
> While a captive unit won't be attacked, it will still attack its enemies – be sure to [setBehaviour](../commands/setBehaviour.md) "CARELESS" / [removeAllWeapons](../commands/removeAllWeapons.md) accordingly.

## Syntax

```sqf
captive object
```

**Parameters:**

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

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if the unit is captive, [false](../commands/false.md) if not

## Examples

### Example 1

```sqf
if (captive _general) then { removeAllWeapons _general; };
```

## See also

[captiveNum](../commands/captiveNum.md) · [setCaptive](../commands/setCaptive.md) · [side](../commands/side.md)

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