Module Group

A GROUP class abstraction of a DCSGroup class.

The GROUP class will take an abstraction of the DCSGroup class, providing more methods that can be done with a GROUP.

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.Controller

The controller of the group.

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()

Destroy a GROUP Note that this destroy method also raises a destroy event at run-time.

GROUP.FindGroup(Group, DCSGroup)

Find the created GROUP using the DCSGroup ID.

GROUP:GetCallsign()

Gets the callsign of the fist unit of the group.

GROUP:GetDCSGroup()

Gets the DCSGroup of the GROUP.

GROUP:GetDCSUnit(UnitNumber)

Gets the DCS Unit of the GROUP.

GROUP:GetDetectedTargets()
GROUP:GetID()

Gets the ID of the 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()

Gets the name of the GROUP.

GROUP:GetPointVec2()

Gets the current Point of the GROUP in VEC3 format.

GROUP:GetPositionVec3()

Gets the current Point of the GROUP in VEC3 format.

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)

Gets the DCS Unit.

GROUP.GroupID

the ID of the group.

GROUP.GroupName

The name of the group.

GROUP:IsAir()

Returns if the group is of an air category.

GROUP:IsAlive()

Returns if the group is alive.

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:New(DCSGroup)

Create a new GROUP from a DCSGroup

GROUP:NewFromDCSUnit(DCSUnit)

Create a new GROUP from an existing DCSUnit in the mission.

GROUP:NewFromName(GroupName)

Create a new GROUP from an existing group name.

GROUP:OptionROEHoldFire()

Holding weapons.

GROUP:OptionROEOpenFire()

Openfire.

GROUP:OptionROEReturnFire()

Return fire.

GROUP:OptionROEWeaponFree()

Weapon free.

GROUP:OptionROTEvadeFire()

Evade fire.

GROUP:OptionROTNoReaction()

No evasion on enemy threats.

GROUP:OptionROTPassiveDefense()

Evasion passive defense.

GROUP:OptionROTVertical()

Vertical manoeuvres.

GROUP:PopCurrentTask()

Popping current Task from the group.

GROUP:PushTask(DCSTask)

Pushing Task on the queue from the group.

GROUP:RegisterWayPoint(WayPoint)
GROUP:Route(GoPoints)

Make the group to follow a given route.

GROUP:SetTask(DCSTask)

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

GROUP:TaskAttackUnit(The, AttackUnit)

Attack the Unit.

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:TaskHoldPosition(Duration)

Hold position at the current position of the first unit of the group.

GROUP:TaskLandAtVec2(Point, Duration)

Land the group at a Vec2Point.

GROUP:TaskLandAtZone(Zone, Duration)

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

GROUP:TaskMission(TaskMission)

Return a Misson task from a mission template.

GROUP:TaskOrbitCircle(Altitude, Speed)

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

GROUP:TaskOrbitCircleAtVec2(Point, Altitude, Speed)

Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

GROUP:TaskRegisterWayPoint(WayPoint)
GROUP:TaskRoute(Points)

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

GROUP:TaskRouteToVec3(Point, Speed)

Make the group to fly to a given point and hover.

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

Route the group to a given zone.

GROUP:_GetController()

Get the controller for the GROUP.

Type Vec3

Vec3.x
Vec3.y

Global(s)

#GROUP GROUP

Type Group

Type DCSGroup

A DCSGroup

Field(s)

DCSGroup.id_

The ID of the group in DCS

Type DCSStopCondition

Type DCSTask

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
#table GROUP.Controller

The controller of the group.

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()

Destroy a GROUP Note that this destroy method also raises a destroy event at run-time.

So all event listeners will catch the destroy event of this GROUP.

GROUP.FindGroup(Group, DCSGroup)

Find the created GROUP using the DCSGroup ID.

If a GROUP was created with the DCSGroupID, the the GROUP instance will be returned. Otherwise nil will be returned.

Parameters

Return value

#GROUP:

GROUP:GetCallsign()

Gets the callsign of the fist unit of the group.

Return value

#string: The callsign of the first unit of the group.

GROUP:GetDCSGroup()

Gets the DCSGroup of the GROUP.

Return value

#Group: The DCSGroup.

GROUP:GetDCSUnit(UnitNumber)

Gets the DCS Unit of the GROUP.

