Module Task_Protect

Tasking - The TASK_Protect models tasks for players to protect or capture specific zones.


Author: Sven Van de Velde (FlightControl)

Contributions: MillerTime


Global(s)

TASK_CAPTURE_ZONE

TASKCAPTUREZONE class, extends TaskA2G#TASKPROTECT

The TASKCAPTUREZONE class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

TASK_PROTECT

TASK_PROTECT class, extends Task#TASK

The TASK_PROTECT class defines the task to protect or capture a protection zone.

Type TASK_CAPTURE_ZONE

TASK_CAPTURE_ZONE:New(Mission, SetGroup, TaskName, Protect, TaskBriefing)

Instantiates a new TASKCAPTUREZONE.

TASK_CAPTURE_ZONE:OnAfterGoal(TaskUnit, From, Event, To, PlayerUnit, PlayerName)
TASK_CAPTURE_ZONE:ReportOrder(ReportGroup)
TASK_CAPTURE_ZONE:SetScoreOnFail(PlayerName, Penalty, TaskUnit)

Set a penalty when the A2G attack has failed.

TASK_CAPTURE_ZONE:SetScoreOnProgress(PlayerName, Score, TaskUnit)

Set a score when a target in scope of the A2G attack, has been destroyed .

TASK_CAPTURE_ZONE:SetScoreOnSuccess(PlayerName, Score, TaskUnit)

Set a score when all the targets in scope of the A2G attack, have been destroyed.

TASK_CAPTURE_ZONE.TargetSetUnit
TASK_CAPTURE_ZONE.TaskCoalition
TASK_CAPTURE_ZONE.TaskCoalitionName
TASK_CAPTURE_ZONE.TaskZoneName
TASK_CAPTURE_ZONE:UpdateTaskInfo()

Instantiates a new TASKCAPTUREZONE.

Type TASK_PROTECT

TASK_PROTECT:GetGoalTotal()
TASK_PROTECT:GetPlannedMenuText()
TASK_PROTECT:GetTargetZone(TaskUnit)
TASK_PROTECT:New(Mission, SetGroup, TaskName, Protect, TaskType, TaskBriefing)

Instantiates a new TASK_PROTECT.

TASK_PROTECT.Protect
TASK_PROTECT:SetGoalTotal()
TASK_PROTECT:SetProtect(Protect)
TASK_PROTECT:SetTargetZone(TargetZone, TaskUnit)
TASK_PROTECT.TaskType

Global(s)

#TASK_CAPTURE_ZONE TASK_CAPTURE_ZONE

TASKCAPTUREZONE class, extends TaskA2G#TASKPROTECT

The TASKCAPTUREZONE class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

These tasks are important to be executed as they will help to achieve air superiority at the vicinity.

The TASKCAPTUREZONE is used by the TaskA2GDispatcher#TASKA2GDISPATCHER to automatically create SEAD tasks based on detected enemy ground targets.

#TASK_PROTECT TASK_PROTECT

TASK_PROTECT class, extends Task#TASK

The TASK_PROTECT class defines the task to protect or capture a protection zone.

The TASK_PROTECT is implemented using a Fsm#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.

Set the scoring of achievements in an A2G attack.

Scoring or penalties can be given in the following circumstances:

Type Task_Protect

Type FSM_PROCESS

Type TASK_CAPTURE_ZONE

The TASKCAPTUREZONE class

Field(s)

TASK_CAPTURE_ZONE:New(Mission, SetGroup, TaskName, Protect, TaskBriefing)

Instantiates a new TASKCAPTUREZONE.

Parameters

Return value

#TASKCAPTUREZONE: self

TASK_CAPTURE_ZONE:OnAfterGoal(TaskUnit, From, Event, To, PlayerUnit, PlayerName)

Parameters

TASK_CAPTURE_ZONE:ReportOrder(ReportGroup)

Parameter

  • ReportGroup :

TASK_CAPTURE_ZONE:SetScoreOnFail(PlayerName, Penalty, TaskUnit)

Set a penalty when the A2G attack has failed.

Parameters

  • #string PlayerName : The name of the player.

  • #number Penalty : The penalty in points, must be a negative value!

  • Wrapper.Unit#UNIT TaskUnit :

Return value

#TASKCAPTUREZONE:

TASK_CAPTURE_ZONE:SetScoreOnProgress(PlayerName, Score, TaskUnit)

Set a score when a target in scope of the A2G attack, has been destroyed .

Parameters

  • #string PlayerName : The name of the player.

  • #number Score : The score in points to be granted when task process has been achieved.

  • Wrapper.Unit#UNIT TaskUnit :

Return value

#TASKCAPTUREZONE:

TASK_CAPTURE_ZONE:SetScoreOnSuccess(PlayerName, Score, TaskUnit)

Set a score when all the targets in scope of the A2G attack, have been destroyed.

Parameters

  • #string PlayerName : The name of the player.

  • #number Score : The score in points.

  • Wrapper.Unit#UNIT TaskUnit :

Return value

#TASKCAPTUREZONE:

Set#SET_UNIT TASK_CAPTURE_ZONE.TargetSetUnit
TASK_CAPTURE_ZONE.TaskCoalition
TASK_CAPTURE_ZONE.TaskCoalitionName
TASK_CAPTURE_ZONE.TaskZoneName
TASK_CAPTURE_ZONE:UpdateTaskInfo()

Instantiates a new TASKCAPTUREZONE.

Type TASK_PROTECT

The TASK_PROTECT class

Field(s)

TASK_PROTECT:GetGoalTotal()
TASK_PROTECT:GetPlannedMenuText()
TASK_PROTECT:GetTargetZone(TaskUnit)

Parameter

Return value

Core.Zone#ZONE_BASE: The Zone object where the Target is located on the map.

TASK_PROTECT:New(Mission, SetGroup, TaskName, Protect, TaskType, TaskBriefing)

Instantiates a new TASK_PROTECT.

Parameters

Return value

#TASK_PROTECT: self

Functional.Protect#PROTECT TASK_PROTECT.Protect
TASK_PROTECT:SetGoalTotal()
TASK_PROTECT:SetProtect(Protect)

Parameter

TASK_PROTECT:SetTargetZone(TargetZone, TaskUnit)

Parameters

TASK_PROTECT.TaskType