Module Group

GROUP class.

GROUP class

The GROUP class is a wrapper class to handle the DCS Group objects:

  • Support all DCS Group APIs.
  • Enhance with Group specific APIs not in the DCS Group API set.
  • Handle local Group Controller.
  • Manage the "state" of the DCS Group.

GROUP reference methods

For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object. This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the SPAWN class).

The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference using the DCS Group or the DCS GroupName.

Another thing to know is that GROUP objects do not "contain" the DCS Group object. The GROUP methods will reference the DCS Group object by name when it is needed during API execution. If the DCS Group object does not exist or is nil, the GROUP methods will return nil and log an exception in the DCS.log file.

The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance:

  • GROUP.Find(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
  • GROUP.FindByName(): Find a GROUP instance from the _DATABASE object using a DCS Group name.

IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).

Global(s)

GROUP

Type DCSGroup

DCSGroup.id_

The ID of the group in DCS

Type GROUP

GROUP:Activate()

Activates a GROUP.

GROUP:AllOnGround()

Returns if all units of the group are on the ground or landed.

GROUP.ClassName
GROUP:CommandDoScript(DoScript)

Do Script command

GROUP:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)

Perform a switch waypoint command

GROUP.Controller
GROUP:CopyRoute(Begin, End, Randomize, Radius)

Return the route of a group by using the Database#DATABASE class.

GROUP.DCSGroup

The DCS group class.

GROUP:Destroy()

Destroys the DCS Group and all of its DCS Units.

GROUP:EnRouteTaskAWACS()

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

GROUP:EnRouteTaskEWR()

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

GROUP:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)

(AIR) Engaging a group.

GROUP:EnRouteTaskEngageTargets(Distance, <, Priority, TargetTypes)

(AIR) Engaging targets of defined types.

GROUP:EnRouteTaskEngageUnit(AttackUnit, Priority, WeaponType, WeaponExpend, AttackQty, Direction, AttackQtyLimit, GroupAttack)

(AIR) Attack the Unit.

GROUP:EnRouteTaskFAC(Radius, Priority)

(AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.

GROUP:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink)

(AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.

GROUP:EnRouteTaskTanker()

(AIR) Aircraft will act as a tanker for friendly units.

GROUP:Find(DCSGroup)

Find the GROUP wrapper class instance using the DCS Group.

GROUP:FindByName(GroupName)

Find the created GROUP using the DCS Group Name.

GROUP:GetCallsign()

Gets the CallSign of the first DCS Unit of the DCS Group.

GROUP:GetCategory()

Returns category of the DCS Group.

GROUP:GetCategoryName()

Returns the category name of the DCS Group.

GROUP:GetCoalition()

Returns the coalition of the DCS Group.

GROUP:GetCountry()

Returns the country of the DCS Group.

GROUP:GetDCSGroup()

Returns the DCS Group.

GROUP:GetDCSUnit(UnitNumber)

Returns the DCS Unit with number UnitNumber.

GROUP:GetDCSUnits()

Returns the DCS Units of the DCS Group.

GROUP:GetDetectedTargets()
GROUP:GetID()

Returns the DCS Group identifier.

GROUP:GetInitialSize()
  • Returns the initial size of the DCS Group.
GROUP:GetMaxHeight()

Returns the current maximum height of the group.

GROUP:GetMaxVelocity()

Returns the current maximum velocity of the group.

GROUP:GetMinHeight()

Returns the current minimum height of the group.

GROUP:GetName()

Returns the name of the DCS Group.

GROUP:GetPointVec2()

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

GROUP:GetPointVec3()

Returns the current point (Vec3 vector) of the first DCS Unit in the DCS Group.

GROUP:GetSize()

Returns current size of the DCS Group.

GROUP:GetTaskMission()

Return the mission template of the group.

GROUP:GetTaskRoute()

Return the mission route of the group.

GROUP:GetTypeName()

Gets the type name of the group.

GROUP:GetUnit(UnitNumber)

Returns the UNIT wrapper class with number UnitNumber.

GROUP:GetUnits()

Returns the UNITs wrappers of the DCS Units of the DCS Group.

GROUP.GroupID
GROUP.GroupName

The name of the group.

GROUP:IsAir()

Returns if the group is of an air category.

GROUP:IsAirPlane()

Returns if the DCS Group contains AirPlanes.

GROUP:IsAlive()

Returns if the DCS Group is alive.

GROUP:IsGround()

Returns if the DCS Group contains Ground troops.

GROUP:IsHelicopter()

Returns if the DCS Group contains Helicopters.

GROUP:IsShip()

Returns if the DCS Group contains Ships.

GROUP:IsTargetDetected(DCSObject)
GROUP:Message(Message, Duration)

Returns a message for a coalition or a client.

GROUP:MessageToAll(Message, Duration)

Send a message to all coalitions.

GROUP:MessageToBlue(Message, Duration)

Send a message to the blue coalition.

GROUP:MessageToClient(Message, Duration, Client)

Send a message to a client.

GROUP:MessageToRed(Message, Duration)

Send a message to the red coalition.

GROUP:OptionROEHoldFire()

Holding weapons.

GROUP:OptionROEHoldFirePossible()

Can the GROUP hold their weapons?

GROUP:OptionROEOpenFire()

Openfire.

GROUP:OptionROEOpenFirePossible()

Can the GROUP attack designated targets?

GROUP:OptionROEReturnFire()

Return fire.

GROUP:OptionROEReturnFirePossible()

Can the GROUP attack returning on enemy fire?

GROUP:OptionROEWeaponFree()

Weapon free.

GROUP:OptionROEWeaponFreePossible()

Can the GROUP attack targets of opportunity?

GROUP:OptionROTEvadeFire()

Evade on fire.

GROUP:OptionROTEvadeFirePossible()

Can the GROUP evade on enemy fire?

GROUP:OptionROTNoReaction()

No evasion on enemy threats.

GROUP:OptionROTNoReactionPossible()

Can the GROUP ignore enemy fire?

GROUP:OptionROTPassiveDefense()

Evasion passive defense.

GROUP:OptionROTPassiveDefensePossible()

Can the GROUP evade using passive defenses?

GROUP:OptionROTVertical()

Evade on fire using vertical manoeuvres.

GROUP:OptionROTVerticalPossible()

Can the GROUP evade on fire using vertical manoeuvres?

GROUP:PopCurrentTask()

Popping current Task from the group.

GROUP:PushTask(DCSTask, WaitTime)

Pushing Task on the queue from the group.

GROUP:Register(GroupName)

Create a new GROUP from a DCSGroup

GROUP:Route(GoPoints)

Make the group to follow a given route.

GROUP:SetCommand(DCSCommand)

Executes a command action

GROUP:SetTask(DCSTask, WaitTime)

Clearing the Task Queue and Setting the Task on the queue from the group.

GROUP:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)

(AIR) Attack a Group.

GROUP:TaskAttackMapObject(PointVec2, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Attacking the map object (building, structure, e.t.c).

GROUP:TaskAttackUnit(AttackUnit, WeaponType, WeaponExpend, AttackQty, Direction, AttackQtyLimit, GroupAttack)

(AIR) Attack the Unit.

GROUP:TaskBombing(PointVec2, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Delivering weapon at the point on the ground.

GROUP:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Delivering weapon on the runway.

GROUP:TaskCombo(<, DCSTasks)

Return a Combo Task taking an array of Tasks

GROUP:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint)

Return a condition section for a controlled task

GROUP:TaskControlled(DCSTask, DCSStopCondition)

Return a Controlled Task taking a Task and a TaskCondition

GROUP:TaskEmbarkToTransportAtVec2(Point, Radius)

Move to a defined Vec2 Point, and embark to a group when arrived within a defined Radius.

GROUP:TaskEmbarkingAtVec2(Point, Duration, EmbarkingGroup)

Move the group to a Vec2 Point, wait for a defined duration and embark a group.

GROUP:TaskEscort(EscortGroup, PointVec3, LastWaypointIndex, EngagementDistanceMax, <, FollowGroup, EngagementDistance, TargetTypes)

(AIR) Escort another airborne group.

GROUP:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink)

(AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.

GROUP:TaskFireAtPoint(The, Radius, PointVec2)

(GROUND) Fire at a VEC2 point until ammunition is finished.

GROUP:TaskFollow(FollowGroup, PointVec3, LastWaypointIndex)

(AIR) Following another airborne group.

GROUP:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments)
GROUP:TaskHold()

(GROUND) Hold ground group from moving.

GROUP:TaskHoldPosition(Duration)

(AIR) Hold position at the current position of the first unit of the group.

GROUP:TaskLandAtVec2(Point, Duration)

(AIR HELICOPTER) Landing at the ground.

GROUP:TaskLandAtZone(Zone, Duration, RandomPoint)

(AIR) Land the group at a @{Zone#ZONE).

GROUP:TaskMission(TaskMission)

Return a Misson task from a mission template.

GROUP:TaskOrbitCircle(Altitude, Speed)

(AIR) Orbit at the current position of the first unit of the group at a specified alititude

GROUP:TaskOrbitCircleAtVec2(Point, Altitude, Speed)

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

GROUP:TaskRefueling()

(AIR) Refueling from the nearest tanker.

GROUP:TaskRoute(Points)

Return a Misson task to follow a given route defined by Points.

GROUP:TaskRouteToVec2(Point, Speed)

Make the DCS Group to fly to a given point and hover.

GROUP:TaskRouteToVec3(Point, Speed)

Make the DCS Group to fly to a given point and hover.

GROUP:TaskRouteToZone(Zone, Randomize, Speed, Formation)

Route the group to a given zone.

GROUP:TaskWrappedAction(DCSCommand, Index)

Return a WrappedAction Task taking a Command

GROUP:WayPointExecute(WayPoint, The, WaitTime)

Executes the WayPoint plan.

GROUP:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...)

Registers a waypoint function that will be executed when the group moves over the WayPoint.

GROUP.WayPointFunctions
GROUP:WayPointInitialize()

Retrieve the group mission and allow to place function hooks within the mission waypoint plan.

GROUP.WayPoints
GROUP:_GetController()

Get the controller for the GROUP.

Global(s)

#GROUP GROUP

Type Group

Type DCSCommand

Type DCSGroup

A DCSGroup

Field(s)

DCSGroup.id_

The ID of the group in DCS

Type DCSStopCondition

Type Duration

Type GROUP

The GROUP class

Field(s)

GROUP:Activate()

Activates a GROUP.

GROUP:AllOnGround()

Returns if all units of the group are on the ground or landed.

If all units of this group are on the ground, this function will return true, otherwise false.

Return value

#boolean: All units on the ground result.

#string GROUP.ClassName
GROUP:CommandDoScript(DoScript)

Do Script command

Parameter

  • #string DoScript :

Return value

#DCSCommand:

GROUP:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)

Perform a switch waypoint command

Parameters

  • #number FromWayPoint :

  • #number ToWayPoint :

  • Index :

Return value

DCSTask#Task:

GROUP.Controller
GROUP:CopyRoute(Begin, End, Randomize, Radius)

Return the route of a group by using the Database#DATABASE class.

Parameters

  • #number Begin : The route point from where the copy will start. The base route point is 0.

  • #number End : The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

  • #boolean Randomize : Randomization of the route, when true.

  • #number Radius : When randomization is on, the randomization is within the radius.

DCSGroup#Group GROUP.DCSGroup

The DCS group class.

GROUP:Destroy()

Destroys the DCS Group and all of its DCS Units.

Note that this destroy method also raises a destroy event at run-time. So all event listeners will catch the destroy event of this DCS Group.

GROUP:EnRouteTaskAWACS()

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

No parameters.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskEWR()

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

No parameters.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)

(AIR) Engaging a group.

The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.

