leader: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[cC]ommand[_ ][gG]roup:[_ ][^|]+\|\{*uc:{{PAGENAME}*]\]" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|gr1= Groups |GROUP1=
|gr1= Groups


|arg= global |Multiplayer Arguments=
|arg= global


|Returns the group leader for the given unit or group. For dead units, objNull is returned. |DESCRIPTION=
|Returns the group leader for the given unit or group. For dead units, objNull is returned.


| [[Object]] <nowiki>=</nowiki> '''leader''' unitName |SYNTAX=
| [[Object]] <nowiki>=</nowiki> '''leader''' unitName


|p1 =unitName: [[Object]] or [[Group]]
|p1 =unitName: [[Object]] or [[Group]]


| [[Object]] |RETURNVALUE=
| [[Object]]




Line 24: Line 24:
|x3 =<code>_UnitLeader <nowiki>=</nowiki> [[leader]] [[player]] </code>
|x3 =<code>_UnitLeader <nowiki>=</nowiki> [[leader]] [[player]] </code>


| [[formationLeader]], [[formLeader]], [[isFormationLeader]], [[selectLeader]] |SEEALSO=
| [[formationLeader]], [[formLeader]], [[isFormationLeader]], [[selectLeader]]


}}
}}

Revision as of 01:05, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns the group leader for the given unit or group. For dead units, objNull is returned.
Groups:
Groups

Syntax

Syntax:
Object = leader unitName
Parameters:
unitName: Object or Group
Return Value:
Object

Examples

Example 1:
leader group player == leader player
Example 2:
_GroupLeader = leader (group (vehicle player))
Example 3:
_UnitLeader = leader player

Additional Information

See also:
formationLeaderformLeaderisFormationLeaderselectLeader

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

Bottom Section