Module Group
This module contains the GROUP class.
1) Group#GROUP class, extends Base#BASE
The Group#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.
IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).
1.1) 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.
1.2) GROUP task methods
Several group task methods are available that help you to prepare tasks. These methods return a string consisting of the task description, which can then be given to either a Group#GROUP.PushTask or Group#SetTask method to assign the task to the GROUP. Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND. Each task description where applicable indicates for which group category the task is valid. There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.
1.2.1) Assigned task methods
Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected. This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.
Find below a list of the assigned task methods:
- GROUP.TaskAttackGroup: (AIR) Attack a Group.
- GROUP.TaskAttackMapObject: (AIR) Attacking the map object (building, structure, e.t.c).
- GROUP.TaskAttackUnit: (AIR) Attack the Unit.
- GROUP.TaskBombing: (AIR) Delivering weapon at the point on the ground.
- GROUP.TaskBombingRunway: (AIR) Delivering weapon on the runway.
- GROUP.TaskEmbarking: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.
- GROUP.TaskEmbarkToTransport: (GROUND) Embark to a Transport landed at a location.
- GROUP.TaskEscort: (AIR) Escort another airborne group.
- GROUP.TaskFAC_AttackGroup: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.
- GROUP.TaskFireAtPoint: (GROUND) Fire at a VEC2 point until ammunition is finished.
- GROUP.TaskFollow: (AIR) Following another airborne group.
- GROUP.TaskHold: (GROUND) Hold ground group from moving.
- GROUP.TaskHoldPosition: (AIR) Hold position at the current position of the first unit of the group.
- GROUP.TaskLand: (AIR HELICOPTER) Landing at the ground. For helicopters only.
- GROUP.TaskLandAtZone: (AIR) Land the group at a GROUP.TaskOrbitCircle: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.
- GROUP.TaskOrbitCircleAtVec2: (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. No parameters.
- GROUP.TaskRoute: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
- GROUP.TaskRouteToVec2: (AIR + GROUND) Make the Group move to a given point.
- GROUP.TaskRouteToVec3: (AIR + GROUND) Make the Group move to a given point.
- GROUP.TaskRouteToZone: (AIR + GROUND) Route the group to a given zone.
- GROUP.TaskReturnToBase: (AIR) Route the group to an airbase.
1.2.2) EnRoute task methods
EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:
- GROUP.EnRouteTaskAWACS: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
- GROUP.EnRouteTaskEngageGroup: (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.
- GROUP.EnRouteTaskEngageTargets: (AIR) Engaging targets of defined types.
- GROUP.EnRouteTaskEWR: (AIR) Attack the Unit.
- GROUP.EnRouteTaskFAC: (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: (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. No parameters.
1.2.3) Preparation task methods
There are certain task methods that allow to tailor the task behaviour:
- GROUP.TaskWrappedAction: Return a WrappedAction Task taking a Command.
- GROUP.TaskCombo: Return a Combo Task taking an array of Tasks.
- GROUP.TaskCondition: Return a condition section for a controlled task.
- GROUP.TaskControlled: Return a Controlled Task taking a Task and a TaskCondition.
1.2.4) Obtain the mission from group templates
Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:
- GROUP.TaskMission: (AIR + GROUND) Return a mission task from a mission template.
1.3) GROUP Command methods
Group command methods prepare the execution of commands using the GROUP.SetCommand method:
- GROUP.CommandDoScript: Do Script command.
- GROUP.CommandSwitchWayPoint: Perform a switch waypoint command.
1.4) GROUP Option methods
Group Option methods change the behaviour of the Group while being alive.
1.4.1) Rule of Engagement:
- GROUP.OptionROEWeaponFree
- GROUP.OptionROEOpenFire
- GROUP.OptionROEReturnFire
- GROUP.OptionROEEvadeFire
To check whether an ROE option is valid for a specific group, use:
- GROUP.OptionROEWeaponFreePossible
- GROUP.OptionROEOpenFirePossible
- GROUP.OptionROEReturnFirePossible
- GROUP.OptionROEEvadeFirePossible
1.4.2) Rule on thread:
- GROUP.OptionROTNoReaction
- GROUP.OptionROTPassiveDefense
- GROUP.OptionROTEvadeFire
- GROUP.OptionROTVertical
To test whether an ROT option is valid for a specific group, use:
- GROUP.OptionROTNoReactionPossible
- GROUP.OptionROTPassiveDefensePossible
- GROUP.OptionROTEvadeFirePossible
- GROUP.OptionROTVerticalPossible
1.5) GROUP Zone validation methods
The group can be validated whether it is completely, partly or not within a Zone. Use the following Zone validation methods on the group:
- GROUP.IsCompletelyInZone: Returns true if all units of the group are within a Zone.
- GROUP.IsPartlyInZone: Returns true if some units of the group are within a Zone.
- GROUP.IsNotInZone: Returns true if none of the group units of the group are within a Zone.
The zone can be of any Zone class derived from Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.
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:CommandStopRoute(StopRoute, Index) |
Perform stop route 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, TargetTypes, Priority) |
(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() |
|
| 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:GetTemplate() | |
| 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:IsCompletelyInZone(Zone) |
Returns true if all units of the group are within a Zone. |
| GROUP:IsGround() |
Returns if the DCS Group contains Ground troops. |
| GROUP:IsHelicopter() |
Returns if the DCS Group contains Helicopters. |
| GROUP:IsNotInZone(Zone) |
Returns true if none of the group units of the group are within a Zone. |
| GROUP:IsPartlyInZone(Zone) |
Returns true if some units of the group are within a Zone. |
| 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:Respawn(Template) | |
| GROUP:Route(GoPoints) |
Make the group to follow a given route. |
| GROUP:RouteReturnToAirbase(ReturnAirbase, Speed) |
(AIR) Return the Group to an Airbase#AIRBASE A speed can be given in km/h. |
| 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:TaskEmbarkToTransport(Point, Radius) |
Move to a defined Vec2 Point, and embark to a group when arrived within a defined Radius. |
| GROUP:TaskEmbarking(Point, Duration, EmbarkingGroup) |
(AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group. |
| GROUP:TaskEscort(EscortGroup, PointVec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowGroup, EngagementDistance) |
(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(PointVec2, Radius) |
(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_RADIUS). |
| GROUP:TaskMission(TaskMission) |
(AIR + GROUND) Return a mission 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) |
(AIR + GROUND) Make the Group move to fly to a given point. |
| GROUP:TaskRouteToVec3(Point, Speed) |
(AIR + GROUND) Make the Group move to a given point. |
| GROUP:TaskRouteToZone(Zone, Randomize, Speed, Formation) |
(AIR + GROUND) Route the group to a given zone. |
| GROUP:TaskWrappedAction(DCSCommand, Index) |
Return a WrappedAction Task taking a Command. |
| GROUP:WayPointExecute(WayPoint, 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(WayPoints) |
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)
Type Group
Type DCSCommand
Type DCSGroup
A DCSGroup
Field(s)
- DCSGroup.id_
-
The ID of the group in DCS
Type DCSStopCondition
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
-
- GROUP:CommandStopRoute(StopRoute, Index)
-
Perform stop route command
Parameters
-
#boolean StopRoute: -
Index:
Return value
-
- GROUP:CommandSwitchWayPoint(FromWayPoint, ToWayPoint, Index)
-
Perform a switch waypoint command
Parameters
-
#number FromWayPoint: -
#number ToWayPoint: -
Index:
Return value
-
- 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, TargetTypes, Priority)
-
(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. -
DCSTypes#AttributeNameArray 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.
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
-
DCSGroup#Group DCSGroup: The DCS Group.
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
-
DCScountry#country.id: The country identifier.
-
#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: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:IsCompletelyInZone(Zone)
-
Returns true if all units of the group are within a Zone.
Parameter
-
Zone#ZONE_BASE Zone: The zone to test.
Return value
#boolean: Returns true if the Group is completely within the Zone#ZONE_BASE
-
- 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:IsNotInZone(Zone)
-
Returns true if none of the group units of the group are within a Zone.
Parameter
-
Zone#ZONE_BASE Zone: The zone to test.
Return value
#boolean: Returns true if the Group is completely within the Zone#ZONE_BASE
-
- GROUP:IsPartlyInZone(Zone)
-
Returns true if some units of the group are within a Zone.
Parameter
-
Zone#ZONE_BASE Zone: The zone to test.
Return value
#boolean: Returns true if the Group is completely within the Zone#ZONE_BASE
-
- 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 -
DCSTypes#Duration Duration: The duration of the message.
Return value
-
- 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 -
DCSTypes#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 -
DCSTypes#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 -
DCSTypes#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 -
DCSTYpes#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
-
DCSGroup#Group GroupName: The DCS Group name
Return value
#GROUP: self
-
- GROUP:Respawn(Template)
-
Parameter
-
Template:
-
- GROUP:Route(GoPoints)
-
Make the group to follow a given route.
Parameter
-
#table GoPoints: A table of Route Points.
Return value
#GROUP: self
-
- GROUP:RouteReturnToAirbase(ReturnAirbase, Speed)
-
(AIR) Return the Group to an Airbase#AIRBASE A speed can be given in km/h.
A given formation can be given.
Parameters
-
Airbase#AIRBASE ReturnAirbase: The Airbase#AIRBASE to return to. -
#number Speed: (optional) The speed.
Return value
#string: The route
-
- GROUP:SetCommand(DCSCommand)
-
Executes a command action
Parameter
-
DCSCommand#Command DCSCommand:
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.
Parameter
-
DCSTask#TaskArray DCSTasks: Array of DCSTask#Task
Return value
-
- 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
-
DCSTask#Task DCSTask: -
#DCSStopCondition DCSStopCondition:
Return value
-
- GROUP:TaskEmbarkToTransport(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:TaskEmbarking(Point, Duration, EmbarkingGroup)
-
(AIR) 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, TargetTypes, FollowGroup, EngagementDistance)
-
(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. -
DCSTypes#AttributeNameArray TargetTypes: Array of AttributeName that is contains threat categories allowed to engage. -
FollowGroup: -
EngagementDistance:
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(PointVec2, Radius)
-
(GROUND) Fire at a VEC2 point until ammunition is finished.
Parameters
-
DCSTypes#Vec2 PointVec2: The point to fire at. -
DCSTypes#Distance Radius: The radius of the zone to deploy the fire at.
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_RADIUS).
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)
-
(AIR + GROUND) Return a mission task from a mission template.
Parameter
-
#table TaskMission: A table containing the mission task.
Return value
-
- 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
-
- GROUP:TaskRouteToVec2(Point, Speed)
-
(AIR + GROUND) Make the Group move to fly to a given point.
Parameters
-
DCSTypes#Vec3 Point: The destination point in Vec3 format. -
#number Speed: The speed to travel.
Return value
#GROUP: self
-
- GROUP:TaskRouteToVec3(Point, Speed)
-
(AIR + GROUND) Make the Group move to a given point.
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)
-
(AIR + GROUND) 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
-
DCSCommand#Command DCSCommand: -
Index:
Return value
-
- GROUP:WayPointExecute(WayPoint, 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. -
#number WaitTime: The amount seconds to wait before initiating the mission.
Return value
-
- 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:WayPointInitialize(WayPoints)
-
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!
Parameter
-
#table WayPoints: If WayPoints is given, then use the route.
Return value
-
- GROUP:_GetController()
-
Get the controller for the GROUP.
Return value