Arma 3 Scripting

captive

  • Global argument
  • Arma 3 v0.50
  • First in Operation Flashpoint v1.00

Command · also in Sides · Markdown · JSON · 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