hcSetGroup: Difference between revisions

From Bohemia Interactive Community
mNo edit summary
Tag: Reverted
m (fix examples)
 
(One intermediate revision by one other user not shown)
Line 27: Line 27:
|p3= groupName: [[String]] - (Optional)
|p3= groupName: [[String]] - (Optional)


|p4= team: [[String]] Enum - (Optional, default "teamMain") can be one of:
|p4= team: [[String]] - (Optional, default "teamMain") can be one of:
* "teamMain"
* "teamMain"
* "teamRed"
* "teamRed"
Line 36: Line 36:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <sqf>unit hcSetGroup [group, "HQ", "teamred"];</sqf>
|x1= <sqf>unit hcSetGroup [_group, "HQ", "teamred"];</sqf>


|x2= <sqf>player hcSetGroup [group];</sqf>
|x2= <sqf>player hcSetGroup [_group];</sqf>


|x3= <sqf>
|x3= <sqf>

Latest revision as of 23:40, 7 October 2025

Hover & click on the images for description

Description

Description:
Add group to unit's high command bar.
The previous HC leader should be removed before adding the new one (see Example 3).
Groups:
High Command

Syntax

Syntax:
unit hcSetGroup [group, groupName, team]
Parameters:
unit: Object - the leader
group: Group
groupName: String - (Optional)
team: String - (Optional, default "teamMain") can be one of:
  • "teamMain"
  • "teamRed"
  • "teamGreen"
  • "teamBlue"
  • "teamYellow"
Return Value:
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]; };

Additional Information

See also:
High Command hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcShowBar hcShownBar onHCGroupSelectionChanged

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