Description
Add group to unit's high command bar.
Note
The previous HC leader should be removed before adding the new one (see #Example 3).
Syntax
unit hcSetGroup [group, groupName, team]
Parameters:
unit: Object - the leadergroup: GroupgroupName: String - (Optional)team: String - (Optional, default "teamMain") can be one of:- "teamMain"
- "teamRed"
- "teamGreen"
- "teamBlue"
- "teamYellow"
Returns: Nothing
Examples
Example 1
unit hcSetGroup [_group, "HQ", "teamred"];
Example 2
player hcSetGroup [_group];
Example 3
if (player != hcLeader _group) then
{
hcLeader _group hcRemoveGroup _group;
player hcSetGroup [_group];
};
See also
High Command · hcAllGroups · hcGroupParams · hcLeader · hcRemoveAllGroups · hcRemoveGroup · hcSelected · hcSelectGroup · hcShowBar · hcShownBar · onHCGroupSelectionChanged