captive: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|CAPTIVE]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|CAPTIVE]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|CAPTIVE]]
[[Category:Scripting Commands ArmA|CAPTIVE]]


| ofp |= Game name


<h2 style="color:#000066"> '''captive ''unit'''''</h2>
|1.00|= Game version


|arg= global |= Arguments in MP
____________________________________________________________________________________________


'''Operand types:'''
| Returns if the given unit is captive. "captive" means that enemies will not shoot at the unit. |= Description
____________________________________________________________________________________________


'''unit:''' [[Object]]
| '''captive''' unit |= Syntax


'''Type of returned value:'''
|p1= unit: [[Object]] |= Parameter 1


[[Boolean]]
| [[Boolean]]
true if the unit is captive, false if not |= Return value
____________________________________________________________________________________________
 
|x1= <pre>?!(captive general) : general setCaptive true</pre> |= Example 1
____________________________________________________________________________________________


'''Description:'''
| [[setCaptive]] |= See also


Check if '''unit''' is captive.
}}


If '''unit''' is a vehicle, its commander is checked.
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>


'''Example:'''
<h3 style="display:none">Bottom Section</h3>
Old Notes (temporary):


[[if]] ([[not]] '''captive''' [[player]]) [[then]] {[[goto]] "run"}
Use [[setCaptive]] to make a unit captive.


 
[[Category:Scripting Commands|CAPTIVE]]
'''Comments:'''
[[Category:Scripting Commands OFP 1.96|CAPTIVE]]
 
[[Category:Scripting Commands OFP 1.46|CAPTIVE]]
Use [[setCaptive]] to make a unit '''captive'''.
[[Category:Scripting Commands ArmA|CAPTIVE]]

Revision as of 22:38, 1 August 2006

Hover & click on the images for description

Description

Description:
Returns if the given unit is captive. "captive" means that enemies will not shoot at the unit.
Groups:
Uncategorised

Syntax

Syntax:
captive unit
Parameters:
unit: Object
Return Value:
Boolean - true if the unit is captive, false if not

Examples

Example 1:
?!(captive general) : general setCaptive true

Additional Information

See also:
setCaptive

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

Old Notes (temporary):

Use setCaptive to make a unit captive.