Module Task_A2G
Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.
1) TaskA2G#TASKA2G class, extends Task#TASK
The #TASK_A2G class defines Air To Ground tasks for a Set of Target Units, based on the tasking capabilities defined in Task#TASK. The TASK_A2G is implemented using a Statemachine#FSM_TASK, and has the following statuses:
- None: Start of the process
- Planned: The A2G task is planned.
- Assigned: The A2G task is assigned to a Group#GROUP.
- Success: The A2G task is successfully completed.
- Failed: The A2G task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
1.1) Set the scoring of achievements in an A2G attack.
Scoring or penalties can be given in the following circumstances:
- TASK_A2G.SetScoreOnDestroy(): Set a score when a target in scope of the A2G attack, has been destroyed.
- TASK_A2G.SetScoreOnSuccess(): Set a score when all the targets in scope of the A2G attack, have been destroyed.
- TASK_A2G.SetPenaltyOnFailed(): Set a penalty when the A2G attack has failed.
2) TaskA2G#TASKSEAD class, extends TaskA2G#TASKA2G
The #TASK_SEAD class defines a SEAD task for a Set of Target Units.
3) TaskA2G#TASKCAS class, extends TaskA2G#TASKA2G
The #TASK_CAS class defines a CAS task for a Set of Target Units.
4) TaskA2G#TASKBAI class, extends TaskA2G#TASKA2G
The #TASK_BAI class defines a BAI task for a Set of Target Units.
API CHANGE HISTORY
The underlying change log documents the API changes. Please read this carefully. The following notation is used:
- Added parts are expressed in bold type face.
- Removed parts are expressed in italic type face.
Hereby the change log:
2017-03-09: Revised version.
AUTHORS and CONTRIBUTIONS
Contributions:
- [WingThor]: Concept, Advice & Testing.
Authors:
- FlightControl: Concept, Design & Programming.
Global(s)
| TASK_A2G | |
| TASK_BAI | |
| TASK_CAS | |
| TASK_SEAD |
Type TASK_A2G
| TASK_A2G.ClassName | |
| TASK_A2G:GetPlannedMenuText() | |
| TASK_A2G:GetRendezVousPointVec2(TaskUnit) | |
| TASK_A2G:GetRendezVousZone(TaskUnit) | |
| TASK_A2G:GetTargetPointVec2(TaskUnit) | |
| TASK_A2G:GetTargetZone(TaskUnit) | |
| TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType) |
Instantiates a new TASK_A2G. |
| TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit) |
Set a penalty when the A2G attack has failed. |
| TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit) | |
| TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) | |
| TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit) |
Set a score when a target in scope of the A2G attack, has been destroyed . |
| TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit) |
Set a score when all the targets in scope of the A2G attack, have been destroyed. |
| TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit) | |
| TASK_A2G:SetTargetZone(TargetZone, TaskUnit) | |
| TASK_A2G.TargetSetUnit |
Type TASK_BAI
| TASK_BAI.ClassName | |
| TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) |
Instantiates a new TASK_BAI. |
| TASK_BAI.TargetSetUnit |
Type TASK_CAS
| TASK_CAS.ClassName | |
| TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) |
Instantiates a new TASK_CAS. |
| TASK_CAS.TargetSetUnit |
Type TASK_SEAD
| TASK_SEAD.ClassName | |
| TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) |
Instantiates a new TASK_SEAD. |
| TASK_SEAD.TargetSetUnit |
Global(s)
Type Task_A2G
Type FSM_PROCESS
Type TASK_A2G
The TASK_A2G class
Field(s)
- #string TASK_A2G.ClassName
- TASK_A2G:GetRendezVousPointVec2(TaskUnit)
-
Parameter
-
Wrapper.Unit#UNIT TaskUnit:
Return values
-
Core.Point#POINT_VEC2: The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map.
-
#number: The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.
-
- TASK_A2G:GetRendezVousZone(TaskUnit)
-
Parameter
-
Wrapper.Unit#UNIT TaskUnit:
Return value
Core.Zone#ZONE_BASE: The Zone object where the RendezVous is located on the map.
-
- TASK_A2G:GetTargetPointVec2(TaskUnit)
-
Parameter
-
Wrapper.Unit#UNIT TaskUnit:
Return value
Core.Point#POINT_VEC2: The PointVec2 object where the Target is located on the map.
-
- TASK_A2G:GetTargetZone(TaskUnit)
-
Parameter
-
Wrapper.Unit#UNIT TaskUnit:
Return value
Core.Zone#ZONE_BASE: The Zone object where the Target is located on the map.
-
- TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType)
-
Instantiates a new TASK_A2G.
Parameters
-
Tasking.Mission#MISSION Mission: -
Set#SET_GROUP SetGroup: The set of groups for which the Task can be assigned. -
#string TaskName: The name of the Task. -
Set#SET_UNIT UnitSetTargets: -
#number TargetDistance: The distance to Target when the Player is considered to have "arrived" at the engagement range. -
Core.Zone#ZONE_BASE TargetZone: The target zone, if known. If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be. -
TargetSetUnit: -
TaskType:
Return value
#TASK_A2G: self
-
- TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit)
-
Set a penalty when the A2G attack has failed.
Parameters
-
#string Text: The text to display to the player, when the A2G attack has failed. -
#number Penalty: The penalty in points. -
Wrapper.Unit#UNIT TaskUnit:
Return value
-
- TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit)
-
Parameters
-
Core.Point#POINT_VEC2 RendezVousPointVec2: The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map. -
#number RendezVousRange: The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point. -
Wrapper.Unit#UNIT TaskUnit:
-
- TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit)
-
Parameters
-
Core.Zone#ZONE_BASE RendezVousZone: The Zone object where the RendezVous is located on the map. -
Wrapper.Unit#UNIT TaskUnit:
-
- TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit)
-
Set a score when a target in scope of the A2G attack, has been destroyed .
Parameters
-
#string Text: The text to display to the player, when the target has been destroyed. -
#number Score: The score in points. -
Wrapper.Unit#UNIT TaskUnit:
Return value
-
- TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit)
-
Set a score when all the targets in scope of the A2G attack, have been destroyed.
Parameters
-
#string Text: The text to display to the player, when all targets hav been destroyed. -
#number Score: The score in points. -
Wrapper.Unit#UNIT TaskUnit:
Return value
-
- TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit)
-
Parameters
-
Core.Point#POINT_VEC2 TargetPointVec2: The PointVec2 object where the Target is located on the map. -
Wrapper.Unit#UNIT TaskUnit:
-
- TASK_A2G:SetTargetZone(TargetZone, TaskUnit)
-
Parameters
-
Core.Zone#ZONE_BASE TargetZone: The Zone object where the Target is located on the map. -
Wrapper.Unit#UNIT TaskUnit:
-
Type TASK_BAI
The TASK_BAI class
Field(s)
- #string TASK_BAI.ClassName
- TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit)
-
Instantiates a new TASK_BAI.
Parameters
-
Tasking.Mission#MISSION Mission: -
Set#SET_GROUP SetGroup: The set of groups for which the Task can be assigned. -
#string TaskName: The name of the Task. -
Set#SET_UNIT UnitSetTargets: -
#number TargetDistance: The distance to Target when the Player is considered to have "arrived" at the engagement range. -
Core.Zone#ZONE_BASE TargetZone: The target zone, if known. If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be. -
TargetSetUnit:
Return value
#TASK_BAI: self
-
Type TASK_CAS
The TASK_CAS class
Field(s)
- #string TASK_CAS.ClassName
- TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit)
-
Instantiates a new TASK_CAS.
Parameters
-
Tasking.Mission#MISSION Mission: -
Set#SET_GROUP SetGroup: The set of groups for which the Task can be assigned. -
#string TaskName: The name of the Task. -
Set#SET_UNIT UnitSetTargets: -
#number TargetDistance: The distance to Target when the Player is considered to have "arrived" at the engagement range. -
Core.Zone#ZONE_BASE TargetZone: The target zone, if known. If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be. -
TargetSetUnit:
Return value
#TASK_CAS: self
-
Type TASK_SEAD
The TASK_SEAD class
Field(s)
- #string TASK_SEAD.ClassName
- TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit)
-
Instantiates a new TASK_SEAD.
Parameters
-
Tasking.Mission#MISSION Mission: -
Set#SET_GROUP SetGroup: The set of groups for which the Task can be assigned. -
#string TaskName: The name of the Task. -
Set#SET_UNIT TargetSetUnit:
Return value
#TASK_SEAD: self
-