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

3 Task repetition

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

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",
           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",
         },

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)

PLAYERTASK , extends Core.Fsm#FSM , extends Core.Base#BASE
Fields and Methods inherited from PLAYERTASK Description

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.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: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.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:RemoveClient(Client)

[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:_EvalConditionsAny(Conditions)

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

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

Call scheduler.

PLAYERTASK.ClassName

Name of the class.

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

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

Current state name.

PLAYERTASK.endstates

PLAYERTASK:is(State, state)

Check if FSM is in state.

PLAYERTASK.options

Options.

PLAYERTASK.subs

Subs.

Fields and Methods inherited from BASE Description

PLAYERTASK.ClassID

The ID number of the class.

PLAYERTASK.ClassName

The name of the class.

PLAYERTASK.ClassNameAndID

The name of the class concatenated with the ID number of the class.

PLAYERTASK:ClearState(Object, StateName)

Clear the state of an object.

PLAYERTASK:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

PLAYERTASK:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

PLAYERTASK:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

PLAYERTASK:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

PLAYERTASK:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

PLAYERTASK:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

PLAYERTASK:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

PLAYERTASK:E(Arguments)

Log an exception which will be traced always.

PLAYERTASK:EventDispatcher()

Returns the event dispatcher

PLAYERTASK:EventRemoveAll()

Remove all subscribed events

PLAYERTASK:F(Arguments)

Trace a function call.

PLAYERTASK:F2(Arguments)

Trace a function call level 2.

PLAYERTASK:F3(Arguments)

Trace a function call level 3.

PLAYERTASK:GetClassID()

Get the ClassID of the class instance.

PLAYERTASK:GetClassName()

Get the ClassName of the class instance.

PLAYERTASK:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

PLAYERTASK:GetEventPriority()

Get the Class Core.Event processing Priority.

PLAYERTASK:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

PLAYERTASK:GetState(Object, Key)

Get a Value given a Key from the Object.

PLAYERTASK:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

PLAYERTASK:I(Arguments)

Log an information which will be traced always.

PLAYERTASK:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

PLAYERTASK:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

PLAYERTASK:IsTrace()

Enquires if tracing is on (for the class).

PLAYERTASK:New()

BASE constructor.

PLAYERTASK:OnEvent(EventData)

Occurs when an Event for an object is triggered.

PLAYERTASK:OnEventBDA(EventData)

BDA.

PLAYERTASK:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

PLAYERTASK:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

PLAYERTASK:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

PLAYERTASK:OnEventDead(EventData)

Occurs when an object is dead.

PLAYERTASK:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

PLAYERTASK:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

PLAYERTASK:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASK:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

PLAYERTASK:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

PLAYERTASK:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

PLAYERTASK:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

PLAYERTASK:OnEventKill(EventData)

Occurs on the death of a unit.

PLAYERTASK:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASK:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

PLAYERTASK:OnEventLandingQualityMark(EventData)

Landing quality mark.

PLAYERTASK:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

PLAYERTASK:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

PLAYERTASK:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

PLAYERTASK:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASK:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASK:OnEventParatrooperLanding(EventData)

Weapon add.

PLAYERTASK:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

PLAYERTASK:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

PLAYERTASK:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

PLAYERTASK:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

PLAYERTASK:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

PLAYERTASK:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

PLAYERTASK:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

PLAYERTASK:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

PLAYERTASK:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

PLAYERTASK:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

PLAYERTASK:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

PLAYERTASK:OnEventTriggerZone(EventData)

Trigger zone.

PLAYERTASK:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

PLAYERTASK:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

PLAYERTASK:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

PLAYERTASK:ScheduleStop(SchedulerID)

Stops the Schedule.

PLAYERTASK.Scheduler

PLAYERTASK:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

PLAYERTASK:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

PLAYERTASK:T(Arguments)

Trace a function logic level 1.

PLAYERTASK:T2(Arguments)

Trace a function logic level 2.

PLAYERTASK:T3(Arguments)

Trace a function logic level 3.

PLAYERTASK:TraceAll(TraceAll)

Trace all methods in MOOSE

PLAYERTASK:TraceClass(Class)

Set tracing for a class

PLAYERTASK:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

PLAYERTASK:TraceLevel(Level)

Set trace level

PLAYERTASK:TraceOff()

Set trace off.

PLAYERTASK:TraceOn()

Set trace on.

PLAYERTASK:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

PLAYERTASK:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

PLAYERTASK._

PLAYERTASK:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

PLAYERTASK:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

PLAYERTASK.__

PLAYERTASK:onEvent(event)

The main event handling function...

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: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:AddPlayerTaskToQueue(PlayerTask, Silent)

[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: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)

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

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

PLAYERTASKCONTROLLER.LaserCode

PLAYERTASKCONTROLLER.LasingDrone

PLAYERTASKCONTROLLER.LasingDroneTemplate

PLAYERTASKCONTROLLER.MarkerOps

PLAYERTASKCONTROLLER.MarkerReadOnly

PLAYERTASKCONTROLLER.MenuName

PLAYERTASKCONTROLLER.MenuParent

PLAYERTASKCONTROLLER.Messages

PLAYERTASKCONTROLLER.Modulation

PLAYERTASKCONTROLLER.Name

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

Create and run a new TASKCONTROLLER instance.

PLAYERTASKCONTROLLER.NoScreenOutput

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: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.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.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:SetDisableSmokeFlareTask()

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

PLAYERTASKCONTROLLER:SetEnableSmokeFlareTask()

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

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)

