hcSetGroup: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\| *arma2 * * *\| *([0-1]\.[0-9]{2}) *  \|game2" to "|game1= arma2 |version1= $1  |game2")  | 
				Pabstmirror (talk | contribs)  m (fix examples)  | 
				||
| (31 intermediate revisions by 2 users not shown) | |||
| Line 17: | Line 17: | ||
|descr= Add group to unit's [[High Command|high command]] bar.  | |descr= Add group to unit's [[High Command|high command]] bar.  | ||
{{Feature|  | {{Feature|informative|The previous HC leader should be [[hcRemoveGroup|removed]] before adding the new one (see '''{{Link|#Example 3}}''').}}  | ||
|s1=   | |s1= unit [[hcSetGroup]] [group, groupName, team]  | ||
|p1= unit: [[Object]] - the leader  | |p1= unit: [[Object]] - the leader  | ||
| Line 36: | Line 36: | ||
|r1= [[Nothing]]  | |r1= [[Nothing]]  | ||
|x1= <  | |x1= <sqf>unit hcSetGroup [_group, "HQ", "teamred"];</sqf>  | ||
|x2= <  | |x2= <sqf>player hcSetGroup [_group];</sqf>  | ||
|x3= <  | |x3= <sqf>  | ||
if (player != hcLeader _group) then  | |||
{  | {  | ||
	hcLeader _group hcRemoveGroup _group;  | |||
	player hcSetGroup [_group];  | |||
};</  | };  | ||
</sqf>  | |||
|seealso= [[High Command]]  | |seealso= [[High Command]] [[hcAllGroups]] [[hcGroupParams]] [[hcLeader]] [[hcRemoveAllGroups]] [[hcRemoveGroup]] [[hcSelected]] [[hcSelectGroup]] [[hcShowBar]] [[hcShownBar]] [[onHCGroupSelectionChanged]]  | ||
}}  | }}  | ||
Latest revision as of 22:40, 7 October 2025
Description
- Description:
 - Add group to unit's high command bar.
 - 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:
 - Example 3:
 
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