captive: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Lou Montana (talk | contribs) m (Page update and comment cleanup) |
||
Line 9: | Line 9: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns | | 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.}} |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[captive]] object |= Syntax | ||
|p1= object: [[Object]] |= Parameter 1 | |p1= object: [[Object]] - unit or vehicle |= Parameter 1 | ||
| [[Boolean]] - | | [[Boolean]] - [[true]] if the unit is captive, [[false]] if not |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[[if]] ( | |x1= <code>[[if]] ([[captive]] _general) [[then]] { [[removeAllWeapons]] _general; };</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[captiveNum]], [[setCaptive]] |= See also | | [[captiveNum]], [[setCaptive]], [[side]] |= See also | ||
}} | }} | ||
Line 29: | Line 31: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 11:36, 25 March 2018
Description
- Description:
- Returns the captive state of the given unit (set with setCaptive). A captive unit will not be attacked by its enemies.
- Groups:
- Uncategorised
Syntax
- Syntax:
- captive object
- Parameters:
- object: Object - unit or vehicle
- Return Value:
- Boolean - true if the unit is captive, false if not
Examples
- Example 1:
if (captive _general) then { removeAllWeapons _general; };
Additional Information
- See also:
- captiveNumsetCaptiveside
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Command Group: Object Information
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters