# Module `DCSGroup`

## Global(s)

Group |

## Type `Group`

Group.Category | Enum contains identifiers of group types.
Group.ID | Identifier of a group. It is assigned to a group by Mission Editor automatically.
Group:destroy() | Destroys the group and all of its units.
Group.getByName(name) | Returns group by the name assigned to the group in Mission Editor.
Group:getCategory() | Returns category of the group.
Group:getController() | Returns controller of the group.
Group:getID() | Returns the group identifier.
Group:getInitialSize() | Returns initial size of the group.
Group:getName() | Returns the group's name.
Group:getSize() | Returns current size of the group.
Group:getUnit(unitNumber) | Returns the unit with number unitNumber.
Group:getUnits() | Returns array of the units present in the group now.
Group:isExist() | returns true if the group exist or false otherwise.

## Type `Group.Category`

Group.Category.AIRPLANE |
Group.Category.GROUND |
Group.Category.HELICOPTER |
Group.Category.SHIP |

## Global(s)

#Group Group

## Type `DCSGroup`

## Type `Group`

Represents group of Units.

### Field(s)

#Group.Category Group.Category

  Enum contains identifiers of group types.

#ID Group.ID

  Identifier of a group. It is assigned to a group by Mission Editor automatically.

Group:destroy()

  Destroys the group and all of its units.

Group.getByName(name)

  Returns group by the name assigned to the group in Mission Editor.

  ### Parameter

  - `#string name` :

  ### Return value

  #Group:

Group:getCategory()

  Returns category of the group.

  ### Return value

  #Group.Category:

Group:getController()

  Returns controller of the group.

  ### Return value

  Controller#Controller:

Group:getID()

  Returns the group identifier.

  ### Return value

  #ID:

Group:getInitialSize()

  Returns initial size of the group.

  If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.

  ### Return value

  #number:

Group:getName()

  Returns the group's name.

  This is the same name assigned to the group in Mission Editor.

  ### Return value

  #string:

Group:getSize()

  Returns current size of the group.

  If some of the units will be destroyed, As units are destroyed the size of the group will be changed.

  ### Return value

  #number:

Group:getUnit(unitNumber)

  Returns the unit with number unitNumber.

  If the unit is not exists the function will return nil.

  ### Parameter

  - `#number unitNumber` :

  ### Return value

  DCSUnit#Unit:

Group:getUnits()

  Returns array of the units present in the group now.

  Destroyed units will not be enlisted at all.

  ### Return value

  #list: DCSUnit#Unit> array of Units

Group:isExist()

  returns true if the group exist or false otherwise.

  ### Return value

  #boolean:

## Type `Group.Category`

Enum contains identifiers of group types.

### Field(s)

Group.Category.AIRPLANE

Group.Category.GROUND

Group.Category.HELICOPTER

Group.Category.SHIP

## Type `ID`

## Type `list`