[User] Set SRS TTS details - see Sound.SRS for details

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

PLAYERTASKCONTROLLER.Voice

PLAYERTASKCONTROLLER.Volume

PLAYERTASKCONTROLLER.WhiteList

PLAYERTASKCONTROLLER:_AbortTask(Group, Client)

[Internal] Abort Task

PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)

[Internal] Show active task info

PLAYERTASKCONTROLLER:_AddTask(Target)

[Internal] Add a task to the task queue

PLAYERTASKCONTROLLER:_BuildMenus(Client, enforced, fromsuccess)

[Internal] Build client menus

PLAYERTASKCONTROLLER:_BuildTaskInfoMenu(group, client, playername, topmenu, tasktypes, taskpertype)

[Internal] Build Task Info Menu

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:_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(Group, Client, Task, Force)

[Internal] Join a player to a task

PLAYERTASKCONTROLLER:_MarkTask(Group, Client)

[Internal] Mark task on F10 map

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

PLAYERTASKCONTROLLER.autolase

PLAYERTASKCONTROLLER.buddylasing

PLAYERTASKCONTROLLER.customcallsigns

PLAYERTASKCONTROLLER.gettext

PLAYERTASKCONTROLLER.holdmenutime

PLAYERTASKCONTROLLER.lasttaskcount

PLAYERTASKCONTROLLER.lid

Class id string for output to DCS log file.

PLAYERTASKCONTROLLER.locale

PLAYERTASKCONTROLLER.menuitemlimit

PLAYERTASKCONTROLLER.noflaresmokemenu

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

Call scheduler.

PLAYERTASKCONTROLLER.ClassName

Name of the class.

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

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

Current state name.

PLAYERTASKCONTROLLER.endstates

PLAYERTASKCONTROLLER:is(State, state)

Check if FSM is in state.

PLAYERTASKCONTROLLER.options

Options.

PLAYERTASKCONTROLLER.subs

Subs.

Fields and Methods inherited from BASE Description

PLAYERTASKCONTROLLER.ClassID

The ID number of the class.

PLAYERTASKCONTROLLER.ClassName

The name of the class.

PLAYERTASKCONTROLLER.ClassNameAndID

The name of the class concatenated with the ID number of the class.

PLAYERTASKCONTROLLER:ClearState(Object, StateName)

Clear the state of an object.

PLAYERTASKCONTROLLER:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

PLAYERTASKCONTROLLER:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

PLAYERTASKCONTROLLER:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

PLAYERTASKCONTROLLER:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

PLAYERTASKCONTROLLER:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

PLAYERTASKCONTROLLER:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

PLAYERTASKCONTROLLER:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

PLAYERTASKCONTROLLER:E(Arguments)

Log an exception which will be traced always.

PLAYERTASKCONTROLLER:EventDispatcher()

Returns the event dispatcher

PLAYERTASKCONTROLLER:EventRemoveAll()

Remove all subscribed events

PLAYERTASKCONTROLLER:F(Arguments)

Trace a function call.

PLAYERTASKCONTROLLER:F2(Arguments)

Trace a function call level 2.

PLAYERTASKCONTROLLER:F3(Arguments)

Trace a function call level 3.

PLAYERTASKCONTROLLER:GetClassID()

Get the ClassID of the class instance.

PLAYERTASKCONTROLLER:GetClassName()

Get the ClassName of the class instance.

PLAYERTASKCONTROLLER:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

PLAYERTASKCONTROLLER:GetEventPriority()

Get the Class Core.Event processing Priority.

PLAYERTASKCONTROLLER:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

PLAYERTASKCONTROLLER:GetState(Object, Key)

Get a Value given a Key from the Object.

PLAYERTASKCONTROLLER:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

PLAYERTASKCONTROLLER:I(Arguments)

