formLeader: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| ofp |Game name=
|game1= ofp
|version1= 1.00


|1.00|Game version=
|game2= ofpe
|version2= 1.00


|arg= global |Multiplayer Arguments=
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| 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=
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| [[Object]] <nowiki>=</nowiki> '''formLeader''' unitName |SYNTAX=
|game5= arma2oa
|version5= 1.50


|p1= unitName: [[Object]] |PARAMETER1=
|game6= tkoh
|version6= 1.00


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


returns X |EXAMPLE1=
|gr1= Unit Control
____________________________________________________________________________________________


| [[commandFollow]], [[doFollow]], [[formationLeader]], [[isFormationLeader]], [[leader]], [[selectLeader]], [[setLeader]] |SEEALSO=
|arg= global


}}
|descr= 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.
 
|s1= [[formLeader]] unitName
 
|p1= unitName: [[Object]]


<h3 style="display:none">Notes</h3>
|r1= [[Object]] - the leader of the formation is returned. If used on a dead unit, the returned value is [[objNull]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>if (formLeader player != leader player) then
</dl>
{
hint "The formation leader is different to the group leader!";
};</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[commandFollow]] [[doFollow]] [[formationLeader]] [[isFormationLeader]] [[leader]] [[selectLeader]] [[setLeader]]
[[Category:Scripting Commands|FORMLEADER]]
}}
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|FORMLEADER]]
[[Category:Scripting Commands OFP 1.46|FORMLEADER]]
[[Category:Scripting Commands Armed Assault|FORMLEADER]]
[[Category:Command_Group:_Groups|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 10:22, 13 May 2022

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:
Unit Control

Syntax

Syntax:
formLeader unitName
Parameters:
unitName: 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:
if (formLeader player != leader player) then { hint "The formation leader is different to the group leader!"; };

Additional Information

See also:
commandFollow doFollow formationLeader isFormationLeader leader selectLeader setLeader

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