Parameters

  • Group#GROUP AttackGroup : The Group to be attacked.

  • #number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • DCSTypes#Distance Altitude : (optional) Desired attack start altitude. Group/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/group will choose closest altitude to the desired attack start altitude. If the desired altitude is defined group/aircraft will not attack from safe altitude.

  • #boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskEngageTargets(Distance, <, Priority, TargetTypes)

(AIR) Engaging targets of defined types.

Parameters

  • DCSTypes#Distance Distance : Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.

  • #list < : DCSTypes#AttributeName> TargetTypes Array of target categories allowed to engage.

  • #number Priority : All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

  • TargetTypes :

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskEngageUnit(AttackUnit, Priority, WeaponType, WeaponExpend, AttackQty, Direction, AttackQtyLimit, GroupAttack)

(AIR) Attack the Unit.

Parameters

  • Unit#UNIT AttackUnit : The UNIT.

  • #number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • #boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

  • #boolean GroupAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskFAC(Radius, Priority)

(AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. If the task is assigned to the group lead unit will be a FAC.

Parameters

  • DCSTypes#Distance Radius : The maximal distance from the FAC to a target.

  • #number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink)

(AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. If the task is assigned to the group lead unit will be a FAC.

Parameters

  • Group#GROUP AttackGroup : Target GROUP.

  • #number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

  • #number WeaponType : Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.Designation Designation : (optional) Designation type.

  • #boolean Datalink : (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

Return value

DCSTask#Task: The DCS task structure.

GROUP:EnRouteTaskTanker()

(AIR) Aircraft will act as a tanker for friendly units.

No parameters.

Return value

DCSTask#Task: The DCS task structure.

GROUP:Find(DCSGroup)

Find the GROUP wrapper class instance using the DCS Group.

Parameter

Return value

#GROUP: The GROUP.

GROUP:FindByName(GroupName)

Find the created GROUP using the DCS Group Name.

Parameter

  • #string GroupName : The DCS Group Name.

Return value

#GROUP: The GROUP.

GROUP:GetCallsign()

Gets the CallSign of the first DCS Unit of the DCS Group.

Return value

#string: The CallSign of the first DCS Unit of the DCS Group.

GROUP:GetCategory()

Returns category of the DCS Group.

Return value

DCSGroup#Group.Category: The category ID

GROUP:GetCategoryName()

Returns the category name of the DCS Group.

Return value

#string: Category name = Helicopter, Airplane, Ground Unit, Ship

GROUP:GetCoalition()

Returns the coalition of the DCS Group.

Return value

DCSCoalitionObject#coalition.side: The coalition side of the DCS Group.

GROUP:GetCountry()

Returns the country of the DCS Group.

Return values

  1. DCScountry#country.id: The country identifier.

  2. #nil: The DCS Group is not existing or alive.

GROUP:GetDCSGroup()

Returns the DCS Group.

Return value

DCSGroup#Group: The DCS Group.

GROUP:GetDCSUnit(UnitNumber)

Returns the DCS Unit with number UnitNumber.

If the underlying DCS Unit does not exist, the method will return nil. .

Parameter

  • #number UnitNumber : The number of the DCS Unit to be returned.

Return value

DCSUnit#Unit: The DCS Unit.

GROUP:GetDCSUnits()

Returns the DCS Units of the DCS Group.

Return value

#table: The DCS Units.

GROUP:GetDetectedTargets()
GROUP:GetID()

Returns the DCS Group identifier.

Return value

#number: The identifier of the DCS Group.

GROUP:GetInitialSize()
  • Returns the initial size of the DCS Group.

If some of the DCS Units of the DCS Group are destroyed, the initial size of the DCS Group is unchanged.

Return value

#number: The DCS Group initial size.

GROUP:GetMaxHeight()

Returns the current maximum height of the group.

Each unit within the group gets evaluated, and the maximum height (= the unit which is the highest elevated) is returned.

Return value

#number: Maximum height found.

GROUP:GetMaxVelocity()

Returns the current maximum velocity of the group.

Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.

Return value

#number: Maximum velocity found.

GROUP:GetMinHeight()

Returns the current minimum height of the group.

Each unit within the group gets evaluated, and the minimum height (= the unit which is the lowest elevated) is returned.

Return value

#number: Minimum height found.

GROUP:GetName()

Returns the name of the DCS Group.

Return value

#string: The DCS Group name.

GROUP:GetPointVec2()

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

Return value

DCSTypes#Vec2: Current Vec2 point of the first DCS Unit of the DCS Group.

GROUP:GetPointVec3()

Returns the current point (Vec3 vector) of the first DCS Unit in the DCS Group.

Return value

DCSTypes#Vec3: Current Vec3 point of the first DCS Unit of the DCS Group.

GROUP:GetSize()

Returns current size of the DCS Group.

If some of the DCS Units of the DCS Group are destroyed the size of the DCS Group is changed.

Return value

#number: The DCS Group size.

GROUP:GetTaskMission()

Return the mission template of the group.

Return value

#table: The MissionTemplate

GROUP:GetTaskRoute()

Return the mission route of the group.

Return value

#table: The mission route defined by points.

GROUP:GetTypeName()

Gets the type name of the group.

Return value

#string: The type name of the group.

GROUP:GetUnit(UnitNumber)

Returns the UNIT wrapper class with number UnitNumber.

If the underlying DCS Unit does not exist, the method will return nil. .

Parameter

  • #number UnitNumber : The number of the UNIT wrapper class to be returned.

Return value

Unit#UNIT: The UNIT wrapper class.

GROUP:GetUnits()

Returns the UNITs wrappers of the DCS Units of the DCS Group.

Return value

#table: The UNITs wrappers.

#number GROUP.GroupID
#string GROUP.GroupName

The name of the group.

GROUP:IsAir()

Returns if the group is of an air category.

If the group is a helicopter or a plane, then this method will return true, otherwise false.

Return value

#boolean: Air category evaluation result.

GROUP:IsAirPlane()

Returns if the DCS Group contains AirPlanes.

Return value

#boolean: true if DCS Group contains AirPlanes.

GROUP:IsAlive()

Returns if the DCS Group is alive.

When the group exists at run-time, this method will return true, otherwise false.

Return value

#boolean: true if the DCS Group is alive.

GROUP:IsGround()

Returns if the DCS Group contains Ground troops.

Return value

#boolean: true if DCS Group contains Ground troops.

GROUP:IsHelicopter()

Returns if the DCS Group contains Helicopters.

Return value

#boolean: true if DCS Group contains Helicopters.

GROUP:IsShip()

Returns if the DCS Group contains Ships.

Return value

#boolean: true if DCS Group contains Ships.

GROUP:IsTargetDetected(DCSObject)

Parameter

  • DCSObject :

GROUP:Message(Message, Duration)

Returns a message for a coalition or a client.

Parameters

  • #string Message : The message text

  • #Duration Duration : The duration of the message.

Return value

Message#MESSAGE:

GROUP:MessageToAll(Message, Duration)

Send a message to all coalitions.

The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

Parameters

  • #string Message : The message text

  • #Duration Duration : The duration of the message.

GROUP:MessageToBlue(Message, Duration)

Send a message to the blue coalition.

The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

Parameters

  • #string Message : The message text

  • #Duration Duration : The duration of the message.

GROUP:MessageToClient(Message, Duration, Client)

Send a message to a client.

The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

Parameters

  • #string Message : The message text

  • #Duration Duration : The duration of the message.

  • Client#CLIENT Client : The client object receiving the message.

GROUP:MessageToRed(Message, Duration)

Send a message to the red coalition.

The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

Parameters

  • #string Message : The message text

  • #Duration Duration : The duration of the message.

GROUP:OptionROEHoldFire()

Holding weapons.

Return value

Group#GROUP: self

GROUP:OptionROEHoldFirePossible()

Can the GROUP hold their weapons?

Return value

#boolean:

GROUP:OptionROEOpenFire()

Openfire.

Return value

#GROUP: self

GROUP:OptionROEOpenFirePossible()

Can the GROUP attack designated targets?

Return value

#boolean:

GROUP:OptionROEReturnFire()

Return fire.

Return value

#GROUP: self

GROUP:OptionROEReturnFirePossible()

Can the GROUP attack returning on enemy fire?

Return value

#boolean:

GROUP:OptionROEWeaponFree()

Weapon free.

Return value

#GROUP: self

GROUP:OptionROEWeaponFreePossible()

Can the GROUP attack targets of opportunity?

Return value

#boolean:

GROUP:OptionROTEvadeFire()

Evade on fire.

Return value

#GROUP: self

GROUP:OptionROTEvadeFirePossible()

Can the GROUP evade on enemy fire?

Return value

#boolean:

GROUP:OptionROTNoReaction()

No evasion on enemy threats.

Return value

#GROUP: self

GROUP:OptionROTNoReactionPossible()

Can the GROUP ignore enemy fire?

Return value

#boolean:

GROUP:OptionROTPassiveDefense()

Evasion passive defense.

Return value

#GROUP: self

GROUP:OptionROTPassiveDefensePossible()

Can the GROUP evade using passive defenses?

Return value

#boolean:

GROUP:OptionROTVertical()

Evade on fire using vertical manoeuvres.

Return value

#GROUP: self

GROUP:OptionROTVerticalPossible()

Can the GROUP evade on fire using vertical manoeuvres?

Return value

#boolean:

GROUP:PopCurrentTask()

Popping current Task from the group.

Return value

Group#GROUP: self

GROUP:PushTask(DCSTask, WaitTime)

Pushing Task on the queue from the group.

Parameters

  • DCSTask :

  • WaitTime :

Return value

Group#GROUP: self

GROUP:Register(GroupName)

Create a new GROUP from a DCSGroup

Parameter

Return value

#GROUP: self

GROUP:Route(GoPoints)

Make the group to follow a given route.

Parameter

  • #table GoPoints : A table of Route Points.

Return value

#GROUP: self

GROUP:SetCommand(DCSCommand)

Executes a command action

Parameter

Return value

#GROUP: self

GROUP:SetTask(DCSTask, WaitTime)

Clearing the Task Queue and Setting the Task on the queue from the group.

Parameters

  • DCSTask :

  • WaitTime :

Return value

Group#GROUP: self

GROUP:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)

(AIR) Attack a Group.

Parameters

  • Group#GROUP AttackGroup : The Group to be attacked.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • DCSTypes#Distance Altitude : (optional) Desired attack start altitude. Group/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/group will choose closest altitude to the desired attack start altitude. If the desired altitude is defined group/aircraft will not attack from safe altitude.

  • #boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskAttackMapObject(PointVec2, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Attacking the map object (building, structure, e.t.c).

Parameters

  • DCSTypes#Vec2 PointVec2 : 2D-coordinates of the point the map object is closest to. The distance between the point and the map object must not be greater than 2000 meters. Object id is not used here because Mission Editor doesn't support map object identificators.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • #boolean GroupAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskAttackUnit(AttackUnit, WeaponType, WeaponExpend, AttackQty, Direction, AttackQtyLimit, GroupAttack)

(AIR) Attack the Unit.

Parameters

  • Unit#UNIT AttackUnit : The unit.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • #boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

  • #boolean GroupAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskBombing(PointVec2, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Delivering weapon at the point on the ground.

Parameters

  • DCSTypes#Vec2 PointVec2 : 2D-coordinates of the point to deliver weapon at.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) Desired quantity of passes. The parameter is not the same in AttackGroup and AttackUnit tasks.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • #boolean GroupAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack)

(AIR) Delivering weapon on the runway.

Parameters

  • Airbase#AIRBASE Airbase : Airbase to attack.

  • #number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / group will choose expend on its own discretion.

  • #number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/group will not make more attack than allowed even if the target group not destroyed and the aicraft/group still have ammo. If not defined the aircraft/group will attack target until it will be destroyed or until the aircraft/group will run out of ammo.

  • DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Group/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain group/aircraft will choose another direction.

  • #boolean GroupAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the group. Has effect only if the task is assigned to a group, not to a single aircraft.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskCombo(<, DCSTasks)

Return a Combo Task taking an array of Tasks

Parameters

  • #list < : CSTask#Task> DCSTasks

  • DCSTasks :

Return value

DCSTask#Task:

GROUP:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint)

