# Selected Subgroup Units
Grammar — Selected subgroup of units for player player
Flags —Native
|Function
Returns the selected units subgroup for the specified player.
# Arguments
int
— Player
Returns — unitgroup
native unitgroup UnitSubgroupSelected(int inPlayer);
# Related
Category: Selection / Unit Selection
- Subgroup Index —
int
— UnitSubgroupIndexSelected - Selected Subgroup Units —
unitgroup
— UnitSubgroupSelected - Select/Deselect Unit —
void
— UnitSelect - Select Next Subgroup —
void
— UnitSubgroupIndexNext - Select Previous Subgroup —
void
— UnitSubgroupIndexPrevious - Select/Deselect Unit Group —
void
— UnitGroupSelect - Clear Unit Selection —
void
— UnitClearSelection - Unit Is Selected —
bool
— UnitIsSelected - Unit Type Is Selected —
bool
— libNtve_gf_UnitTypeIsSelected - Selected Units —
unitgroup
— UnitGroupSelected - Unit Is Selected —
void
— TriggerAddEventUnitSelected - Store Unit Selection —
void
— libNtve_gf_StoreUnitSelection - Restore Unit Selection —
void
— libNtve_gf_RestoreUnitSelection - Flash Unit Selection —
void
— UnitFlashSelection
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18378
UnitCreateEffectUnit(lv_fenixUnitNew, "CopyTargetSelectionAndControlGroups", lv_fenixUnitOld);
if ((UnitGroupCount(lv_fenixPlayerSelectionGroup, c_unitCountAlive) > 0)) {
lv_fenixPlayerActivedSubGroup = UnitSubgroupSelected(lv_fenixPlayer);
lv_selected = UnitIsSelected(lv_fenixUnitOld, lv_fenixPlayer);
lv_activedSubGroupSelected = UnitGroupHasUnit(lv_fenixPlayerActivedSubGroup, lv_fenixUnitOld);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25639
if ((libCOMI_gv_cM_TychusMedicTranportSendViaTopBar[lv_p] == false)) {
lv_ug = UnitSubgroupSelected(lv_p);
}
else {