hcSetGroup: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "|=GROUP1" to "|GROUP1=") |
Lou Montana (talk | contribs) (Page filling) |
||
Line 10: | Line 10: | ||
| Add group to unit's [[High Command|high command]] bar. | | Add group to unit's [[High Command|high command]] bar. | ||
{{Informative|The previous HC leader should be [[hcRemoveGroup|removed]] before adding the new one (see '''[[#Examples|Example 3]]''').}} |DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| unit '''hcSetGroup''' | | unit '''hcSetGroup''' [group, groupName, team] |SYNTAX= | ||
|p1= unit: [[Object]] - the leader |PARAMETER1= | |||
| | |p2= group: [[Group]] |PARAMETER2= | ||
| | |p3= groupName: [[String]] |PARAMETER3= | ||
| | |p4= team: [[String]] - can be one of: | ||
* "teamMain" | |||
* "teamRed" | |||
* "teamGreen" | |||
* "teamBlue" | |||
* "teamYellow" |PARAMETER4= | |||
| Nothing |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>unit [[hcSetGroup]] [group, "HQ", teamred];</code>|EXAMPLE1= | |||
| | |x2= <code>[[player]] [[hcSetGroup]] [group];</code>|EXAMPLE2= | ||
| | |x3= <code>[[if]] ([[player]] !{{=}} [[hcLeader]] _group) [[then]] | ||
{ | |||
[[hcLeader]] _group [[hcRemoveGroup]] _group; | |||
[[player]] [[hcSetGroup]] [_group]; | |||
};</code> | EXAMPLE3= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 16:39, 17 November 2020
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
- team: String - 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 CommandhcAllGroupshcGroupParamshcLeaderhcRemoveAllGroupshcRemoveGrouphcSelectedhcSelectGrouphcShowBarhcShownBaronHCGroupSelectionChanged
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