Parameter

  • #number UnitNumber : The unit index to be returned from the GROUP.

Return value

#Unit: The DCS Unit.

GROUP:GetDetectedTargets()
GROUP:GetID()

Gets the ID of the GROUP.

Return value

#number: The ID of the GROUP.

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()

Gets the name of the GROUP.

Return value

#string: The name of the GROUP.

GROUP:GetPointVec2()

Gets the current Point of the GROUP in VEC3 format.

Return value

#Vec3: Current x,y and z position of the group.

GROUP:GetPositionVec3()

Gets the current Point of the GROUP in VEC3 format.

Return value

#Vec3: Current Vec3 position of the group.

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)

Gets the DCS Unit.

Parameter

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

Return value

Unit#UNIT: The DCS Unit.

#number GROUP.GroupID

the ID of the group.

#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:IsAlive()

Returns if the group is alive.

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

Return value

#boolean: Alive result.

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:New(DCSGroup)

Create a new GROUP from a DCSGroup

Parameter

Return value

#GROUP: self

GROUP:NewFromDCSUnit(DCSUnit)

Create a new GROUP from an existing DCSUnit in the mission.

Parameter

  • DCSUnit : The DCSUnit.

Return value

#GROUP: self

GROUP:NewFromName(GroupName)

Create a new GROUP from an existing group name.

Parameter

  • GroupName : The name of the DCS Group.

Return value

#GROUP: self

GROUP:OptionROEHoldFire()

Holding weapons.

Return value

#GROUP: self

GROUP:OptionROEOpenFire()

Openfire.

Return value

#GROUP: self

GROUP:OptionROEReturnFire()

Return fire.

Return value

#GROUP: self

GROUP:OptionROEWeaponFree()

Weapon free.

Return value

#GROUP: self

GROUP:OptionROTEvadeFire()

Evade fire.

Return value

#GROUP: self

GROUP:OptionROTNoReaction()

No evasion on enemy threats.

Return value

#GROUP: self

GROUP:OptionROTPassiveDefense()

Evasion passive defense.

Return value

#GROUP: self

GROUP:OptionROTVertical()

Vertical manoeuvres.

Return value

#GROUP: self

GROUP:PopCurrentTask()

Popping current Task from the group.

Return value

Group#GROUP: self

GROUP:PushTask(DCSTask)

Pushing Task on the queue from the group.

Parameter

  • DCSTask :

Return value

Group#GROUP: self

GROUP:RegisterWayPoint(WayPoint)

Parameter

  • WayPoint :

GROUP:Route(GoPoints)

Make the group to follow a given route.

Parameter

  • #table GoPoints : A table of Route Points.

Return value

#GROUP: self

GROUP:SetTask(DCSTask)

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

Parameter

  • DCSTask :

Return value

Group#GROUP: self

GROUP:TaskAttackUnit(The, AttackUnit)

Attack the Unit.

Parameters

Return value

#DCSTask: The DCS task structure.

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

Return a condition section for a controlled task

Parameters

  • #Time time :

  • #string userFlag :

  • #boolean userFlagValue :

  • #string condition :

  • #Time duration :

  • #number lastWayPoint :

    return #DCSTask

GROUP:TaskControlled(DCSTask, DCSStopCondition)

Return a Controlled Task taking a Task and a TaskCondition

Parameters

Return value

#DCSTask:

GROUP:TaskEmbarkToTransportAtVec2(Point, Radius)

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

Parameters

  • #Vec2 Point : The point where to wait.

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

Return value

#DCSTask: 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

  • #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: The DCS task structure

GROUP:TaskHoldPosition(Duration)

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)

Land the group at a Vec2Point.

Parameters

  • #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)

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.

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:

GROUP:TaskOrbitCircle(Altitude, Speed)

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)

Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

Parameters

  • #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:TaskRegisterWayPoint(WayPoint)

Parameter

  • WayPoint :

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:

GROUP:TaskRouteToVec3(Point, Speed)

Make the group to fly to a given point and hover.

Parameters

  • #Vec3 Point : The destination point.

  • #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:_GetController()

Get the controller for the GROUP.

Return value

Controller#Controller:

Type Time

Type Unit

Type Vec2

Type Vec3

Field(s)

Vec3.x
Vec3.y