Return a condition section for a controlled task

Parameters

  • DCSTime#Time time :

  • #string userFlag :

  • #boolean userFlagValue :

  • #string condition :

  • DCSTime#Time duration :

  • #number lastWayPoint : return DCSTask#Task

GROUP:TaskControlled(DCSTask, DCSStopCondition)

Return a Controlled Task taking a Task and a TaskCondition

Parameters

Return value

DCSTask#Task:

GROUP:TaskEmbarkToTransportAtVec2(Point, Radius)

Move to a defined Vec2 Point, and embark to a group when arrived within a defined Radius.

Parameters

  • DCSTypes#Vec2 Point : The point where to wait.

  • #number Radius : The radius of the embarking zone around the Point.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskEmbarkingAtVec2(Point, Duration, EmbarkingGroup)

Move the group to a Vec2 Point, wait for a defined duration and embark a group.

Parameters

  • DCSTypes#Vec2 Point : The point where to wait.

  • #number Duration : The duration in seconds to wait.

  • #GROUP EmbarkingGroup : The group to be embarked.

Return value

DCSTask#Task: The DCS task structure

GROUP:TaskEscort(EscortGroup, PointVec3, LastWaypointIndex, EngagementDistanceMax, <, FollowGroup, EngagementDistance, TargetTypes)

