formLeader: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(add. ArmA2 classification)
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(51 intermediate revisions by 8 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 |= Arguments in MP
|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]] |= Parameter 1
|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]] |= Return value
|version7= 0.50
____________________________________________________________________________________________
 
|x1= <pre>? (formLeader player != leader player) :
hint "The formation leader is different to the group leader!"</pre>


returns X |= Example 1
|gr1= Unit Control
____________________________________________________________________________________________


| [[formationLeader]], [[leader]], [[isFormationLeader]], [[selectLeader]] |= See also
|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>
</dl>
if (formLeader player != leader player) then
{
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.96|FORMLEADER]]
[[Category:Scripting Commands OFP 1.46|FORMLEADER]]
[[Category:Scripting Commands ArmA|FORMLEADER]]
[[Category:Command_Group:_Groups|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 11:34, 3 September 2024

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