Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.5

Description

Description:

Returns superior group in the chain of command, for the given group.

The order in which the superior group is determined in relation to the leaderSG is as follows:

  1. If the leaderSG is already different from the checked group, then use that group.
  2. If they are the same, then go up the hierarchy until a non-empty leaderSG is found that is different.
  3. If none can be found, then return the current group.

Syntax

Syntax:leaderGroup grp
Parameters:
  • grp: Group - Group to check.
Return Value:Group - Group superior to the given one.

Alternative Syntax

Syntax:leaderGroup [grp, gettop]
Parameters:
  • grp: Group - Group to check.
  • gettop: Boolean - If true, then get the most superior group at the top of the chain of command. If false, then get the group at the next higher level.
Return Value:Group - Group superior to the given one.

Examples

Examples:
_leadGrp = leaderGroup (group player)

For the example above, the following values are returned:

  • CO: CO HQ
  • 1PL: 1PL HQ
  • 1PL HQ: CO HQ
  • 1PL 1SQ: 1PL HQ
  • 1PL 2SQ: 1PL HQ
  • CO HQ: CO HQ
  • 2PL: 2PL HQ
  • 2PL HQ: CO HQ
  • 2PL 1SQ: 2PL HQ
  • 2PL 2SQ: 2PL HQ

Additional Information

See also: leaderSG, selectLeaderSG, leader, formationLeaderGroup
Multiplayer: 
Problems: 

Notes