Log an information which will be traced always.

PLAYERTASKCONTROLLER:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

PLAYERTASKCONTROLLER:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

PLAYERTASKCONTROLLER:IsTrace()

Enquires if tracing is on (for the class).

PLAYERTASKCONTROLLER:New()

BASE constructor.

PLAYERTASKCONTROLLER:OnEvent(EventData)

Occurs when an Event for an object is triggered.

PLAYERTASKCONTROLLER:OnEventBDA(EventData)

BDA.

PLAYERTASKCONTROLLER:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

PLAYERTASKCONTROLLER:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

PLAYERTASKCONTROLLER:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

PLAYERTASKCONTROLLER:OnEventDead(EventData)

Occurs when an object is dead.

PLAYERTASKCONTROLLER:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

PLAYERTASKCONTROLLER:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

PLAYERTASKCONTROLLER:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASKCONTROLLER:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

PLAYERTASKCONTROLLER:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

PLAYERTASKCONTROLLER:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

PLAYERTASKCONTROLLER:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

PLAYERTASKCONTROLLER:OnEventKill(EventData)

Occurs on the death of a unit.

PLAYERTASKCONTROLLER:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASKCONTROLLER:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

PLAYERTASKCONTROLLER:OnEventLandingQualityMark(EventData)

Landing quality mark.

PLAYERTASKCONTROLLER:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

PLAYERTASKCONTROLLER:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

PLAYERTASKCONTROLLER:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

PLAYERTASKCONTROLLER:OnEventMissionEnd(EventData)

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASKCONTROLLER:OnEventMissionStart(EventData)

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

PLAYERTASKCONTROLLER:OnEventParatrooperLanding(EventData)

Weapon add.

PLAYERTASKCONTROLLER:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

PLAYERTASKCONTROLLER:OnEventPlayerEnterAircraft(EventData)

Occurs when a player enters a slot and takes control of an aircraft.

PLAYERTASKCONTROLLER:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

PLAYERTASKCONTROLLER:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

PLAYERTASKCONTROLLER:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

PLAYERTASKCONTROLLER:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

PLAYERTASKCONTROLLER:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

PLAYERTASKCONTROLLER:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

PLAYERTASKCONTROLLER:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

PLAYERTASKCONTROLLER:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

PLAYERTASKCONTROLLER:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

PLAYERTASKCONTROLLER:OnEventTriggerZone(EventData)

Trigger zone.

PLAYERTASKCONTROLLER:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

PLAYERTASKCONTROLLER:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

PLAYERTASKCONTROLLER:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

PLAYERTASKCONTROLLER:ScheduleStop(SchedulerID)

Stops the Schedule.

PLAYERTASKCONTROLLER.Scheduler

PLAYERTASKCONTROLLER:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

PLAYERTASKCONTROLLER:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

PLAYERTASKCONTROLLER:T(Arguments)

Trace a function logic level 1.

PLAYERTASKCONTROLLER:T2(Arguments)

Trace a function logic level 2.

PLAYERTASKCONTROLLER:T3(Arguments)

Trace a function logic level 3.

PLAYERTASKCONTROLLER:TraceAll(TraceAll)

Trace all methods in MOOSE

PLAYERTASKCONTROLLER:TraceClass(Class)

Set tracing for a class

PLAYERTASKCONTROLLER:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

PLAYERTASKCONTROLLER:TraceLevel(Level)

Set trace level

PLAYERTASKCONTROLLER:TraceOff()

Set trace off.

PLAYERTASKCONTROLLER:TraceOn()

Set trace on.

PLAYERTASKCONTROLLER:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

PLAYERTASKCONTROLLER:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

PLAYERTASKCONTROLLER._

PLAYERTASKCONTROLLER:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

PLAYERTASKCONTROLLER:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

PLAYERTASKCONTROLLER.__

PLAYERTASKCONTROLLER:onEvent(event)

The main event handling function...

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] 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] 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

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

Parameter:

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

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)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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 a PLAYERTASK object to the list of (open) tasks

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#boolean Silent

If true, make no "has new task" announcement

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

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] 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

Return value:

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 "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 smoke or flare targets

Defined in:

PLAYERTASKCONTROLLER

Return value:

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

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

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

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] Build client menus

Defined in:

PLAYERTASKCONTROLLER

Parameters:

(optional) build for this client name only

#boolean enforced

#boolean fromsuccess

Return value:

[Internal] Build Task Info Menu

Defined in:

PLAYERTASKCONTROLLER

Parameters:

#string playername

#table tasktypes

#table taskpertype

Return value:

#table:

taskinfomenu

[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] 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] 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] 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)

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

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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)