Banner Image

Module Ops.PlayerTask

Ops - PlayerTask (mission) for Players.

Main Features:

  • Simplifies defining and executing Player tasks
  • FSM events when a mission is added, done, successful or failed, replanned
  • Ready to use SRS and localization
  • Mission locations can be smoked, flared, illuminated and marked on the map

Example Missions:

Demo missions can be found on GitHub.


Author: Applevangelist

Special thanks to: Streakeagle


Global(s)

Global PLAYERTASK

Global PLAYERTASKCONTROLLER

It is our attitude at the beginning of a difficult task which, more than anything else, which will affect its successful outcome. (William James)


PLAYERTASKCONTROLLER

  • Simplifies defining, executing and controlling of Player tasks
  • FSM events when a mission is added, done, successful or failed, replanned
  • Ready to use SRS and localization
  • Mission locations can be smoked, flared and marked on the map

1 Overview

PLAYERTASKCONTROLLER is used to auto-create (optional) and control tasks for players.

#PLAYERTASKCONTROLLER PLAYERTASKCONTROLLER

It is our attitude at the beginning of a difficult task which, more than anything else, which will affect its successful outcome. (William James)


PLAYERTASKCONTROLLER

  • Simplifies defining, executing and controlling of Player tasks
  • FSM events when a mission is added, done, successful or failed, replanned
  • Ready to use SRS and localization
  • Mission locations can be smoked, flared and marked on the map

1 Overview

PLAYERTASKCONTROLLER is used to auto-create (optional) and control tasks for players.

It can be set up as Air-to-Ground (A2G, main focus), Air-to-Ship (A2S) or Air-to-Air (A2A) controller. For the latter task type, also have a look at the Ops.AWACS#AWACS class which allows for more complex scenarios. One task at a time can be joined by the player from the F10 menu. A task can be joined by multiple players. Once joined, task information is available via the F10 menu, the task location can be marked on the map and for A2G/S targets, the target can be marked with smoke and flares.

For the mission designer, tasks can be auto-created by means of detection with the integrated Ops.Intel#INTEL class setup, or be manually added to the task queue.

2 Task Types

Targets can be of types GROUP, SET_GROUP, UNIT, SET_UNIT, STATIC, SET_STATIC, SET_SCENERY, AIRBASE, ZONE or COORDINATE. The system will auto-create tasks for players from these targets. Tasks are created as Ops.PlayerTask#PLAYERTASK objects, which leverage Ops.Target#TARGET for the management of the actual target. The system creates these task types from the target objects:

  • A2A - AUFTRAG.Type.INTERCEPT
  • A2S - AUFTRAG.Type.ANTISHIP
  • A2G - AUFTRAG.Type.CAS, AUFTRAG.Type.BAI, AUFTRAG.Type.SEAD, AUFTRAG.Type.BOMBING, AUFTRAG.Type.PRECISIONBOMBING, AUFTRAG.Type.BOMBRUNWAY
  • A2GS - A2S and A2G combined

Task types are derived from Ops.Auftrag#AUFTRAG:

  • CAS - Close air support, created to attack ground units, where friendly ground units are around the location in a bespoke radius (default: 500m/1km diameter)
  • BAI - Battlefield air interdiction, same as above, but no friendlies around
  • SEAD - Same as CAS, but the enemy ground units field AAA, SAM or EWR units
  • Bombing - Against static targets
  • Precision Bombing - (if enabled) Laser-guided bombing, against static targets and high-value (non-SAM) ground targets (MBTs etc)
  • Bomb Runway - Against Airbase runways (in effect, drop bombs over the runway)
  • ZONE and COORDINATE - Targets will be scanned for GROUND or STATIC enemy units and tasks created from these
  • Intercept - Any airborne targets, if the controller is of type "A2A"
  • Anti-Ship - Any ship targets, if the controller is of type "A2S"
  • CTLD - Combat transport and logistics deployment
  • CSAR - Combat search and rescue
  • RECON - Identify targets
  • CAPTUREZONE - Capture an Ops.OpsZone#OPSZONE
  • Any #string name can be passed as Auftrag type, but then you need to make sure to define a success condition, and possibly also add the task type to the standard scoring list: PLAYERTASKCONTROLLER.Scores["yournamehere"]=100

3 Task repetition

On failure, tasks will be replanned by default for a maximum of 5 times.

3.1 Pre-configured success conditions

Pre-configured success conditions for #PLAYERTASK tasks are available as follows:

mytask:AddStaticObjectSuccessCondition() -- success if static object is at least 80% dead

mytask:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix,Coalition) -- success if a squad of the given (partial) name and coalition captures the OpsZone

mytask:AddReconSuccessCondition(MinDistance) -- success if object is in line-of-sight with the given min distance in NM

mytask:AddTimeLimitSuccessCondition(TimeLimit) -- failure if the task is not completed within the time limit in seconds given

3.2 Task chaining

You can create chains of tasks, which will depend on success or failure of the previous task with the following commands:

mytask:AddNextTaskAfterSuccess(FollowUpTask) and

mytask:AddNextTaskAfterFailure(FollowUpTask)

4 SETTINGS, SRS and language options (localization)

The system can optionally communicate to players via SRS. Also localization is available, both "en" and "de" has been build in already. Player and global Core.Settings#SETTINGS for coordinates will be observed.

5 Setup

A basic setup is very simple:

       -- Settings - we want players to have a settings menu, be on imperial measures, and get directions as BR
       _SETTINGS:SetPlayerMenuOn()
       _SETTINGS:SetImperial()
       _SETTINGS:SetA2G_BR()

       -- Set up the A2G task controller for the blue side named "82nd Airborne"
       local taskmanager = PLAYERTASKCONTROLLER:New("82nd Airborne",coalition.side.BLUE,PLAYERTASKCONTROLLER.Type.A2G)

       -- set locale to English
       taskmanager:SetLocale("en")

       -- Set up detection with grup names *containing* "Blue Recce", these will add targets to our controller via detection. Can be e.g. a drone.
       taskmanager:SetupIntel("Blue Recce")

       -- Add a single Recce group name "Blue Humvee"
       taskmanager:AddAgent(GROUP:FindByName("Blue Humvee"))

       -- Set the callsign for SRS and Menu name to be "Groundhog"
       taskmanager:SetMenuName("Groundhog")

       -- Add accept- and reject-zones for detection
       -- Accept zones are handy to limit e.g. the engagement to a certain zone. The example is a round, mission editor created zone named "AcceptZone"
       taskmanager:AddAcceptZone(ZONE:New("AcceptZone"))

       -- Reject zones are handy to create borders. The example is a ZONE_POLYGON, created in the mission editor, late activated with waypoints, 
       -- named "AcceptZone#ZONE_POLYGON"
       taskmanager:AddRejectZone(ZONE:FindByName("RejectZone"))

       -- Set up using SRS for messaging
       local hereSRSPath = "C:\\Program Files\\DCS-SimpleRadio-Standalone"
       local hereSRSPort = 5002
       -- local hereSRSGoogle = "C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourkey.json"
       taskmanager:SetSRS({130,255},{radio.modulation.AM,radio.modulation.AM},hereSRSPath,"female","en-GB",hereSRSPort,"Microsoft Hazel Desktop",0.7,hereSRSGoogle)

       -- Controller will announce itself under these broadcast frequencies, handy to use cold-start frequencies here of your aircraft
       taskmanager:SetSRSBroadcast({127.5,305},{radio.modulation.AM,radio.modulation.AM})

       -- Example: Manually add an AIRBASE as a target
       taskmanager:AddTarget(AIRBASE:FindByName(AIRBASE.Caucasus.Senaki_Kolkhi))

       -- Example: Manually add a COORDINATE as a target
       taskmanager:AddTarget(GROUP:FindByName("Scout Coordinate"):GetCoordinate())

       -- Set a whitelist for tasks, e.g. skip SEAD tasks
       taskmanager:SetTaskWhiteList({AUFTRAG.Type.CAS, AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})

       -- Set target radius
       taskmanager:SetTargetRadius(1000)

6 Localization

Localization for English and German texts are build-in. Default setting is English. Change with PLAYERTASKCONTROLLER.SetLocale()

6.1 Adding Localization