(AIR) Escort another airborne group.

The unit / group will follow lead unit of another group, wingmens of both groups will continue following their leaders. The unit / group will also protect that group from threats of specified types.

Parameters

  • Group#GROUP EscortGroup : The group to be escorted.

  • DCSTypes#Vec3 PointVec3 : Position of the unit / lead unit of the group relative lead unit of another group in frame reference oriented by course of lead unit of another group. If another group is on land the unit / group will orbit around.

  • #number LastWaypointIndex : Detach waypoint of another group. Once reached the unit / group Follow task is finished.

  • #number EngagementDistanceMax : Maximal distance from escorted group to threat. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.

  • #list < : CSTypes#AttributeName> TargetTypes Array of AttributeName that is contains threat categories allowed to engage.

  • FollowGroup :

  • EngagementDistance :

  • TargetTypes :

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink)

(AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. If the task is assigned to the group lead unit will be a FAC.

Parameters

  • Group#GROUP AttackGroup : Target GROUP.

  • #number WeaponType : Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

  • DCSTypes#AI.Task.Designation Designation : (optional) Designation type.

  • #boolean Datalink : (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskFireAtPoint(The, Radius, PointVec2)

(GROUND) Fire at a VEC2 point until ammunition is finished.

Parameters

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskFollow(FollowGroup, PointVec3, LastWaypointIndex)

(AIR) Following another airborne group.

The unit / group will follow lead unit of another group, wingmens of both groups will continue following their leaders. If another group is on land the unit / group will orbit around.

Parameters

  • Group#GROUP FollowGroup : The group to be followed.

  • DCSTypes#Vec3 PointVec3 : Position of the unit / lead unit of the group relative lead unit of another group in frame reference oriented by course of lead unit of another group. If another group is on land the unit / group will orbit around.

  • #number LastWaypointIndex : Detach waypoint of another group. Once reached the unit / group Follow task is finished.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments)

Parameters

  • WayPoint :

  • WayPointIndex :

  • FunctionString :

  • FunctionArguments :

GROUP:TaskHold()

(GROUND) Hold ground group from moving.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskHoldPosition(Duration)

(AIR) Hold position at the current position of the first unit of the group.

Parameter

  • #number Duration : The maximum duration in seconds to hold the position.

Return value

#GROUP: self

GROUP:TaskLandAtVec2(Point, Duration)

(AIR HELICOPTER) Landing at the ground.

For helicopters only.

Parameters

  • DCSTypes#Vec2 Point : The point where to land.

  • #number Duration : The duration in seconds to stay on the ground.

Return value

#GROUP: self

GROUP:TaskLandAtZone(Zone, Duration, RandomPoint)

(AIR) Land the group at a @{Zone#ZONE).

Parameters

  • Zone#ZONE Zone : The zone where to land.

  • #number Duration : The duration in seconds to stay on the ground.

  • RandomPoint :

Return value

#GROUP: self

GROUP:TaskMission(TaskMission)

Return a Misson task from a mission template.

Parameter

  • #table TaskMission : A table containing the mission task.

Return value

DCSTask#Task:

GROUP:TaskOrbitCircle(Altitude, Speed)

(AIR) Orbit at the current position of the first unit of the group at a specified alititude

Parameters

  • #number Altitude : The altitude to hold the position.

  • #number Speed : The speed flying when holding the position.

Return value

#GROUP: self

GROUP:TaskOrbitCircleAtVec2(Point, Altitude, Speed)

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

Parameters

  • DCSTypes#Vec2 Point : The point to hold the position.

  • #number Altitude : The altitude to hold the position.

  • #number Speed : The speed flying when holding the position.

Return value

#GROUP: self

GROUP:TaskRefueling()

(AIR) Refueling from the nearest tanker.

No parameters.

Return value

DCSTask#Task: The DCS task structure.

GROUP:TaskRoute(Points)

Return a Misson task to follow a given route defined by Points.

Parameter

  • #table Points : A table of route points.

Return value

DCSTask#Task:

GROUP:TaskRouteToVec2(Point, Speed)

Make the DCS Group to fly to a given point and hover.

Parameters

  • DCSTypes#Vec3 Point : The destination point in Vec3 format.

  • #number Speed : The speed to travel.

Return value

#GROUP: self

GROUP:TaskRouteToVec3(Point, Speed)

Make the DCS Group to fly to a given point and hover.

Parameters

  • DCSTypes#Vec3 Point : The destination point in Vec3 format.

  • #number Speed : The speed to travel.

Return value

#GROUP: self

GROUP:TaskRouteToZone(Zone, Randomize, Speed, Formation)

Route the group to a given zone.

The group final destination point can be randomized. A speed can be given in km/h. A given formation can be given.

Parameters

  • Zone#ZONE Zone : The zone where to route to.

  • #boolean Randomize : Defines whether to target point gets randomized within the Zone.

  • #number Speed : The speed.

  • Base#FORMATION Formation : The formation string.

GROUP:TaskWrappedAction(DCSCommand, Index)

Return a WrappedAction Task taking a Command

Parameters

Return value

DCSTask#Task:

GROUP:WayPointExecute(WayPoint, The, WaitTime)

Executes the WayPoint plan.

The function gets a WayPoint parameter, that you can use to restart the mission at a specific WayPoint. Note that when the WayPoint parameter is used, the new start mission waypoint of the group will be 1!

Parameters

  • #number WayPoint : The WayPoint from where to execute the mission.

  • #WaitTime The : amount seconds to wait before initiating the mission.

  • WaitTime :

Return value

#GROUP:

GROUP:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...)

Registers a waypoint function that will be executed when the group moves over the WayPoint.

Parameters

  • #number WayPoint : The waypoint number. Note that the start waypoint on the route is WayPoint 1!

  • #number WayPointIndex : When defining multiple WayPoint functions for one WayPoint, use WayPointIndex to set the sequence of actions.

  • #function WayPointFunction : The waypoint function to be called when the group moves over the waypoint. The waypoint function takes variable parameters.

  • ... :

Return value

#GROUP:

GROUP.WayPointFunctions
GROUP:WayPointInitialize()

Retrieve the group mission and allow to place function hooks within the mission waypoint plan.

Use the method Group#GROUP to define the hook functions for specific waypoints. Use the method @{Group@GROUP:WayPointExecute) to start the execution of the new mission plan. Note that when WayPointInitialize is called, the Mission of the group is RESTARTED!

Return value

#GROUP:

GROUP.WayPoints
GROUP:_GetController()

Get the controller for the GROUP.

Return value

DCSController#Controller:

Type WaitTime

Type list