hcSetGroup: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1= High Command | |gr1= High Command | ||
| 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]]''').}} | {{Informative|The previous HC leader should be [[hcRemoveGroup|removed]] before adding the new one (see '''[[#Examples|Example 3]]''').}} | ||
| unit '''hcSetGroup''' [group, groupName, team] | | unit '''hcSetGroup''' [group, groupName, team] | ||
|p1= unit: [[Object]] - the leader | |p1= unit: [[Object]] - the leader | ||
|p2= group: [[Group]] | |p2= group: [[Group]] | ||
|p3= groupName: [[String]] - (Optional) | |p3= groupName: [[String]] - (Optional) | ||
|p4= team: [[String]] - (Optional, default "teamMain") can be one of: | |p4= team: [[String]] - (Optional, default "teamMain") can be one of: | ||
Line 24: | Line 24: | ||
* "teamGreen" | * "teamGreen" | ||
* "teamBlue" | * "teamBlue" | ||
* "teamYellow" | * "teamYellow" | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>unit [[hcSetGroup]] [group, "HQ", "teamred"];</code> | |x1= <code>unit [[hcSetGroup]] [group, "HQ", "teamred"];</code> | ||
|x2= <code>[[player]] [[hcSetGroup]] [group];</code> | |x2= <code>[[player]] [[hcSetGroup]] [group];</code> | ||
|x3= <code>[[if]] ([[player]] !{{=}} [[hcLeader]] _group) [[then]] | |x3= <code>[[if]] ([[player]] !{{=}} [[hcLeader]] _group) [[then]] | ||
Line 36: | Line 36: | ||
[[hcLeader]] _group [[hcRemoveGroup]] _group; | [[hcLeader]] _group [[hcRemoveGroup]] _group; | ||
[[player]] [[hcSetGroup]] [_group]; | [[player]] [[hcSetGroup]] [_group]; | ||
};</code> | };</code> | ||
| [[High Command]],[[hcAllGroups]],[[hcGroupParams]],[[hcLeader]],[[hcRemoveAllGroups]],[[hcRemoveGroup]],[[hcSelected]],[[hcSelectGroup]],[[hcShowBar]],[[hcShownBar]],[[onHCGroupSelectionChanged]] | | [[High Command]],[[hcAllGroups]],[[hcGroupParams]],[[hcLeader]],[[hcRemoveAllGroups]],[[hcRemoveGroup]],[[hcSelected]],[[hcSelectGroup]],[[hcShowBar]],[[hcShownBar]],[[onHCGroupSelectionChanged]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:43, 18 January 2021
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:
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