---
name: "hcSelected"
type: command
status: ok
groups: ["High Command"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/hcSelected
revid: 377155
updated: 2026-01-01T10:38:13Z
---

# hcSelected

*Command · High Command · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Returns selected groups in high command.

## Syntax

```sqf
hcSelected unit
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - commander

**Returns:** [Array](../topics/Array.md) of [Group](../topics/Group.md)s

## Examples

### Example 1

```sqf
array = hcSelected unit;
```

## See also

High Command · [hcAllGroups](../commands/hcAllGroups.md) · [hcGroupParams](../commands/hcGroupParams.md) · [hcLeader](../commands/hcLeader.md) · [hcRemoveAllGroups](../commands/hcRemoveAllGroups.md) · [hcRemoveGroup](../commands/hcRemoveGroup.md) · [hcSelectGroup](../commands/hcSelectGroup.md) · [hcSetGroup](../commands/hcSetGroup.md) · [hcShowBar](../commands/hcShowBar.md) · [hcShownBar](../commands/hcShownBar.md) · [onHCGroupSelectionChanged](../commands/onHCGroupSelectionChanged.md)

<sub>Source: [BI Community Wiki — hcSelected](https://community.bistudio.com/wiki/hcSelected) (revision 377155).</sub>