A list of fields to be defined follows below. Note that in some cases string.format() is used to format texts for screen and SRS. Hence, the %d, %s and %f special characters need to appear in the exact same amount and order of appearance in the localized text or it will create errors. To add a localization, the following texts need to be translated and set in your mission script before PLAYERTASKCONTROLLER.New():

       PLAYERTASKCONTROLLER.Messages = {
         EN = {
           TASKABORT = "Task aborted!",
           NOACTIVETASK = "No active task!",
           FREQUENCIES = "frequencies ",
           FREQUENCY = "frequency %.3f",
           BROADCAST = "%s, %s, switch to %s for task assignment!",
           CASTTS = "close air support",
           SEADTTS = "suppress air defense",
           BOMBTTS = "bombing",
           PRECBOMBTTS = "precision bombing",
           BAITTS = "battle field air interdiction",
           ANTISHIPTTS = "anti-ship",
           INTERCEPTTS = "intercept",
           BOMBRUNWAYTTS = "bomb runway",
           HAVEACTIVETASK = "You already have one active task! Complete it first!",
           PILOTJOINEDTASK = "%s, %s. You have been assigned %s task %03d",
           TASKNAME = "%s Task ID %03d",
           TASKNAMETTS = "%s Task ID %03d",
           THREATHIGH = "high",
           THREATMEDIUM = "medium",
           THREATLOW = "low",
           THREATTEXT = "%s\nThreat: %s\nTargets left: %d\nCoord: %s",
           THREATTEXTTTS = "%s, %s. Target information for %s. Threat level %s. Targets left %d. Target location %s.",
           MARKTASK = "%s, %s, copy, task %03d location marked on map!",
           SMOKETASK = "%s, %s, copy, task %03d location smoked!",
           FLARETASK = "%s, %s, copy, task %03d location illuminated!",
           ABORTTASK = "All stations, %s, %s has aborted %s task %03d!",
           UNKNOWN = "Unknown",
           MENUTASKING = " Tasking ",
           MENUACTIVE = "Active Task",
           MENUINFO = "Info",
           MENUMARK = "Mark on map",
           MENUSMOKE = "Smoke",
           MENUFLARE = "Flare",
           MENUILLU = "Illuminate",
           MENUABORT = "Abort",
           MENUJOIN = "Join Task",
           MENUTASKINFO = Task Info",
           MENUTASKNO = "TaskNo",
           MENUNOTASKS = "Currently no tasks available.",
           TASKCANCELLED = "Task #%03d %s is cancelled!",
           TASKCANCELLEDTTS = "%s, task %03d %s is cancelled!",
           TASKSUCCESS = "Task #%03d %s completed successfully!",
           TASKSUCCESSTTS = "%s, task %03d %s completed successfully!",
           TASKFAILED = "Task #%03d %s was a failure!",
           TASKFAILEDTTS = "%s, task %03d %s was a failure!",
           TASKFAILEDREPLAN = "Task #%03d %s was a failure! Replanning!",
           TASKFAILEDREPLANTTS = "%s, task %03d %s was a failure! Replanning!",
           TASKADDED = "%s has a new task %s available!",
           PILOTS = "\nPilot(s): ",
           PILOTSTTS = ". Pilot(s): ",
           YES = "Yes",
           NO = "No",
           NONE = "None",
           POINTEROVERTARGET = "%s, %s, pointer in reach for task %03d, lasing!",
           POINTERTARGETREPORT = "\nPointer in reach: %s\nLasing: %s",
           RECCETARGETREPORT = "\nRecce %s in reach: %s\nLasing: %s",
           POINTERTARGETLASINGTTS = ". Pointer in reach and lasing.",
           TARGET = "Target",
           FLASHON = "%s - Flashing directions is now ON!",
           FLASHOFF = "%s - Flashing directions is now OFF!",
           FLASHMENU = "Flash Directions Switch",
           BRIEFING = "Briefing",
           TARGETLOCATION ="Target location",
           COORDINATE = "Coordinate",
           INFANTRY = "Infantry",
           TECHNICAL = "Technical",
           ARTILLERY = "Artillery",
           TANKS = "Tanks",
           AIRDEFENSE = "Airdefense",
           SAM = "SAM",
           GROUP = "Group",
           ELEVATION = "\nTarget Elevation: %s %s",
           METER = "meter",
           FEET = "feet",
         },

e.g.

       taskmanager.Messages = {
         FR = {
           TASKABORT = "Tâche abandonnée!",
           NOACTIVETASK = "Aucune tâche active!",
           FREQUENCIES = "fréquences ",
           FREQUENCY = "fréquence %.3f",
           BROADCAST = "%s, %s, passer au %s pour l'attribution des tâches!",
           ...
           TASKADDED = "%s a créé une nouvelle tâche %s",
           PILOTS = "\nPilote(s): ",
           PILOTSTTS = ". Pilote(s): ",
         },

and then taskmanager:SetLocale("fr") after PLAYERTASKCONTROLLER.New() in your script.

If you just want to replace a single text block in the table, you can do this like so:

       mycontroller.Messages.EN.NOACTIVETASK = "Choose a task first!"   
       mycontroller.Messages.FR.YES = "Oui" 

7 Events

The class comes with a number of FSM-based events that missions designers can use to shape their mission. These are:

7.1 TaskAdded.

The event is triggered when a new task is added to the controller. Use PLAYERTASKCONTROLLER.OnAfterTaskAdded() to link into this event:

         function taskmanager:OnAfterTaskAdded(From, Event, To, Task)
           ... your code here ...
         end

7.2 TaskDone.

The event is triggered when a task has ended. Use PLAYERTASKCONTROLLER.OnAfterTaskDone() to link into this event:

         function taskmanager:OnAfterTaskDone(From, Event, To, Task)
           ... your code here ...
         end

7.3 TaskCancelled.

The event is triggered when a task was cancelled manually. Use PLAYERTASKCONTROLLER.OnAfterTaskCancelled()` to link into this event:

         function taskmanager:OnAfterTaskCancelled(From, Event, To, Task)
           ... your code here ...
         end

7.4 TaskSuccess.

The event is triggered when a task completed successfully. Use PLAYERTASKCONTROLLER.OnAfterTaskSuccess() to link into this event:

         function taskmanager:OnAfterTaskSuccess(From, Event, To, Task)
           ... your code here ...
         end

7.5 TaskFailed.

The event is triggered when a task failed, no repeats. Use PLAYERTASKCONTROLLER.OnAfterTaskFailed() to link into this event:

         function taskmanager:OnAfterTaskFailed(From, Event, To, Task)
           ... your code here ...
         end

7.6 TaskRepeatOnFailed.

The event is triggered when a task failed and is re-planned for execution. Use PLAYERTASKCONTROLLER.OnAfterRepeatOnFailed() to link into this event:

         function taskmanager:OnAfterRepeatOnFailed(From, Event, To, Task)
           ... your code here ...
         end

8 Using F10 map markers to create new targets

You can use F10 map markers to create new target points for player tasks.
Enable this option with e.g., setting the tag to be used to "TARGET":

       taskmanager:EnableMarkerOps("TARGET")

Set a marker on the map and add the following text to create targets from it: "TARGET". This is effectively the same as adding a COORDINATE object as target. The marker can be deleted any time.

9 Discussion

If you have questions or suggestions, please visit the MOOSE Discord #ops-playertask channel.

                     

Global _PlayerTaskNr

Global PlayerTaskNr counter

#number _PlayerTaskNr

Global PlayerTaskNr counter

Type(s)

Fields and Methods inherited from PLAYERTASK Description

PLAYERTASK.AUUIDS

PLAYERTASK:AddClient(Client)

[User] Add a client to this task

PLAYERTASK:AddConditionFailure(ConditionFunction, ...)

[User] Add failure condition.

PLAYERTASK:AddConditionSuccess(ConditionFunction, ...)

[User] Add success condition.

PLAYERTASK:AddFreetext(Text)

[USER] Add a free text description to this task.

PLAYERTASK:AddFreetextTTS(TextTTS)

[USER] Add a free text description for TTS to this task.

PLAYERTASK:AddNextTaskAfterFailure(Task)

[USER] Add a task to be assigned to same clients when task was a failure.

PLAYERTASK:AddNextTaskAfterSuccess(Task)

[USER] Add a task to be assigned to same clients when task was a success.

PLAYERTASK:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix, Coalition)

[USER] Adds task success condition for AUFTRAG.Type.CAPTUREZONE for OpsZone or OpsZone set target object.

PLAYERTASK:AddReconSuccessCondition(MinDistance)

[USER] Adds task success condition for AUFTRAG.Type.RECON when a client is at a certain LOS distance from the target.

PLAYERTASK:AddStaticObjectSuccessCondition()

[USER] Adds task success condition for dead STATIC, SET_STATIC, SCENERY or SET_SCENERY target object.

PLAYERTASK:AddTimeLimitFailureCondition(TimeLimit)

[USER] Adds a time limit for the task to be completed.

PLAYERTASK.ClassName

Name of the class.

PLAYERTASK:ClientAbort(Client)

[User] Client has aborted task this task

PLAYERTASK.Clients

FiFo of Wrapper.Client#CLIENT planes executing this task

PLAYERTASK:CountClients()

[User] Count clients

PLAYERTASK.FinalState

PLAYERTASK.FlareColor

PLAYERTASK:FlareTarget(Color)

[User] Flare Target

PLAYERTASK.Freetext

PLAYERTASK.FreetextTTS

PLAYERTASK:GetClientObjects()

[User] Get #CLIENT objects assigned as table

PLAYERTASK:GetClients()

[User] Get client names assigned as table of #strings

PLAYERTASK:GetCoalition()

[User] Get the coalition side for this task

PLAYERTASK:GetFreetext()

[USER] Get the free text description from this task.

PLAYERTASK:GetFreetextTTS()

[USER] Get the free text TTS description from this task.

PLAYERTASK:GetSubType()

[USER] Get task sub type description from this task.

PLAYERTASK:GetTarget()

[User] Get the Ops.Target#TARGET object for this task

PLAYERTASK:HasClients()

[User] Check if PLAYERTASK has clients assigned to it.

PLAYERTASK:HasFreetext()

[USER] Query if a task has free text description.

PLAYERTASK:HasFreetextTTS()

[USER] Query if a task has free text TTS description.

PLAYERTASK:HasPlayerName(Name)

[User] Check if a player name is assigned to this task

PLAYERTASK:IlluminateTarget(Power, Height)

[User] Illuminate Target Area

PLAYERTASK:IsDone()

[User] Check if task is done

PLAYERTASK:MarkTargetOnF10Map(Text, Coalition, ReadOnly)

[User] Create target mark on F10 map

PLAYERTASK:New(Type, Target, Repeat, Times, TTSType)

Constructor

PLAYERTASK:NewFromTarget(Target, Repeat, Times, TTSType)

Constructor that automatically determines the task type based on the target.

PLAYERTASK.NextTaskFailure

PLAYERTASK.NextTaskSuccess

PLAYERTASK:OnAfterCancel(From, Event, To)

On After "Cancel" event.

PLAYERTASK:OnAfterClientAborted(From, Event, To)

On After "ClientAborted" event.

PLAYERTASK:OnAfterClientAdded(From, Event, To, Client)

On After "ClientAdded" event.

PLAYERTASK:OnAfterClientRemoved(From, Event, To)

On After "ClientRemoved" event.

PLAYERTASK:OnAfterDone(From, Event, To)

On After "Done" event.

PLAYERTASK:OnAfterExecuting(From, Event, To)

On After "Executing" event.

PLAYERTASK:OnAfterFailed(From, Event, To)

On After "Failed" event.

PLAYERTASK:OnAfterPilotPlanned(From, Event, To)

On After "Planned" event.

PLAYERTASK:OnAfterPlanned(From, Event, To)

On After "Planned" event.

PLAYERTASK:OnAfterRequested(From, Event, To)

On After "Requested" event.

PLAYERTASK:OnAfterSuccess(From, Event, To)

On After "Success" event.

PLAYERTASK.PlayerTaskNr

(Globally unique) Number of the task.

PLAYERTASK.PreviousCount

PLAYERTASK:RemoveClient(Client, Name)

[User] Remove a client from this task

PLAYERTASK.Repeat

PLAYERTASK.RepeatNo

PLAYERTASK:SetCoalition(Coalition)

[User] Set a coalition side for this task

PLAYERTASK:SetMenuName(Text)

[USER] Add a short free text description for the menu entry of this task.

PLAYERTASK:SetSubType(Type)

[USER] Set a task sub type description to this task.

PLAYERTASK.SmokeColor

PLAYERTASK:SmokeTarget(Color)

[User] Smoke Target

PLAYERTASK.TTSType

PLAYERTASK.Target

The target for this Task

PLAYERTASK.TargetMarker

PLAYERTASK.TaskController

PLAYERTASK.TaskSubType

PLAYERTASK.Type

The type of the task

PLAYERTASK.TypeName

PLAYERTASK.UUIDS

PLAYERTASK:_CheckCaptureOpsZoneSuccess(OpsZone, CaptureSquadGroupNamePrefix, Coalition, CheckClientInZone)

[Internal] Check OpsZone capture success condition.

PLAYERTASK:_EvalConditionsAny(Conditions)

[Internal] Check if any of the given conditions is true.

PLAYERTASK:_GetTaskTypeForTarget(Target)

[Internal] Determines AUFTRAG type based on the target characteristics.

PLAYERTASK:_SetController(Controller)

[Internal] Add a PLAYERTASKCONTROLLER for this task

PLAYERTASK.coalition

PLAYERTASK.conditionFailure

PLAYERTASK.conditionSuccess

PLAYERTASK.lastsmoketime

PLAYERTASK.lid

Class id string for output to DCS log file.

PLAYERTASK:onafterCancel(From, Event, To)

[Internal] On after cancel call

PLAYERTASK:onafterClientAdded(From, Event, To, Client)

[Internal] On after client added call

PLAYERTASK:onafterDone(From, Event, To)

[Internal] On after done call

PLAYERTASK:onafterExecuting(From, Event, To)

[Internal] On after executing call

PLAYERTASK:onafterFailed(From, Event, To)

[Internal] On after failed call

PLAYERTASK:onafterPlanned(From, Event, To)

[Internal] On after planned call

PLAYERTASK:onafterProgress(From, Event, To, TargetCount)

[Internal] On after progress call

PLAYERTASK:onafterRequested(From, Event, To)

[Internal] On after requested call

PLAYERTASK:onafterStatus(From, Event, To)

[Internal] On after status call

PLAYERTASK:onafterStop(From, Event, To)

[Internal] On after status call

PLAYERTASK:onafterSuccess(From, Event, To)

[Internal] On after success call

PLAYERTASK.repeats

PLAYERTASK.timestamp

PLAYERTASK.verbose

Switch verbosity.

PLAYERTASK.version

PLAYERTASK class version.

Fields and Methods inherited from FSM Description

PLAYERTASK:AddEndState(State)

Adds an End state.

PLAYERTASK:AddProcess(From, Event, Process, ReturnEvents)

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

PLAYERTASK:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

PLAYERTASK:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

PLAYERTASK:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

PLAYERTASK.CallScheduler

PLAYERTASK.Events

PLAYERTASK:GetCurrentState()

Get current state.

PLAYERTASK:GetEndStates()

Returns the End states.

PLAYERTASK:GetProcess(From, Event)

PLAYERTASK:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

PLAYERTASK:GetScores()

Returns a table with the scores defined.

PLAYERTASK:GetStartState()

Returns the start state of the FSM.

PLAYERTASK:GetState()

Get current state.

PLAYERTASK:GetSubs()

Returns a table with the Subs defined.

PLAYERTASK:GetTransitions()

Returns a table of the transition rules defined within the FSM.

PLAYERTASK:Is(State)

Check if FSM is in state.

PLAYERTASK:LoadCallBacks(CallBackTable)

Load call backs.

PLAYERTASK:New()

Creates a new FSM object.

PLAYERTASK.Scores

PLAYERTASK:SetProcess(From, Event, Fsm)

PLAYERTASK:SetStartState(State)

Sets the start state of the FSM.

PLAYERTASK._EndStates

PLAYERTASK._EventSchedules

PLAYERTASK._Processes

PLAYERTASK._Scores

PLAYERTASK._StartState

PLAYERTASK._Transitions

PLAYERTASK:_add_to_map(Map, Event)

Add to map.

PLAYERTASK:_call_handler(step, trigger, params, EventName)

Call handler.

PLAYERTASK:_create_transition(EventName)

Create transition.

PLAYERTASK:_delayed_transition(EventName)

Delayed transition.

PLAYERTASK:_eventmap(Events, EventStructure)

Event map.

PLAYERTASK:_gosub(ParentFrom, ParentEvent)

Go sub.

PLAYERTASK:_handler(EventName, ...)

Handler.

PLAYERTASK:_isendstate(Current)

Is end state.

PLAYERTASK:_submap(subs, sub, name)

Sub maps.

PLAYERTASK:can(e)

Check if can do an event.

PLAYERTASK:cannot(e)

Check if cannot do an event.

PLAYERTASK.current

PLAYERTASK.endstates

PLAYERTASK:is(State, state)

Check if FSM is in state.

PLAYERTASK.options

PLAYERTASK.subs

Fields and Methods inherited from PLAYERTASK.Condition Description

PLAYERTASK.Condition.arg

Optional arguments passed to the condition callback function.

PLAYERTASK.Condition.func

Callback function to check for a condition. Should return a #boolean.

Fields and Methods inherited from PLAYERTASKCONTROLLER Description

PLAYERTASKCONTROLLER.AccessKey

PLAYERTASKCONTROLLER.ActiveClientSet

PLAYERTASKCONTROLLER.ActiveInfoMenu

PLAYERTASKCONTROLLER.ActiveTaskMenuTemplate

PLAYERTASKCONTROLLER.ActiveTopMenu

PLAYERTASKCONTROLLER:AddAcceptZone(AcceptZone)

[User] Add accept zone to INTEL detection.

PLAYERTASKCONTROLLER:AddAcceptZoneSet(AcceptZoneSet)

[User] Add accept SET_ZONE to INTEL detection.

PLAYERTASKCONTROLLER:AddAgent(Recce)

[User] Add agent group to INTEL detection.

PLAYERTASKCONTROLLER:AddAgentSet(RecceSet)

[User] Add agent SET_GROUP to INTEL detection.

PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask, Silent, TaskFilter)

[User] Add a PLAYERTASK object to the list of (open) tasks

PLAYERTASKCONTROLLER:AddRejectZone(RejectZone)

[User] Add reject zone to INTEL detection.

PLAYERTASKCONTROLLER:AddRejectZoneSet(RejectZoneSet)

[User] Add reject SET_ZONE to INTEL detection.

PLAYERTASKCONTROLLER:AddTarget(Target)

[User] Add a target object to the target queue

PLAYERTASKCONTROLLER.AllowFlash

Flashing directions for players allowed

PLAYERTASKCONTROLLER.BCFrequency

PLAYERTASKCONTROLLER.BCModulation

PLAYERTASKCONTROLLER.BlackList

PLAYERTASKCONTROLLER.CallsignTranslations

PLAYERTASKCONTROLLER:CancelTask(Task)

[User] Manually cancel a specific task

PLAYERTASKCONTROLLER.ClassName

Name of the class.

PLAYERTASKCONTROLLER.ClientFilter

PLAYERTASKCONTROLLER.ClientSet

PLAYERTASKCONTROLLER.ClusterRadius

PLAYERTASKCONTROLLER.Coalition

PLAYERTASKCONTROLLER.CoalitionName

PLAYERTASKCONTROLLER.Culture

PLAYERTASKCONTROLLER:DisableBuddyLasing()

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc) with player units lasing.

PLAYERTASKCONTROLLER:DisablePrecisionBombing(FlightGroup, LaserCode)

[User] Disable precision laser-guided bombing on statics and "high-value" ground units (MBT etc)

PLAYERTASKCONTROLLER:DisableScoring()

[User] Remove the SCORING object from this taskcontroller

PLAYERTASKCONTROLLER:DisableTaskInfoMenu()

[User] Disable extra menu to show task detail information before joining

PLAYERTASKCONTROLLER:EnableBuddyLasing(Recce)

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc) with player units lasing.

PLAYERTASKCONTROLLER:EnableMarkerOps(Tag)

[User] Allow addition of targets with user F10 map markers.

PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup, LaserCode, HoldingPoint, Alt, Speed)

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc)

PLAYERTASKCONTROLLER:EnableScoring(Scoring)

[User] Set or create a SCORING object for this taskcontroller

PLAYERTASKCONTROLLER:EnableTaskInfoMenu()

[User] Enable extra menu to show task detail information before joining

PLAYERTASKCONTROLLER.FlashPlayer

List of player who switched Flashing Direction Info on

PLAYERTASKCONTROLLER.Frequency

PLAYERTASKCONTROLLER.Gender

PLAYERTASKCONTROLLER.InfoHasCoordinate

PLAYERTASKCONTROLLER.InfoHasLLDDM

PLAYERTASKCONTROLLER.Intel

PLAYERTASKCONTROLLER.IsClientSet

PLAYERTASKCONTROLLER.JoinInfoMenu

PLAYERTASKCONTROLLER.JoinMenu

PLAYERTASKCONTROLLER.JoinTaskMenuTemplate

PLAYERTASKCONTROLLER.JoinTopMenu

PLAYERTASKCONTROLLER.Keepnumber

PLAYERTASKCONTROLLER.LaserCode

PLAYERTASKCONTROLLER.LasingDrone

PLAYERTASKCONTROLLER.LasingDroneAlt

PLAYERTASKCONTROLLER.LasingDroneIsArmygroup

PLAYERTASKCONTROLLER.LasingDroneIsFlightgroup

PLAYERTASKCONTROLLER.LasingDroneSpeed

PLAYERTASKCONTROLLER.LasingDroneTemplate

PLAYERTASKCONTROLLER.MarkerOps

PLAYERTASKCONTROLLER.MarkerReadOnly

PLAYERTASKCONTROLLER.MenuName

PLAYERTASKCONTROLLER.MenuNoTask

PLAYERTASKCONTROLLER.MenuParent

PLAYERTASKCONTROLLER.Messages

PLAYERTASKCONTROLLER.Modulation

PLAYERTASKCONTROLLER.Name

PLAYERTASKCONTROLLER:New(Name, Coalition, Type, ClientFilter)

Create and run a new TASKCONTROLLER instance.

PLAYERTASKCONTROLLER.NoScreenOutput

PLAYERTASKCONTROLLER:OnAfterPlayerAbortedTask(From, Event, To, Group, Client, Task)

On After "PlayerAbortedTask" event.

PLAYERTASKCONTROLLER:OnAfterPlayerJoinedTask(From, Event, To, Group, Client, Task)

On After "PlayerJoinedTask" event.

PLAYERTASKCONTROLLER:OnAfterTaskAdded(From, Event, To, Task)

On After "TaskAdded" event.

PLAYERTASKCONTROLLER:OnAfterTaskCancelled(From, Event, To, Task)

On After "TaskCancelled" event.

PLAYERTASKCONTROLLER:OnAfterTaskDone(From, Event, To, Task)

On After "TaskDone" event.

PLAYERTASKCONTROLLER:OnAfterTaskFailed(From, Event, To, Task)

On After "TaskFailed" event.

PLAYERTASKCONTROLLER:OnAfterTaskProgress(From, Event, To, Task, TargetCount)

On After "TaskProgress" event.

PLAYERTASKCONTROLLER:OnAfterTaskRepeatOnFailed(From, Event, To, Task)

On After "TaskRepeatOnFailed" event.

PLAYERTASKCONTROLLER:OnAfterTaskSuccess(From, Event, To, Task)

On After "TaskSuccess" event.

PLAYERTASKCONTROLLER:OnAfterTaskTargetFlared(From, Event, To, Task)

On After "TaskTargetFlared" event.

PLAYERTASKCONTROLLER:OnAfterTaskTargetIlluminated(From, Event, To, Task)

On After "TaskTargetIlluminated" event.

PLAYERTASKCONTROLLER:OnAfterTaskTargetSmoked(From, Event, To, Task)

On After "TaskTargetSmoked" event.

PLAYERTASKCONTROLLER.PathToGoogleKey

PLAYERTASKCONTROLLER.PathToSRS

PLAYERTASKCONTROLLER.PlayerFlashMenu

PLAYERTASKCONTROLLER.PlayerInfoMenu

PLAYERTASKCONTROLLER.PlayerJoinMenu

PLAYERTASKCONTROLLER.PlayerMenu

PLAYERTASKCONTROLLER.PlayerMenuTag

PLAYERTASKCONTROLLER.PlayerRecce

PLAYERTASKCONTROLLER.Port

PLAYERTASKCONTROLLER.PrecisionTasks

PLAYERTASKCONTROLLER.RecceSet

PLAYERTASKCONTROLLER:RemoveAcceptZone(AcceptZone)

[User] Remove accept zone from INTEL detection.

PLAYERTASKCONTROLLER:RemoveRejectZoneSet(RejectZone)

[User] Remove reject zone from INTEL detection.

PLAYERTASKCONTROLLER.SRS

PLAYERTASKCONTROLLER.SRSQueue

PLAYERTASKCONTROLLER.Scores

PLAYERTASKCONTROLLER.Scoring

PLAYERTASKCONTROLLER.SeadAttributes

PLAYERTASKCONTROLLER:SetAllowFlashDirection(OnOff)

[User] Set flash directions option for player (player based info)

PLAYERTASKCONTROLLER:SetCallSignOptions(ShortCallsign, Keepnumber, CallsignTranslations)

[User] Set callsign options for TTS output.

PLAYERTASKCONTROLLER:SetClusterRadius(Radius)

[User] Set the cluster radius if you want to use target clusters rather than single group detection.

PLAYERTASKCONTROLLER:SetDisableIlluminateTask()

[User] Do not show menu entries to illuminate targets.

PLAYERTASKCONTROLLER:SetDisableSmokeFlareTask()

[User] Do not show menu entries to smoke or flare targets

PLAYERTASKCONTROLLER:SetDisableUseTypeNames()

[User] Do not show target menu entries of type names for GROUND targets

PLAYERTASKCONTROLLER:SetEnableIlluminateTask()

[User] Show menu entries to illuminate targets.

PLAYERTASKCONTROLLER:SetEnableSmokeFlareTask()

[User] Show menu entries to smoke or flare targets (on by default!)

PLAYERTASKCONTROLLER:SetEnableUseTypeNames()

[User] Show target menu entries of type names for GROUND targets (off by default!), e.g.

PLAYERTASKCONTROLLER:SetInfoShowsCoordinate(OnOff, LLDDM)

[User] Show info text on screen with a coordinate info in any case (OFF by default)

PLAYERTASKCONTROLLER:SetLocale(Locale)

[User] Set locale for localization.

PLAYERTASKCONTROLLER:SetMarkerDeleteable()

[User] Allow F10 markers to be deleted by pilots.

PLAYERTASKCONTROLLER:SetMarkerReadOnly()

[User] Forbid F10 markers to be deleted by pilots.

PLAYERTASKCONTROLLER:SetMenuName(Name)

[User] Set the top menu name to a custom string.

PLAYERTASKCONTROLLER:SetMenuOptions(InfoMenu, ItemLimit, HoldTime)

[User] Set menu build fine-tuning options

PLAYERTASKCONTROLLER:SetParentMenu(Menu)

[User] Set the top menu to be a sub-menu of another MENU entry.

PLAYERTASKCONTROLLER:SetSEADAttributes(Attributes)

[User] Change the list of attributes, which are considered on GROUP or SET_GROUP level of a target to create SEAD player tasks.

PLAYERTASKCONTROLLER:SetSRS(Frequency, Modulation, PathToSRS, Gender, Culture, Port, Voice, Volume, PathToGoogleKey, AccessKey, Coordinate)

[User] Set SRS TTS details - see Sound.SRS for details.SetSRS() will try to use as many attributes configured with Sound.SRS#MSRS.LoadConfigFile() as possible.

PLAYERTASKCONTROLLER:SetSRSBroadcast(Frequency, Modulation)

[User] Set SRS Broadcast - for the announcement to joining players which SRS frequency, modulation to use.

PLAYERTASKCONTROLLER:SetTargetRadius(Radius)

[User] Set target radius.

PLAYERTASKCONTROLLER:SetTaskBlackList(BlackList)

[User] Set up a (negative) blacklist of forbidden task types.

PLAYERTASKCONTROLLER:SetTaskRepetition(OnOff, Repeats)

[User] Set repetition options for tasks

PLAYERTASKCONTROLLER:SetTaskWhiteList(WhiteList)

[User] Set up a (positive) whitelist of allowed task types.

PLAYERTASKCONTROLLER:SetTransmitOnlyWithPlayers(Switch)

[User] For SRS - Switch to only transmit if there are players on the server.

PLAYERTASKCONTROLLER:SetupIntel(RecceName)

[User] Set up INTEL detection

PLAYERTASKCONTROLLER.ShortCallsign

PLAYERTASKCONTROLLER.ShowMagnetic

Also show magnetic angles

PLAYERTASKCONTROLLER:SuppressScreenOutput(OnOff)

[User] Switch screen output.

PLAYERTASKCONTROLLER:SwitchDetectStatics(OnOff)

[User] Set up detection of STATIC objects.

PLAYERTASKCONTROLLER:SwitchMagenticAngles(OnOff)

[User] Switch showing additional magnetic angles

PLAYERTASKCONTROLLER:SwitchUseGroupNames(OnOff)

[User] Switch usage of target names for menu entries on or off

PLAYERTASKCONTROLLER.TargetQueue

PLAYERTASKCONTROLLER.TargetRadius

PLAYERTASKCONTROLLER.TaskQueue

PLAYERTASKCONTROLLER.TasksPerPlayer

PLAYERTASKCONTROLLER.TransmitOnlyWithPlayers

PLAYERTASKCONTROLLER.Type

PLAYERTASKCONTROLLER.UseBlackList

PLAYERTASKCONTROLLER.UseGroupNames

PLAYERTASKCONTROLLER.UseSRS

PLAYERTASKCONTROLLER.UseTypeNames

PLAYERTASKCONTROLLER.UseWhiteList

PLAYERTASKCONTROLLER.Voice

PLAYERTASKCONTROLLER.Volume

PLAYERTASKCONTROLLER.WhiteList

PLAYERTASKCONTROLLER:_AbortTask(Group, Client)

[Internal] Abort Task

PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)

[Internal] Show active task info

PLAYERTASKCONTROLLER:_AddTask(Target)

[Internal] Add a task to the task queue

PLAYERTASKCONTROLLER:_CheckPlayerHasTask(PlayerName)

[Internal] Check task queue for a specific player name

PLAYERTASKCONTROLLER:_CheckPrecisionTasks()

[Internal] Check precision task queue

PLAYERTASKCONTROLLER:_CheckTargetQueue()

[Internal] Check target queue

PLAYERTASKCONTROLLER:_CheckTaskQueue()

[Internal] Check task queue

PLAYERTASKCONTROLLER:_CheckTaskTypeAllowed(Type)

[Internal] Check for allowed task type, if there is a (positive) whitelist

PLAYERTASKCONTROLLER:_CheckTaskTypeDisallowed(Type)

[Internal] Check for allowed task type, if there is a (negative) blacklist

PLAYERTASKCONTROLLER:_CreateActiveTaskMenuTemplate()

[Internal] _CreateActiveTaskMenuTemplate

PLAYERTASKCONTROLLER:_CreateJoinMenuTemplate()

[Internal] _CreateJoinMenuTemplate

PLAYERTASKCONTROLLER:_EventHandler(EventData)

[Internal] Event handling

PLAYERTASKCONTROLLER:_FlareTask(Group, Client)

[Internal] Flare task location

PLAYERTASKCONTROLLER:_FlashInfo()

[Internal] Flashing directional info for a client

PLAYERTASKCONTROLLER:_GetAvailableTaskTypes()

[Internal] Get task types for the menu

PLAYERTASKCONTROLLER:_GetPlayerName(Client)

[Internal] Get player name

PLAYERTASKCONTROLLER:_GetTasksPerType()

[Internal] Get task per type for the menu

PLAYERTASKCONTROLLER:_GetTextForSpeech(text)

[Internal] Get text for text-to-speech.

PLAYERTASKCONTROLLER:_IlluminateTask(Group, Client)

[Internal] Illuminate task location

PLAYERTASKCONTROLLER:_InitLocalization()

[Internal] Init localization

PLAYERTASKCONTROLLER:_IsAttributeSead(Attribute)

[Internal] Function the check against SeadAttributes

PLAYERTASKCONTROLLER:_JoinTask(Task, Force, Group, Client)

[Internal] Join a player to a task

PLAYERTASKCONTROLLER:_MarkTask(Group, Client)

[Internal] Mark task on F10 map

PLAYERTASKCONTROLLER:_RemoveMenuEntriesForTask(Task, Client)

[Internal] _RemoveMenuEntriesForTask

PLAYERTASKCONTROLLER:_SendMessageToClients(Text, Seconds)

[Internal] Send message to SET_CLIENT of players

PLAYERTASKCONTROLLER:_SmokeTask(Group, Client)

[Internal] Smoke task location

PLAYERTASKCONTROLLER:_SwitchFlashing(Group, Client)

[Internal] Switch flashing info for a client

PLAYERTASKCONTROLLER:_SwitchMenuForClient(Client, MenuType, Delay)

[Internal] _SwitchMenuForClient

PLAYERTASKCONTROLLER:_UpdateJoinMenuTemplate()

PLAYERTASKCONTROLLER.activehasinfomenu

PLAYERTASKCONTROLLER.autolase

PLAYERTASKCONTROLLER.buddylasing

PLAYERTASKCONTROLLER.customcallsigns

PLAYERTASKCONTROLLER.gettext

PLAYERTASKCONTROLLER.holdmenutime

PLAYERTASKCONTROLLER.illumenu

PLAYERTASKCONTROLLER.lasttaskcount

PLAYERTASKCONTROLLER.lid

Class id string for output to DCS log file.

PLAYERTASKCONTROLLER.locale

PLAYERTASKCONTROLLER.menuitemlimit

PLAYERTASKCONTROLLER.noflaresmokemenu

PLAYERTASKCONTROLLER:onafterStart(From, Event, To)

[Internal] On after start call

PLAYERTASKCONTROLLER:onafterStatus(From, Event, To)

[Internal] On after Status call

PLAYERTASKCONTROLLER:onafterStop(From, Event, To)

[Internal] On after Stop call

PLAYERTASKCONTROLLER:onafterTaskAdded(From, Event, To, Task)

[Internal] On after task added

PLAYERTASKCONTROLLER:onafterTaskCancelled(From, Event, To, Task)

[Internal] On after task cancelled

PLAYERTASKCONTROLLER:onafterTaskDone(From, Event, To, Task)

[Internal] On after task done

PLAYERTASKCONTROLLER:onafterTaskFailed(From, Event, To, Task)

[Internal] On after task failed

PLAYERTASKCONTROLLER:onafterTaskRepeatOnFailed(From, Event, To, Task)

[Internal] On after task failed, repeat planned

PLAYERTASKCONTROLLER:onafterTaskSuccess(From, Event, To, Task)

[Internal] On after task success

PLAYERTASKCONTROLLER.precisionbombing

PLAYERTASKCONTROLLER.repeatonfailed

PLAYERTASKCONTROLLER.repeattimes

PLAYERTASKCONTROLLER.taskinfomenu

PLAYERTASKCONTROLLER.usecluster

PLAYERTASKCONTROLLER.verbose

Switch verbosity.

PLAYERTASKCONTROLLER.version

PLAYERTASK class version.

Fields and Methods inherited from FSM Description

PLAYERTASKCONTROLLER:AddEndState(State)

Adds an End state.

PLAYERTASKCONTROLLER:AddProcess(From, Event, Process, ReturnEvents)

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

PLAYERTASKCONTROLLER:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

PLAYERTASKCONTROLLER:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

PLAYERTASKCONTROLLER:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

PLAYERTASKCONTROLLER.CallScheduler

PLAYERTASKCONTROLLER.Events

PLAYERTASKCONTROLLER:GetCurrentState()

Get current state.

PLAYERTASKCONTROLLER:GetEndStates()

Returns the End states.

PLAYERTASKCONTROLLER:GetProcess(From, Event)

PLAYERTASKCONTROLLER:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

PLAYERTASKCONTROLLER:GetScores()

Returns a table with the scores defined.

PLAYERTASKCONTROLLER:GetStartState()

Returns the start state of the FSM.

PLAYERTASKCONTROLLER:GetState()

Get current state.

PLAYERTASKCONTROLLER:GetSubs()

Returns a table with the Subs defined.

PLAYERTASKCONTROLLER:GetTransitions()

Returns a table of the transition rules defined within the FSM.

PLAYERTASKCONTROLLER:Is(State)

Check if FSM is in state.

PLAYERTASKCONTROLLER:LoadCallBacks(CallBackTable)

Load call backs.

PLAYERTASKCONTROLLER:New()

Creates a new FSM object.

PLAYERTASKCONTROLLER.Scores

PLAYERTASKCONTROLLER:SetProcess(From, Event, Fsm)

PLAYERTASKCONTROLLER:SetStartState(State)

Sets the start state of the FSM.

PLAYERTASKCONTROLLER._EndStates

PLAYERTASKCONTROLLER._EventSchedules

PLAYERTASKCONTROLLER._Processes

PLAYERTASKCONTROLLER._Scores

PLAYERTASKCONTROLLER._StartState

PLAYERTASKCONTROLLER._Transitions

PLAYERTASKCONTROLLER:_add_to_map(Map, Event)

Add to map.

PLAYERTASKCONTROLLER:_call_handler(step, trigger, params, EventName)

Call handler.

PLAYERTASKCONTROLLER:_create_transition(EventName)

Create transition.

PLAYERTASKCONTROLLER:_delayed_transition(EventName)

Delayed transition.

PLAYERTASKCONTROLLER:_eventmap(Events, EventStructure)

Event map.

PLAYERTASKCONTROLLER:_gosub(ParentFrom, ParentEvent)

Go sub.

PLAYERTASKCONTROLLER:_handler(EventName, ...)

Handler.

PLAYERTASKCONTROLLER:_isendstate(Current)

Is end state.

PLAYERTASKCONTROLLER:_submap(subs, sub, name)

Sub maps.

PLAYERTASKCONTROLLER:can(e)

Check if can do an event.

PLAYERTASKCONTROLLER:cannot(e)

Check if cannot do an event.

PLAYERTASKCONTROLLER.current

PLAYERTASKCONTROLLER.endstates

PLAYERTASKCONTROLLER:is(State, state)

Check if FSM is in state.

PLAYERTASKCONTROLLER.options

PLAYERTASKCONTROLLER.subs

Fields and Methods inherited from SeadAttributes Description

SeadAttributes.AAA

GROUP.Attribute.GROUND_AAA

SeadAttributes.EWR

GROUP.Attribute.GROUND_EWR

SeadAttributes.SAM

GROUP.Attribute.GROUND_SAM

Fields and Methods inherited from Type Description

Type.A2A

Air-to-Air Controller

Type.A2G

Air-to-Ground Controller

Type.A2GS

Air-to-Ground-and-Ship Controller

Type.A2S

Air-to-Ship Controller

PLAYERTASK class.

Field(s)

#string PLAYERTASK.ClassName

Name of the class.

Utilities.FiFo#FIFO PLAYERTASK.Clients

FiFo of Wrapper.Client#CLIENT planes executing this task

#number PLAYERTASK.PlayerTaskNr

(Globally unique) Number of the task.

Ops.Target#TARGET PLAYERTASK.Target

The target for this Task

#string PLAYERTASK.lid

Class id string for output to DCS log file.

#boolean PLAYERTASK.verbose

Switch verbosity.

#string PLAYERTASK.version

PLAYERTASK class version.

Function(s)

[User] Add a client to this task

Defined in:

PLAYERTASK

Parameter:

Return value:

self

[User] Add failure condition.

Defined in:

PLAYERTASK

Parameters:

#function ConditionFunction

If this function returns true, the task is cancelled.

...

Condition function arguments if any.

Return value:

self

[User] Add success condition.

Defined in:

PLAYERTASK

Parameters:

#function ConditionFunction

If this function returns true, the mission is cancelled.

...

Condition function arguments if any.

Return value:

self

[USER] Add a free text description to this task.

Defined in:

PLAYERTASK

Parameter:

#string Text

Return value:

self

[USER] Add a free text description for TTS to this task.

Defined in:

PLAYERTASK

Parameter:

#string TextTTS

Return value:

self

[USER] Add a task to be assigned to same clients when task was a failure.

Defined in:

PLAYERTASK

Parameter:

Return value:

self

[USER] Add a task to be assigned to same clients when task was a success.

Defined in:

PLAYERTASK

Parameter:

Return value:

self

[USER] Adds task success condition for AUFTRAG.Type.CAPTUREZONE for OpsZone or OpsZone set target object.

  • At least one of the task clients and one capture group need to be inside the zone in order for the capture to be successful.

Defined in:

PLAYERTASK

Parameters:

#SET_BASE CaptureSquadGroupNamePrefix

The prefix of the group name that needs to capture the zone.

#number Coalition

The coalition that needs to capture the zone.

Return value:

self

Usage:

-- We can use either STATIC, SET_STATIC, SCENERY or SET_SCENERY as target objects.
local opsZone = OPSZONE:New(zone, coalition.side.RED)

...

-- We can use either OPSZONE or SET_OPSZONE.
local mytask = PLAYERTASK:NewFromTarget(opsZone, true, 50, "Capture the zone")
mytask:SetMenuName("Capture the ops zone")
mytask:AddFreetext("Transport capture squad to the ops zone.")

-- We set CaptureSquadGroupNamePrefix the group name prefix as set in the ME or the spawn of the group that need to be present at the OpsZone like a capture squad,
-- and set the capturing Coalition in order to trigger a successful task.
mytask:AddOpsZoneCaptureSuccessCondition("capture-squad", coalition.side.BLUE)

playerTaskManager:AddPlayerTaskToQueue(mytask)

[USER] Adds task success condition for AUFTRAG.Type.RECON when a client is at a certain LOS distance from the target.

Defined in:

PLAYERTASK

Parameter:

#number MinDistance

(Optional) Minimum distance in meters from client to target in LOS for success condition. (Default 5 NM)

Return value:

self

Usage:

-- target can be any object that has a `GetCoordinate()` function like STATIC, GROUP, ZONE...
local mytask = PLAYERTASK:New(AUFTRAG.Type.RECON, ZONE:New("WF Zone"), true, 50, "Deep Earth")
mytask:SetMenuName("Recon weapon factory")
mytask:AddFreetext("Locate and investigate underground weapons factory near Kovdor.")

-- We set the MinDistance (optional) in meters for the client to be in LOS from the target in order to trigger a successful task.
mytask:AddReconSuccessCondition(10000) -- 10 km (default is 5 NM if not set)

playerTaskManager:AddPlayerTaskToQueue(mytask)

[USER] Adds task success condition for dead STATIC, SET_STATIC, SCENERY or SET_SCENERY target object.

Defined in:

PLAYERTASK

Return value:

self

Usage:

-- We can use either STATIC, SET_STATIC, SCENERY or SET_SCENERY as target objects.
local mytask = PLAYERTASK:NewFromTarget(static, true, 50, "Destroy the target")
mytask:SetMenuName("Destroy Power Plant")
mytask:AddFreetext("Locate and destroy the power plant near Olenya.")
mytask:AddStaticObjectSuccessCondition()

playerTaskManager:AddPlayerTaskToQueue(mytask)

[USER] Adds a time limit for the task to be completed.

Defined in:

PLAYERTASK

Parameter:

#number TimeLimit

Time limit in seconds for the task to be completed. (Default 0 = no time limit)

Return value:

self

Usage:

local mytask = PLAYERTASK:New(AUFTRAG.Type.RECON, ZONE:New("WF Zone"), true, 50, "Deep Earth")
mytask:SetMenuName("Recon weapon factory")
mytask:AddFreetext("Locate and investigate underground weapons factory near Kovdor.")
mytask:AddReconSuccessCondition(10000) -- 10 km

-- We set the TimeLimit to 10 minutes (600 seconds) from the moment the task is started, once the time has passed and the task is not yet successful it will trigger a failure.
mytask:AddTimeLimitFailureCondition(600)

playerTaskManager:AddPlayerTaskToQueue(mytask)

[User] Client has aborted task this task

Defined in:

PLAYERTASK

Parameter:

(optional)

Return value:

self

[User] Count clients

Defined in:

PLAYERTASK

Return value:

#number:

clientcount

[User] Flare Target

Defined in:

PLAYERTASK

Parameter:

#number Color

defaults to FLARECOLOR.Red

Return value:

self

[User] Get #CLIENT objects assigned as table

Defined in:

PLAYERTASK

Return values:

#table:

clients

#number:

clientcount

[User] Get client names assigned as table of #strings

Defined in:

PLAYERTASK

Return values:

#table:

clients

#number:

clientcount

[User] Get the coalition side for this task

Defined in:

PLAYERTASK

Return value:

#number:

Coalition Coaltion side, e.g. coalition.side.BLUE, or nil if not set

[USER] Get the free text description from this task.

Defined in:

PLAYERTASK

Return value:

#string:

Text

[USER] Get the free text TTS description from this task.

Defined in:

PLAYERTASK

Return value:

#string:

Text

[USER] Get task sub type description from this task.

Defined in:

PLAYERTASK

Return value:

#string:

Type or nil

[User] Get the Ops.Target#TARGET object for this task

Defined in:

PLAYERTASK

Return value:

[User] Check if PLAYERTASK has clients assigned to it.

Defined in:

PLAYERTASK

Return value:

#boolean:

hasclients

[USER] Query if a task has free text description.

Defined in:

PLAYERTASK

Return value:

self

[USER] Query if a task has free text TTS description.

Defined in:

PLAYERTASK

Return value:

self

[User] Check if a player name is assigned to this task

Defined in:

PLAYERTASK

Parameter:

#string Name

Return value:

#boolean:

HasName

[User] Illuminate Target Area

Defined in:

PLAYERTASK

Parameters:

#number Power

Power of illumination bomb in Candela. Default 1000 cd.

#number Height

Height above target used to release the bomb, default 150m.

Return value:

self

[User] Check if task is done

Defined in:

PLAYERTASK

Return value:

#boolean:

done

[User] Create target mark on F10 map

Defined in:

PLAYERTASK

Parameters:

#string Text

(optional) Text to show on the marker

#number Coalition

(optional) Coalition this marker is for. Default = All.

#boolean ReadOnly

(optional) Make target marker read-only. Default = false.

Return value:

self

Constructor

Defined in:

PLAYERTASK

Parameters:

Type of this task

Target for this task

#boolean Repeat

Repeat this task if true (default = false)

#number Times

Repeat on failure this many times if Repeat is true (default = 1)

#string TTSType

TTS friendly task type name

Return value:

self

Constructor that automatically determines the task type based on the target.

Defined in:

PLAYERTASK

Parameters:

Target for this task

#boolean Repeat

Repeat this task if true (default = false)

#number Times

Repeat on failure this many times if Repeat is true (default = 1)

#string TTSType

TTS friendly task type name

Return value:

self

On After "Cancel" event.

Task has been cancelled.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "ClientAborted" event.

A client has aborted the task.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "ClientAdded" event.

Client has been added to the task.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "ClientRemoved" event.

Client has been removed from the task.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Done" event.

Task is done.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Executing" event.

Task is executed by the 1st client.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Failed" event.

Task has been a failure.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Planned" event.

Task has been planned.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Planned" event.

Task has been planned.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Requested" event.

Task has been Requested.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "Success" event.

Task has been a success.

Defined in:

PLAYERTASK

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

[User] Remove a client from this task

Defined in:

PLAYERTASK

Parameters:

#string Name

Name of the client

Return value:

self

[User] Set a coalition side for this task

Defined in:

PLAYERTASK

Parameter:

#number Coalition

Coaltion side to add, e.g. coalition.side.BLUE

Return value:

self

[USER] Add a short free text description for the menu entry of this task.

Defined in:

PLAYERTASK

Parameter:

#string Text

Return value:

self

[USER] Set a task sub type description to this task.

Defined in:

PLAYERTASK

Parameter:

#string Type

Return value:

self

[User] Smoke Target

Defined in:

PLAYERTASK

Parameter:

#number Color

defaults to SMOKECOLOR.Red

Return value:

self

[Internal] Check OpsZone capture success condition.

Defined in:

PLAYERTASK

Parameters:

The OpsZone target object.

#string CaptureSquadGroupNamePrefix

The prefix of the group name that needs to capture the zone.

#number Coalition

The coalition that needs to capture the zone.

#boolean CheckClientInZone

Check if any of the clients are in zone.

Return value:

self

[Internal] Check if any of the given conditions is true.

Defined in:

PLAYERTASK

Parameter:

#table Conditions

Table of conditions.

Return value:

#boolean:

If true, at least one condition is true.

[Internal] Determines AUFTRAG type based on the target characteristics.

Defined in:

PLAYERTASK

Parameter:

Target for this task

Return value:

#string:

AUFTRAG.Type

[Internal] Add a PLAYERTASKCONTROLLER for this task

Defined in:

PLAYERTASK

Parameter:

Return value:

self

[Internal] On after cancel call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after client added call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after done call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after executing call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after failed call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after planned call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after progress call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

#number TargetCount

Return value:

self

[Internal] On after requested call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after status call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after status call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

[Internal] On after success call

Defined in:

PLAYERTASK

Parameters:

#string From

#string Event

#string To

Return value:

self

Field(s)

#string PLAYERTASK.ClassName

Name of the class.

Utilities.FiFo#FIFO PLAYERTASK.Clients

FiFo of Wrapper.Client#CLIENT planes executing this task

#number PLAYERTASK.PlayerTaskNr

(Globally unique) Number of the task.

Ops.Target#TARGET PLAYERTASK.Target

The target for this Task

#string PLAYERTASK.lid

Class id string for output to DCS log file.

#boolean PLAYERTASK.verbose

Switch verbosity.

#string PLAYERTASK.version

PLAYERTASK class version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Generic task condition.

Field(s)

#table PLAYERTASK.Condition.arg

Optional arguments passed to the condition callback function.

#function PLAYERTASK.Condition.func

Callback function to check for a condition. Should return a #boolean.

Function(s)

PLAYERTASKCONTROLLER class.

Field(s)

#boolean PLAYERTASKCONTROLLER.AllowFlash

Flashing directions for players allowed

#string PLAYERTASKCONTROLLER.ClassName

Name of the class.

#table PLAYERTASKCONTROLLER.FlashPlayer

List of player who switched Flashing Direction Info on

#boolean PLAYERTASKCONTROLLER.ShowMagnetic

Also show magnetic angles

#string PLAYERTASKCONTROLLER.lid

Class id string for output to DCS log file.

#boolean PLAYERTASKCONTROLLER.verbose

Switch verbosity.

#string PLAYERTASKCONTROLLER.version

PLAYERTASK class version.

Function(s)

[User] Add accept zone to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Zone#ZONE AcceptZone

Add a zone to the accept zone set.

Return value:

[User] Add accept SET_ZONE to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Set#SET_ZONE AcceptZoneSet

Add a SET_ZONE to the accept zone set.

Return value:

[User] Add agent group to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Group of agents. Can also be an Ops.OpsGroup#OPSGROUP object.

Return value:

[User] Add agent SET_GROUP to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

SET_GROUP of agents.

Return value:

[User] Add a PLAYERTASK object to the list of (open) tasks

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean Silent

If true, make no "has new task" announcement

#boolen TaskFilter

If true, apply the white/black-list task filters here, also

Return value:

Usage:

Example to create a PLAYERTASK of type CTLD and give Players 10 minutes to complete:

       local newtask = PLAYERTASK:New(AUFTRAG.Type.CTLD,ZONE:Find("Unloading"),false,0,"Combat Transport")
       newtask.Time0 = timer.getAbsTime()    -- inject a timestamp for T0
       newtask:AddFreetext("Transport crates to the drop zone and build a vehicle in the next 10 minutes!")
       
       -- add a condition for failure - fail after 10 minutes
       newtask:AddConditionFailure(
         function()
           local Time = timer.getAbsTime()
           if Time - newtask.Time0 > 600 then
             return true
           end 
           return false
         end
         )  
         
       taskmanager:AddPlayerTaskToQueue(PlayerTask)     

[User] Add reject zone to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Zone#ZONE RejectZone

Add a zone to the reject zone set.

Return value:

[User] Add reject SET_ZONE to INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Set#SET_ZONE RejectZoneSet

Add a zone to the reject zone set.

Return value:

[User] Add a target object to the target queue

Defined in:

PLAYERTASKCONTROLLER

Parameter:

The target GROUP, SET_GROUP, UNIT, SET_UNIT, STATIC, SET_STATIC, AIRBASE, ZONE or COORDINATE.

Return value:

[User] Manually cancel a specific task

Defined in:

PLAYERTASKCONTROLLER

Parameter:

The task to be cancelled

Return value:

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc) with player units lasing.

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Disable precision laser-guided bombing on statics and "high-value" ground units (MBT etc)

Defined in:

PLAYERTASKCONTROLLER

Parameters:

FlightGroup

LaserCode

Return value:

[User] Remove the SCORING object from this taskcontroller

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Disable extra menu to show task detail information before joining

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc) with player units lasing.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

(Optional) The PLAYERRECCE object governing the lasing players.

Return value:

[User] Allow addition of targets with user F10 map markers.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Tag

(Optional) The tagname to use to identify commands, defaults to "TASK"

Return value:

Usage:

Enable the function like so:
         mycontroller:EnableMarkerOps("TASK")
Then as a player in a client slot, you can add a map marker on the F10 map. Next edit the text
in the marker to make it identifiable, e.g

TASK Name=Tanks Sochi, Text=Destroy tank group located near Sochi!

Where **TASK** is the tag that tells the controller this mark is a target location (must).
**Name=** ended by a comma **,** tells the controller the supposed menu entry name (optional). No extra spaces! End with a comma!
**Text=** tells the controller the supposed free text task description (optional, only taken if **Name=** is present first). No extra spaces!

[User] Allow precision laser-guided bombing on statics and "high-value" ground units (MBT etc)

Defined in:

PLAYERTASKCONTROLLER

Parameters:

The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only). Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - Note might not find an LOS spot or get lost on the way. Cannot island-hop.

#number LaserCode

The lasercode to be used. Defaults to 1688.

Core.Point#COORDINATE HoldingPoint

(Optional) Point where the drone should initially circle. If not set, defaults to BullsEye of the coalition.

#number Alt

(Optional) Altitude in feet. Only applies if using a FLIGHTGROUP object! Defaults to 10000.

#number Speed

(Optional) Speed in knots. Only applies if using a FLIGHTGROUP object! Defaults to 120.

Return value:

Usage:

-- Set up precision bombing, FlightGroup as lasing unit
       local FlightGroup = FLIGHTGROUP:New("LasingUnit")
       FlightGroup:Activate()
       taskmanager:EnablePrecisionBombing(FlightGroup,1688)

-- Alternatively, set up precision bombing, ArmyGroup as lasing unit
       local ArmyGroup = ARMYGROUP:New("LasingUnit")
       ArmyGroup:SetDefaultROE(ENUMS.ROE.WeaponHold)
       ArmyGroup:SetDefaultInvisible(true)
       ArmyGroup:Activate()
       taskmanager:EnablePrecisionBombing(ArmyGroup,1688)

[User] Set or create a SCORING object for this taskcontroller

Defined in:

PLAYERTASKCONTROLLER

Parameter:

(optional) the Scoring object

Return value:

[User] Enable extra menu to show task detail information before joining

Defined in:

PLAYERTASKCONTROLLER

Return value:

Create and run a new TASKCONTROLLER instance.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string Name

Name of this controller

#number Coalition

of this controller, e.g. coalition.side.BLUE

#string Type

Type of the tasks controlled, defaults to PLAYERTASKCONTROLLER.Type.A2G

#string ClientFilter

(optional) Additional prefix filter for the SET_CLIENT. Can be handed as Core.Set#SET_CLIENT also.

Return value:

On After "PlayerAbortedTask" event.

Player aborted a task.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The player group object

The player client object

On After "PlayerJoinedTask" event.

Player joined a task.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The player group object

The player client object

On After "TaskAdded" event.

Task has been added.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskCancelled" event.

Task has been cancelled.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskDone" event.

Task is done.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskFailed" event.

Task has failed.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskProgress" event.

Task target count has been reduced.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The current Task.

#number TargetCount

Targets left over

On After "TaskRepeatOnFailed" event.

Task has failed and will be repeated.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskSuccess" event.

Task has been a success.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskTargetFlared" event.

Task flared.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskTargetIlluminated" event.

Task illuminated.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On After "TaskTargetSmoked" event.

Task smoked.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

[User] Remove accept zone from INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Zone#ZONE AcceptZone

Add a zone to the accept zone set.

Return value:

[User] Remove reject zone from INTEL detection.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Core.Zone#ZONE RejectZone

Add a zone to the reject zone set.

Return value:

[User] Set flash directions option for player (player based info)

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean OnOff

Set to true to switch on and false to switch off. Default is OFF.

Return value:

[User] Set callsign options for TTS output.

See Wrapper.Group#GROUP.GetCustomCallSign() on how to set customized callsigns.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean ShortCallsign

If true, only call out the major flight number

#boolean Keepnumber

If true, keep the customized callsign in the #GROUP name for players as-is, no amendments or numbers.

#table CallsignTranslations

(optional) Table to translate between DCS standard callsigns and bespoke ones. Does not apply if using customized callsigns from playername or group name.

Return value:

[User] Set the cluster radius if you want to use target clusters rather than single group detection.

Note that for a controller type A2A target clustering is on by default. Also remember that the diameter of the resulting zone is double the radius.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#number Radius

Target cluster radius in kilometers. Default is 0.5km.

Return value:

[User] Do not show menu entries to illuminate targets.

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Do not show menu entries to smoke or flare targets

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Do not show target menu entries of type names for GROUND targets

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Show menu entries to illuminate targets.

Needs smoke/flare enabled.

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Show menu entries to smoke or flare targets (on by default!)

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Show target menu entries of type names for GROUND targets (off by default!), e.g.

"Tank Group..."

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Show info text on screen with a coordinate info in any case (OFF by default)

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean OnOff

Switch on = true or off = false

#boolean LLDDM

Show LLDDM = true or LLDMS = false

Return value:

[User] Set locale for localization.

Defaults to "en"

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Locale

The locale to use

Return value:

[User] Allow F10 markers to be deleted by pilots.

Note: Marker will auto-delete when the undelying task is done.

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Forbid F10 markers to be deleted by pilots.

Note: Marker will auto-delete when the undelying task is done.

Defined in:

PLAYERTASKCONTROLLER

Return value:

[User] Set the top menu name to a custom string.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Name

The name to use as the top menu designation.

Return value:

[User] Set menu build fine-tuning options

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean InfoMenu

If true this option will allow to show the Task Info-Menu also when a player has an active task. Since the menu isn't refreshed if a player holds an active task, the info in there might be stale.

#number ItemLimit

Number of items per task type to show, default 5.

#number HoldTime

Minimum number of seconds between menu refreshes (called every 30 secs) if a player has no active task.

Return value:

[User] Set the top menu to be a sub-menu of another MENU entry.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Return value:

[User] Change the list of attributes, which are considered on GROUP or SET_GROUP level of a target to create SEAD player tasks.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#table Attributes

Table of attribute types considered to lead to a SEAD type player task.

Return value:

Usage:

Default attribute types are: GROUP.Attribute.GROUND_SAM, GROUP.Attribute.GROUND_AAA, and GROUP.Attribute.GROUND_EWR.
If you want to e.g. exclude AAA, so target groups with this attribute are assigned CAS or BAI tasks, and not SEAD, use this function as follows:

           `mycontroller:SetSEADAttributes({GROUP.Attribute.GROUND_SAM, GROUP.Attribute.GROUND_EWR})`

[User] Set SRS TTS details - see Sound.SRS for details.SetSRS() will try to use as many attributes configured with Sound.SRS#MSRS.LoadConfigFile() as possible.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#number Frequency

Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!

#number Modulation

Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!

#string PathToSRS

Defaults to "C:\Program Files\DCS-SimpleRadio-Standalone"

#string Gender

(Optional) Defaults to "male"

#string Culture

(Optional) Defaults to "en-US"

#number Port

(Optional) Defaults to 5002

#string Voice

(Optional) Use a specifc voice with the Sound.SRS#SetVoice function, e.g, :SetVoice("Microsoft Hedda Desktop"). Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.

#number Volume

(Optional) Volume - between 0.0 (silent) and 1.0 (loudest)

#string PathToGoogleKey

(Optional) Path to your google key if you want to use google TTS; if you use a config file for MSRS, hand in nil here.

#string AccessKey

(Optional) Your Google API access key. This is necessary if DCS-gRPC is used as backend; if you use a config file for MSRS, hand in nil here.

Coordinate from which the controller radio is sending

Return value:

[User] Set SRS Broadcast - for the announcement to joining players which SRS frequency, modulation to use.

Use in case you want to set this differently to the standard SRS.

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#number Frequency

Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!

#number Modulation

Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!

Return value:

[User] Set target radius.

Determines the zone radius to distinguish CAS from BAI tasks and to find enemies if the TARGET object is a COORDINATE.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#number Radius

Radius to use in meters. Defaults to 500 meters.

Return value:

[User] Set up a (negative) blacklist of forbidden task types.

These types will not be generated.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#table BlackList

Table of task types that cannot be generated. Use to restrict available types.

Return value:

Usage:

Currently, the following task types will be generated, if detection has been set up:
A2A - AUFTRAG.Type.INTERCEPT
A2S - AUFTRAG.Type.ANTISHIP
A2G - AUFTRAG.Type.CAS, AUFTRAG.Type.BAI, AUFTRAG.Type.SEAD, AUFTRAG.Type.BOMBING, AUFTRAG.Type.PRECISIONBOMBING, AUFTRAG.Type.BOMBRUNWAY
A2GS - A2G + A2S
If you don't want SEAD tasks generated, use as follows where "mycontroller" is your PLAYERTASKCONTROLLER object:

           `mycontroller:SetTaskBlackList({AUFTRAG.Type.SEAD})`
           

[User] Set repetition options for tasks

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean OnOff

Set to true to switch on and false to switch off (defaults to true)

#number Repeats

Number of repeats (defaults to 5)

Return value:

Usage:

`taskmanager:SetTaskRepetition(true, 5)`

[User] Set up a (positive) whitelist of allowed task types.

Only these types will be generated.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#table WhiteList

Table of task types that can be generated. Use to restrict available types.

Return value:

Usage:

Currently, the following task types will be generated, if detection has been set up:
A2A - AUFTRAG.Type.INTERCEPT
A2S - AUFTRAG.Type.ANTISHIP
A2G - AUFTRAG.Type.CAS, AUFTRAG.Type.BAI, AUFTRAG.Type.SEAD, AUFTRAG.Type.BOMBING, AUFTRAG.Type.PRECISIONBOMBING, AUFTRAG.Type.BOMBRUNWAY
A2GS - A2G + A2S
If you don't want SEAD tasks generated, use as follows where "mycontroller" is your PLAYERTASKCONTROLLER object:

           `mycontroller:SetTaskWhiteList({AUFTRAG.Type.CAS, AUFTRAG.Type.BAI, AUFTRAG.Type.BOMBING, AUFTRAG.Type.BOMBRUNWAY})`
           

[User] For SRS - Switch to only transmit if there are players on the server.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean Switch

If true, only send SRS if there are alive Players.

Return value:

[User] Set up INTEL detection

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string RecceName

This name will be used to build a detection group set. All groups with this string somewhere in their group name will be added as Recce.

Return value:

[User] Switch screen output.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean OnOff

Switch screen output off (true) or on (false)

Return value:

[User] Set up detection of STATIC objects.

You need to set up detection with PLAYERTASKCONTROLLER.SetupIntel() before using this.

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean OnOff

Set to truefor on and falsefor off.

Return value:

[User] Switch showing additional magnetic angles

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean OnOff

If true, set to on (default), if nil or false, set to off

Return value:

[User] Switch usage of target names for menu entries on or off

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#boolean OnOff

If true, set to on (default), if nil or false, set to off

Return value:

[Internal] Abort Task

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Show active task info

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Add a task to the task queue

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Return value:

[Internal] Check task queue for a specific player name

Defined in:

PLAYERTASKCONTROLLER

Parameter:

PlayerName

Return value:

#boolean:

outcome

[Internal] Check precision task queue

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Check target queue

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Check task queue

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Check for allowed task type, if there is a (positive) whitelist

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Type

Return value:

#boolean:

Outcome

[Internal] Check for allowed task type, if there is a (negative) blacklist

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Type

Return value:

#boolean:

Outcome

[Internal] _CreateActiveTaskMenuTemplate

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] _CreateJoinMenuTemplate

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Event handling

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Return value:

[Internal] Flare task location

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Flashing directional info for a client

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Get task types for the menu

Defined in:

PLAYERTASKCONTROLLER

Return value:

#table:

TaskTypes

[Internal] Get player name

Defined in:

PLAYERTASKCONTROLLER

Parameter:

Return values:

#string:

playername

#string:

ttsplayername

[Internal] Get task per type for the menu

Defined in:

PLAYERTASKCONTROLLER

Return value:

#table:

TasksPerTypes

[Internal] Get text for text-to-speech.

Numbers are spaced out, e.g. "Heading 180" becomes "Heading 1 8 0 ".

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string text

Original text.

Return value:

#string:

Spoken text.

[Internal] Illuminate task location

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Init localization

Defined in:

PLAYERTASKCONTROLLER

Return value:

[Internal] Function the check against SeadAttributes

Defined in:

PLAYERTASKCONTROLLER

Parameter:

#string Attribute

Return value:

#boolean:

IsSead

[Internal] Join a player to a task

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean Force

Assign task even if client already has one

Return value:

[Internal] Mark task on F10 map

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] _RemoveMenuEntriesForTask

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Send message to SET_CLIENT of players

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string Text

the text to be send

#number Seconds

(optional) Seconds to show, default 10

Return value:

[Internal] Smoke task location

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] Switch flashing info for a client

Defined in:

PLAYERTASKCONTROLLER

Parameters:

Return value:

[Internal] _SwitchMenuForClient

Defined in:

PLAYERTASKCONTROLLER

Parameters:

The client

#string MenuType

#number Delay

Return value:

TODO - New Menu Manager - [Internal] _UpdateJoinMenuTemplate @param #PLAYERTASKCONTROLLER self @return #PLAYERTASKCONTROLLER self

Defined in:

PLAYERTASKCONTROLLER

[Internal] On after start call

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after Status call

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after Stop call

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task added

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task cancelled

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task done

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task failed

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task failed, repeat planned

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

[Internal] On after task success

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string From

#string Event

#string To

Return value:

Field(s)

#boolean PLAYERTASKCONTROLLER.AllowFlash

Flashing directions for players allowed

#string PLAYERTASKCONTROLLER.ClassName

Name of the class.

#table PLAYERTASKCONTROLLER.FlashPlayer

List of player who switched Flashing Direction Info on

#boolean PLAYERTASKCONTROLLER.ShowMagnetic

Also show magnetic angles

#string PLAYERTASKCONTROLLER.lid

Class id string for output to DCS log file.

#boolean PLAYERTASKCONTROLLER.verbose

Switch verbosity.

#string PLAYERTASKCONTROLLER.version

PLAYERTASK class version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Field(s)

#number SeadAttributes.AAA

GROUP.Attribute.GROUND_AAA

#number SeadAttributes.EWR

GROUP.Attribute.GROUND_EWR

#number SeadAttributes.SAM

GROUP.Attribute.GROUND_SAM

Function(s)

Field(s)

#string Type.A2A

Air-to-Air Controller

#string Type.A2G

Air-to-Ground Controller

#string Type.A2GS

Air-to-Ground-and-Ship Controller

#string Type.A2S

Air-to-Ship Controller

Function(s)