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

Introduced in




Returns the the lead group for the given group.

The order in which the lead group is determined is as follows:

  1. If a lead group is defined using selectLeaderSG, use that group.
  2. If not step 1, and if the current group has members, use the group itself.
  3. If not step 2, and if there are sub-groups with members, use the first sub-group (checked in the order they were created).
  4. If not step 3, and if there are sub-groups without members, but which itself has sub-groups that do have members, use that (checked in the order they were created).
  5. If not step 4, then return grpNull.


Syntax:leaderSG grp
  • grp: Group - Group to check.
Return Value:Group - Group that is the leader for the given group (or the group itself, if no lead is group defined)


_subGrps = leaderSG (group player)

For the example above, the following values are returned:

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

Additional Information

See also: selectLeaderSG, leaderGroup, leader