hcSetGroup: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
BrettMayson (talk | contribs) mNo edit summary |
||
(35 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2 | |game1= arma2 | ||
|version1= 1.00 | |||
|1.00 | |game2= arma2oa | ||
|version2= 1.50 | |||
|game3= tkoh | |||
|version3= 1.00 | |||
|game4= arma3 | |||
|version4= 0.50 | |||
|gr1= High Command | |gr1= High Command | ||
| 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}}''').}} | ||
| unit | |s1= unit [[hcSetGroup]] [group, groupName, team] | ||
|p1= unit: [[Object]] - the leader | |p1= unit: [[Object]] - the leader | ||
Line 19: | Line 27: | ||
|p3= groupName: [[String]] - (Optional) | |p3= groupName: [[String]] - (Optional) | ||
|p4= team: [[String]] - (Optional, default "teamMain") can be one of: | |p4= team: [[String]] Enum - (Optional, default "teamMain") can be one of: | ||
* "teamMain" | * "teamMain" | ||
* "teamRed" | * "teamRed" | ||
Line 26: | Line 34: | ||
* "teamYellow" | * "teamYellow" | ||
| [[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 21:54, 26 September 2024
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 Enum - (Optional, default "teamMain") can be one of:
- "teamMain"
- "teamRed"
- "teamGreen"
- "teamBlue"
- "teamYellow"
- Return Value:
- Nothing
Examples
- Example 1:
- 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