---
name: "allGroups"
type: command
status: ok
groups: ["Groups", "Object Detection"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/allGroups
revid: 377010
updated: 2026-01-01T08:18:18Z
---

# allGroups

*Command · Groups, Object Detection · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Return a list of all groups created on the following sides [east](../commands/east.md), [west](../commands/west.md), [resistance](../commands/resistance.md)/[independent](../commands/independent.md) and [civilian](../commands/civilian.md) only. Does not contain groups of [sideLogic](../commands/sideLogic.md).

## Syntax

```sqf
allGroups
```

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

## Examples

### Example 1

```sqf
{ leader _x sideChat "Go ! Go ! Go !" } forEach allGroups;
```

### Example 2

All groups with players:

```sqf
private _allGroupsWithPlayers = [];
{ _allGroupsWithPlayers pushBackUnique group _x } forEach allPlayers;
```

## See also

[group](../commands/group.md) · [groups](../commands/groups.md) · [units](../commands/units.md) · [allCurators](../commands/allCurators.md) · [allDead](../commands/allDead.md) · [playableUnits](../commands/playableUnits.md) · [switchableUnits](../commands/switchableUnits.md) · [vehicles](../commands/vehicles.md) · [allUnitsUAV](../commands/allUnitsUAV.md)

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