formLeader: Difference between revisions

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


| ofp |= Game name


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


|arg= global |= Arguments in MP
____________________________________________________________________________________________


'''Operand types:'''
| Returns the formation leader of a given unit. This is often the same as the group leader, but not always, for example in cases when a unit is ordered to follow another unit. |= Description
____________________________________________________________________________________________


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


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


[[Object]]
| [[Object]]
the leader of the formation is returned. If used on a dead unit, the returned value is [[objNull]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>? (formLeader player != leader player) : hint "The formation leader is different to the group leader!"</pre>


'''Description:'''
returns X |= Example 1
____________________________________________________________________________________________


Formation leader for given unit, for dead units [[objNull]].
| [[formation]], [[setFormation]] |= See also


This is often the same as group leader, but not always.
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Example:'''
<!-- Note Section END -->
</dl>


? ('''formLeader''' [[player]] != [[leader unit|leader]] [[player]]) : [[hint]] "Formation leader is not the group leader."
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|FORMLEADER]]
[[Category:Scripting Commands OFP 1.96|FORMLEADER]]
[[Category:Scripting Commands OFP 1.46|FORMLEADER]]
[[Category:Scripting Commands ArmA|FORMLEADER]]

Revision as of 00:16, 2 August 2006

Hover & click on the images for description

Description

Description:
Returns the formation leader of a given unit. This is often the same as the group leader, but not always, for example in cases when a unit is ordered to follow another unit.
Groups:
Uncategorised

Syntax

Syntax:
formLeader unit
Parameters:
unit: Object
Return Value:
Object - the leader of the formation is returned. If used on a dead unit, the returned value is objNull

Examples

Example 1:
? (formLeader player != leader player) : hint "The formation leader is different to the group leader!"
returns X

Additional Information

See also:
formationsetFormation

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