Arma 3 Scripting

Command in Object Manipulation, Sides

captive

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the captive state of the given unit (set with setCaptive). 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 "CARELESS" / removeAllWeapons accordingly.

Syntax

captive object

Parameters:

Returns: Boolean - true if the unit is captive, false if not

Examples

Example 1

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

See also

captiveNum · setCaptive · side