Group#
Group represents a group of units sharing a common Mission Editor route/tasking.
Unlike most other DCS classes, Group does not extend or inherit from any other
class.
- class Group#
Static functions#
Member functions#
- isExist()#
Returns whether the group still exists (has not been destroyed and has at least one living unit, depending on version/context).
- Returns:
Whether the group exists.
- Return type:
boolean
- activate()#
Activates a late-activated group.
See also
trigger.action.activateGroup(), a convenience wrapper around this method.
- destroy()#
Destroys the group and all its remaining units.
See also
trigger.action.deactivateGroup(), a convenience wrapper around this method.
- getCategory()#
Returns the group’s category (see Group.Category).
- Returns:
Group category.
- Return type:
number
- getCoalition()#
Returns the coalition the group belongs to.
- Returns:
Coalition ID (see
coalition.side).- Return type:
number
- getName()#
Returns the group’s Mission Editor name.
- Returns:
Group name.
- Return type:
string
- getID()#
Returns the group’s numeric ID.
- Returns:
Group ID.
- Return type:
number
- getUnit(unitNumber)#
Returns the unit within the group at the given unit number (as set in the Mission Editor), or
nilif that unit is dead/nonexistent.- Parameters:
unitNumber (
number) – 1-based unit number within the group.- Returns:
The matching unit, or
nil.- Return type:
- getUnits()#
Returns a table of all currently-existing units in the group.
- Returns:
The group’s units.
- Return type:
table
- getSize()#
Returns the number of units currently alive in the group.
- Returns:
Current group size.
- Return type:
number
- getInitialSize()#
Returns the number of units the group started the mission with.
- Returns:
Initial group size.
- Return type:
number
- getController()#
Returns the group’s Controller, used to issue AI tasking, options, and commands to the entire group.
- Returns:
The group’s controller.
- Return type:
- enableEmission(enabled)#
Enables or disables radar/sensor/radio emissions for every unit in the group.
- Parameters:
enabled (
boolean) – Whether emissions should be enabled.
Enumerators#
Group.Category identifies the group’s category, returned by
Group.getCategory():
Value |
Meaning |
|---|---|
|
Airplane ( |
|
Helicopter ( |
|
Ground vehicle/infantry ( |
|
Ship ( |
|
Train ( |
Footnotes#
A
Groupobject can also be obtained from a memberUnitviaUnit.getGroup().