formLeader: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(31 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


|gr1= Unit Control |GROUP1=
|game3= arma1
|version3= 1.00


|arg= global |Multiplayer Arguments=
|game4= arma2
____________________________________________________________________________________________
|version4= 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=
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| [[Object]] <nowiki>=</nowiki> '''formLeader''' unitName |SYNTAX=
|game6= tkoh
|version6= 1.00


|p1= unitName: [[Object]] |PARAMETER1=
|game7= arma3
|version7= 0.50


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


returns X |EXAMPLE1=
|arg= global
____________________________________________________________________________________________


| [[commandFollow]], [[doFollow]], [[formationLeader]], [[isFormationLeader]], [[leader]], [[selectLeader]], [[setLeader]] |SEEALSO=
|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.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|FORMLEADER]]
[[Category:Scripting Commands OFP 1.46|FORMLEADER]]
[[Category:Scripting Commands Armed Assault|FORMLEADER]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{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