Banner Image

Module Functional.Designate

Functional - Management of target Designation.

Lase, smoke and illuminate targets.


Features:

  • Faciliate the communication of detected targets to players.
  • Designate targets using lasers, through a menu system.
  • Designate targets using smoking, through a menu system.
  • Designate targets using illumination, through a menu system.
  • Auto lase targets.
  • Refresh detection upon specified time intervals.
  • Prioritization on threat levels.
  • Reporting system of threats.

Additional Material:

  • Demo Missions: GitHub
  • YouTube videos: None
  • Guides: None

Targets detected by recce will be communicated to a group of attacking players.
A menu system is made available that allows to:

  • Lased for a period of time.
  • Smoked. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
  • Illuminated through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.

The following terminology is being used throughout this document:

  • The DesignateObject is the object of the DESIGNATE class, which is this class explained in the document.
  • The DetectionObject is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into DetectionItems.
  • TargetGroups is the list of detected target groupings by the DetectionObject. Each TargetGroup contains a TargetSet.
  • TargetGroup is one element of the TargetGroups list, and contains a TargetSet.
  • The TargetSet is a SET_UNITS collection of Targets, that have been detected by the DetectionObject.
  • A Target is a detected UNIT object by the DetectionObject.
  • A Threat Level is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
  • The RecceSet is a SET_GROUP collection that contains the RecceGroups.
  • A RecceGroup is a GROUP object containing the Recces.
  • A Recce is a UNIT object executing the reconnaissance as part the DetectionObject. A Recce can be of any UNIT type.
  • An AttackGroup is a GROUP object that contain Players.
  • A Player is an active CLIENT object containing a human player.
  • A Designate Menu is the menu that is dynamically created during the designation process for each AttackGroup.

Player Manual

Banner Image

A typical mission setup would require Recce (a Core.Set of Recce) to be detecting potential targets. The DetectionObject will group the detected targets based on the detection method being used. Possible detection methods could be by Area, by Type or by Unit. Each grouping will result in a TargetGroup, for terminology and clarity we will use this term throughout the document.

Recce require to have Line of Sight (LOS) towards the targets. The Recce will report any detected targets to the Players (on the picture Observers). When targets are detected, a menu will be made available that allows those TargetGroups to be designated. Designation can be done by Lasing, Smoking and Illumination. Smoking is useful during the day, while illumination is recommended to be used during the night. Smoking can designate specific targets, but not very precise, while lasing is very accurate and allows to players to attack the targets using laser guided bombs or rockets. Illumination will lighten up the Target Area.

Recce can be ground based or airborne. Airborne Recce (AFAC) can be really useful to designate a large amount of targets in a wide open area, as airborne Recce has a large LOS. However, ground based Recce are very useful to smoke or illuminate targets, as they can be much closer to the Target Area.

It is recommended to make the Recce invisible and immortal using the Mission Editor in DCS World. This will ensure that the detection process won't be interrupted and that targets can be designated. However, you don't have to, so to simulate a more real-word situation or simulation, Recce can also be destroyed!

1. Player View (Observer)

Banner Image

The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject. Once Targets have been detected, the DesignateObject will trigger the Detect Event.

In order to prevent an overflow in the DesignateObject of detected targets, there is a maximum amount of TargetGroups that can be put in scope of the DesignateObject. We call this the MaximumDesignations term.

2. Designate Menu

Banner Image

For each detected TargetGroup, there is:

  • A Designate Menu are created and continuously refreshed, containing the DesignationID and the Designation Status.
  • The RecceGroups are reporting to each AttackGroup, sending Messages containing the Threat Level and the TargetSet composition.

A Player can then select an action from the Designate Menu. The Designation Status is shown between the ( ).

It indicates for each TargetGroup the current active designation action applied:

  • An "I" for Illumnation designation.
  • An "S" for Smoking designation.
  • An "L" for Lasing designation.

Note that multiple designation methods can be active at the same time! Note the Auto Lase option. When switched on, the available Recce will lase Targets when detected.

Targets are designated per Threat Level. The most threatening targets from an Air to Ground perspective, are designated first! This is for all designation methods.

Banner Image

Each Designate Menu has a sub menu structure, which allows specific actions to be triggered:

  • Lase Targets using a specific laser code.
  • Smoke Targets using a specific smoke color.
  • Illuminate areas.

3. Lasing Targets

Banner Image

Lasing targets is done as expected. Each available Recce can lase only ONE target through!

Banner Image

Lasing can be done for specific laser codes. The Su-25T requires laser code 1113, while the A-10A requires laser code 1680. For those, specific menu options can be made available for players to lase with these codes. Auto Lase (as explained above), will ensure continuous lasing of available targets. The status report shows which targets are being designated.

The following logic is executed when a TargetGroup is selected to be lased from the Designation Menu:

  • The RecceSet is searched for any Recce that is within designation distance from a Target in the TargetGroup that is currently not being designated.
  • If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
  • During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
  • When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
  • When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
  • When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.

In this way, DESIGNATE assists players to designate ground targets for a coordinated attack!

4. Illuminating Targets

Banner Image

Illumination bombs are fired between 500 and 700 meters altitude and will burn about 2 minutes, while slowly decending. Each available recce within range will fire an illumination bomb. Illumination bombs can be fired in while lasing targets. When illumination bombs are fired, it will take about 2 minutes until a sequent bomb run can be requested using the menus.

5. Smoking Targets

Banner Image

Smoke will fire for 5 minutes. Each available recce within range will smoke a target. Smoking can be requested while lasing targets. Smoke will appear "around" the targets, because of accuracy limitations.

Have FUN!


Contributions:

  • Ciribob: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
  • EasyEB: Ideas and Beta Testing
  • Wingthor: Beta Testing

Authors:

  • FlightControl: Design & Programming

Global(s)

Global DESIGNATE

Manage the designation of detected targets.

#DESIGNATE DESIGNATE

Manage the designation of detected targets.

1. DESIGNATE constructor

2. DESIGNATE is a FSM

Designate is a finite state machine, which allows for controlled transitions of states.

2.1 DESIGNATE States

  • Designating ( Group ): The designation process.

2.2 DESIGNATE Events

3. Maximum Designations

In order to prevent an overflow of designations due to many Detected Targets, there is a Maximum Designations scope that is set in the DesignationObject.

The method DESIGNATE.SetMaximumDesignations() will put a limit on the amount of designations (target groups) put in scope of the DesignationObject. Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected.

4. Laser codes

4.1. Set possible laser codes

An array of laser codes can be provided, that will be used by the DESIGNATE when lasing. The laser code is communicated by the Recce when it is lasing a larget. Note that the default laser code is 1113. Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237

Use the method DESIGNATE.SetLaserCodes() to set the possible laser codes to be selected from. One laser code can be given or an sequence of laser codes through an table...

Designate:SetLaserCodes( 1214 )

The above sets one laser code with the value 1214.

Designate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )

The above sets a collection of possible laser codes that can be assigned. Note the { } notation!

4.2. Auto generate laser codes

Use the method DESIGNATE.GenerateLaserCodes() to generate all possible laser codes. Logic implemented and advised by Ciribob!

4.3. Add specific lase codes to the lase menu

Certain plane types can only drop laser guided ordonnance when targets are lased with specific laser codes. The SU-25T needs targets to be lased using laser code 1113. The A-10A needs targets to be lased using laser code 1680.

The method DESIGNATE.AddMenuLaserCode() to allow a player to lase a target using a specific laser code. Remove such a lase menu option using DESIGNATE.RemoveMenuLaserCode().

5. Autolase to automatically lase detected targets.

DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. The auto lase function can be activated through the Designation Menu. Use the method DESIGNATE.SetAutoLase() to activate or deactivate the auto lase function programmatically. Note that autolase will automatically activate lasing for ALL DetectedItems. Individual items can be switched-off if required using the Designation Menu.

Designate:SetAutoLase( true )

Activate the auto lasing.

6. Target prioritization on threat level

Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, and will continue this until the remaining vehicles with the lowest threat have been reached.

This threat level prioritization can be activated using the method DESIGNATE.SetThreatLevelPrioritization(). If not activated, Targets will be selected in a random order, but most like those first which are the closest to the Recce marking the Target.

Designate:SetThreatLevelPrioritization( true )

The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target.

7. Designate Menu Location for a Mission

You can make DESIGNATE work for a Tasking.Mission#MISSION object. In this way, the designate menu will not appear in the root of the radio menu, but in the menu of the Mission. Use the method DESIGNATE.SetMission() to set the Tasking.Mission object for the designate function.

8. Status Report

A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.

  • The status report can be shown by selecting "Status" -> "Report Status" from the Designation menu .

  • The status report can be automatically flashed by selecting "Status" -> "Flash Status On".

  • The automatic flashing of the status report can be deactivated by selecting "Status" -> "Flash Status Off".

  • The flashing of the status menu is disabled by default.

  • The method DESIGNATE.SetFlashStatusMenu() can be used to enable or disable to flashing of the status menu.

    Designate:SetFlashStatusMenu( true )

The example will activate the flashing of the status menu for this Designate object.

Type(s)

Fields and Methods inherited from DESIGNATE Description

DESIGNATE:AddMenuLaserCode(LaserCode, MenuText)

Add a specific lase code to the designate lase menu to lase targets with a specific laser code.

DESIGNATE.AttackSet

DESIGNATE.AutoLase

DESIGNATE.CC

DESIGNATE:CoordinateLase()

Coordinates the Auto Lase.

DESIGNATE.DesignateName

DESIGNATE.Designating

DESIGNATE:DesignationScope()

Adapt the designation scope according the detected items.

DESIGNATE:Detect()

Detect Trigger for DESIGNATE

DESIGNATE.Detection

DESIGNATE.FlashDetectionMessage

DESIGNATE.FlashStatusMenu

DESIGNATE:GenerateLaserCodes()

Generate an array of possible laser codes.

DESIGNATE:Illuminate()

Illuminate Trigger for DESIGNATE

DESIGNATE.LaseDuration

DESIGNATE:LaseOff()

LaseOff Trigger for DESIGNATE

DESIGNATE:LaseOn()

LaseOn Trigger for DESIGNATE

DESIGNATE.LaseStart

DESIGNATE.LaserCodes

DESIGNATE.LaserCodesUsed

DESIGNATE.MarkScheduler

DESIGNATE.MaximumDesignations

DESIGNATE.MaximumDistanceAirDesignation

DESIGNATE.MaximumDistanceDesignations

DESIGNATE.MaximumDistanceGroundDesignation

DESIGNATE.MaximumMarkings

DESIGNATE:MenuAutoLase(AutoLase)

DESIGNATE.MenuDesignate

DESIGNATE:MenuFlashStatus(AttackGroup, Flash)

DESIGNATE:MenuForget(Index)

DESIGNATE:MenuIlluminate(Index)

DESIGNATE:MenuLaseCode(Index, Duration, LaserCode)

DESIGNATE:MenuLaseOff(Index, Duration)

DESIGNATE:MenuLaseOn(Index, Duration)

DESIGNATE.MenuLaserCodes

DESIGNATE:MenuSmoke(Index, Color)

DESIGNATE:MenuStatus(AttackGroup)

DESIGNATE.Mission

DESIGNATE:New(CC, Detection, AttackSet, Mission)

DESIGNATE Constructor.

DESIGNATE:OnAfterDetect(From, Event, To)

Detect Handler OnAfter for DESIGNATE

DESIGNATE:OnAfterIlluminate(From, Event, To)

Illuminate Handler OnAfter for DESIGNATE

DESIGNATE:OnAfterLaseOff(From, Event, To)

LaseOff Handler OnAfter for DESIGNATE

DESIGNATE:OnAfterLaseOn(From, Event, To)

LaseOn Handler OnAfter for DESIGNATE

DESIGNATE:OnAfterSmoke(From, Event, To)

Smoke Handler OnAfter for DESIGNATE

DESIGNATE:OnAfterStatus(From, Event, To)

Status Handler OnAfter for DESIGNATE

DESIGNATE:OnBeforeDetect(From, Event, To)

Detect Handler OnBefore for DESIGNATE

DESIGNATE:OnBeforeIlluminate(From, Event, To)

Illuminate Handler OnBefore for DESIGNATE

DESIGNATE:OnBeforeLaseOff(From, Event, To)

LaseOff Handler OnBefore for DESIGNATE

DESIGNATE:OnBeforeLaseOn(From, Event, To)

LaseOn Handler OnBefore for DESIGNATE

DESIGNATE:OnBeforeSmoke(From, Event, To)

Smoke Handler OnBefore for DESIGNATE

DESIGNATE:OnBeforeStatus(From, Event, To)

Status Handler OnBefore for DESIGNATE

DESIGNATE.RecceSet

DESIGNATE.Recces

DESIGNATE:RemoveMenuLaserCode(LaserCode)

Removes a specific lase code from the designate lase menu.

DESIGNATE:SendStatus(AttackGroup, Duration, MenuAttackGroup)

Sends the status to the Attack Groups.

DESIGNATE:SetAutoLase(AutoLase, Message)

Set auto lase.

DESIGNATE:SetDesignateMenu()

Sets the Designate Menu for all the attack groups.

DESIGNATE:SetDesignateName(DesignateName)

Set the name of the designation.

DESIGNATE:SetFlashDetectionMessages(FlashDetectionMessage)

Set the flashing of the new detection messages.

DESIGNATE:SetFlashStatusMenu(FlashMenu)

Set the flashing of the status menu for all AttackGroups.

DESIGNATE:SetLaseDuration(LaseDuration)

Set the lase duration for designations.

DESIGNATE:SetLaserCodes(LaserCodes)

Set an array of possible laser codes.

DESIGNATE:SetMaximumDesignations(MaximumDesignations)

Set the maximum amount of designations (target groups).

DESIGNATE:SetMaximumDistanceAirDesignation(MaximumDistanceAirDesignation)

Set the maximum air designation distance.

DESIGNATE:SetMaximumDistanceDesignations(MaximumDistanceDesignations)

Set the overall maximum distance when designations can be accepted.

DESIGNATE:SetMaximumDistanceGroundDesignation(MaximumDistanceGroundDesignation)

Set the maximum ground designation distance.

DESIGNATE:SetMaximumMarkings(MaximumMarkings)

Set the maximum amount of markings FACs will do, per designated target group.

DESIGNATE:SetMenu(AttackGroup)

Sets the Designate Menu for one attack groups.

DESIGNATE:SetMission(Mission)

Set the MISSION object for which designate will function.

DESIGNATE:SetThreatLevelPrioritization(Prioritize)

Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

DESIGNATE:Smoke()

Smoke Trigger for DESIGNATE

DESIGNATE:Status()

Status Trigger for DESIGNATE

DESIGNATE.ThreatLevelPrioritization

DESIGNATE:__Detect(Delay)

Detect Asynchronous Trigger for DESIGNATE

DESIGNATE:__Illuminate(Delay)

Illuminate Asynchronous Trigger for DESIGNATE

DESIGNATE:__LaseOff(Delay)

LaseOff Asynchronous Trigger for DESIGNATE

DESIGNATE:__LaseOn(Delay)

LaseOn Asynchronous Trigger for DESIGNATE

DESIGNATE:__Smoke(Delay)

Smoke Asynchronous Trigger for DESIGNATE

DESIGNATE:__Status(Delay)

Status Asynchronous Trigger for DESIGNATE

DESIGNATE:onafterDetect()

DESIGNATE:onafterDoneIlluminating(From, Event, To, Index)

DoneIlluminating

DESIGNATE:onafterDoneSmoking(From, Event, To, Index)

DoneSmoking

DESIGNATE:onafterIlluminate(From, Event, To, Index)

Illuminating

DESIGNATE:onafterLaseOff(From, Event, To, Index)

DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration, LaserCode)

DESIGNATE:onafterLasing(From, Event, To, Index, Duration, LaserCodeRequested)

DESIGNATE:onafterSmoke(From, Event, To, Index, Color)

Fields and Methods inherited from FSM_PROCESS Description

DESIGNATE:Assign(Task, ProcessUnit)

Assign the process to a Wrapper.Unit and activate the process.

DESIGNATE:Copy(Controllable, Task)

Creates a new FSM_PROCESS object based on this FSM_PROCESS.

DESIGNATE:GetCommandCenter()

Gets the mission of the process.

DESIGNATE:GetMission()

Gets the mission of the process.

DESIGNATE:GetTask()

Gets the task of the process.

DESIGNATE:Init(FsmProcess)

DESIGNATE:Message(Message)

Send a message of the Tasking.Task to the Group of the Unit.

DESIGNATE:New(Controllable, Task)

Creates a new FSM_PROCESS object.

DESIGNATE:Remove()

Removes an FSM_PROCESS object.

DESIGNATE:SetTask(Task)

Sets the task of the process.

DESIGNATE.Task

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

DESIGNATE:onenterFailed(ProcessUnit, Task, From, Event, To)

DESIGNATE:onstatechange(ProcessUnit, Event, From, To, Task)

StateMachine callback function for a FSM_PROCESS

Fields and Methods inherited from FSM_CONTROLLABLE Description

DESIGNATE.Controllable

DESIGNATE:GetControllable()

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

DESIGNATE:New(FSMT, Controllable)

Creates a new FSM_CONTROLLABLE object.

DESIGNATE:OnAfterStop(Controllable, From, Event, To)

OnAfter Transition Handler for Event Stop.

DESIGNATE:OnBeforeStop(Controllable, From, Event, To)

OnBefore Transition Handler for Event Stop.

DESIGNATE:OnEnterStopped(Controllable, From, Event, To)

OnEnter Transition Handler for State Stopped.

DESIGNATE:OnLeaveStopped(Controllable, From, Event, To)

OnLeave Transition Handler for State Stopped.

DESIGNATE:SetControllable(FSMControllable)

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

DESIGNATE:Stop()

Synchronous Event Trigger for Event Stop.

DESIGNATE:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

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

Fields and Methods inherited from FSM Description

DESIGNATE:AddEndState(State)

Adds an End state.

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

DESIGNATE:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

DESIGNATE:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

DESIGNATE.CallScheduler

Call scheduler.

DESIGNATE.ClassName

Name of the class.

DESIGNATE.Events

DESIGNATE:GetCurrentState()

Get current state.

DESIGNATE:GetEndStates()

Returns the End states.

DESIGNATE:GetProcess(From, Event)

DESIGNATE:GetProcesses()

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

DESIGNATE:GetScores()

Returns a table with the scores defined.

DESIGNATE:GetStartState()

Returns the start state of the FSM.

DESIGNATE:GetState()

Get current state.

DESIGNATE:GetSubs()

Returns a table with the Subs defined.

DESIGNATE:GetTransitions()

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

DESIGNATE:Is(State)

Check if FSM is in state.

DESIGNATE:LoadCallBacks(CallBackTable)

Load call backs.

DESIGNATE:New()

Creates a new FSM object.

DESIGNATE.Scores

Scores.

DESIGNATE:SetProcess(From, Event, Fsm)

DESIGNATE:SetStartState(State)

Sets the start state of the FSM.

DESIGNATE._EndStates

DESIGNATE._EventSchedules

DESIGNATE._Processes

DESIGNATE._Scores

DESIGNATE._StartState

DESIGNATE._Transitions

DESIGNATE:_add_to_map(Map, Event)

Add to map.

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

Call handler.

DESIGNATE:_create_transition(EventName)

Create transition.

DESIGNATE:_delayed_transition(EventName)

Delayed transition.

DESIGNATE:_eventmap(Events, EventStructure)

Event map.

DESIGNATE:_gosub(ParentFrom, ParentEvent)

Go sub.

DESIGNATE:_handler(EventName, ...)

Handler.

DESIGNATE:_isendstate(Current)

Is end state.

DESIGNATE:_submap(subs, sub, name)

Sub maps.

DESIGNATE:can(e)

Check if can do an event.

DESIGNATE:cannot(e)

Check if cannot do an event.

DESIGNATE.current

Current state name.

DESIGNATE.endstates

DESIGNATE:is(State, state)

Check if FSM is in state.

DESIGNATE.options

Options.

DESIGNATE.subs

Subs.

Fields and Methods inherited from BASE Description

DESIGNATE.ClassID

The ID number of the class.

DESIGNATE.ClassName

The name of the class.

DESIGNATE.ClassNameAndID

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

DESIGNATE:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

DESIGNATE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

DESIGNATE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

DESIGNATE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

DESIGNATE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

DESIGNATE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

DESIGNATE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

DESIGNATE:E(Arguments)

Log an exception which will be traced always.

DESIGNATE:EventDispatcher()

Returns the event dispatcher

DESIGNATE:EventRemoveAll()

Remove all subscribed events

DESIGNATE:F(Arguments)

Trace a function call.

DESIGNATE:F2(Arguments)

Trace a function call level 2.

DESIGNATE:F3(Arguments)

Trace a function call level 3.

DESIGNATE:GetClassID()

Get the ClassID of the class instance.

DESIGNATE:GetClassName()

Get the ClassName of the class instance.

DESIGNATE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

DESIGNATE:GetEventPriority()

Get the Class Core.Event processing Priority.

DESIGNATE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

DESIGNATE:GetState(Object, Key)

Get a Value given a Key from the Object.

DESIGNATE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

DESIGNATE:I(Arguments)

Log an information which will be traced always.

DESIGNATE:Inherit(Child, Parent)

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

DESIGNATE:IsInstanceOf(ClassName)

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

DESIGNATE:IsTrace()

Enquires if tracing is on (for the class).

DESIGNATE:New()

BASE constructor.

DESIGNATE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

DESIGNATE:OnEventBDA(EventData)

BDA.

DESIGNATE:OnEventBaseCaptured(EventData)

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

DESIGNATE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

DESIGNATE:OnEventCrash(EventData)

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

DESIGNATE:OnEventDead(EventData)

Occurs when an object is dead.

DESIGNATE:OnEventDetailedFailure(EventData)

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

DESIGNATE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

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

DESIGNATE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

DESIGNATE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

DESIGNATE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

DESIGNATE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

DESIGNATE:OnEventKill(EventData)

Occurs on the death of a unit.

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

DESIGNATE:OnEventLandingAfterEjection(EventData)

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

DESIGNATE:OnEventLandingQualityMark(EventData)

Landing quality mark.

DESIGNATE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

DESIGNATE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

DESIGNATE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

DESIGNATE:OnEventMissionEnd(EventData)

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

DESIGNATE:OnEventMissionStart(EventData)

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

DESIGNATE:OnEventParatrooperLanding(EventData)

Weapon add.

DESIGNATE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

DESIGNATE:OnEventPlayerEnterAircraft(EventData)

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

DESIGNATE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

DESIGNATE:OnEventPlayerLeaveUnit(EventData)

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

DESIGNATE:OnEventRefueling(EventData)

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

DESIGNATE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

DESIGNATE:OnEventScore(EventData)

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

DESIGNATE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

DESIGNATE:OnEventShootingStart(EventData)

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

DESIGNATE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

DESIGNATE:OnEventTakeoff(EventData)

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

DESIGNATE:OnEventTriggerZone(EventData)

Trigger zone.

DESIGNATE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

DESIGNATE:ScheduleStop(SchedulerID)

Stops the Schedule.

DESIGNATE.Scheduler

DESIGNATE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

DESIGNATE:SetState(Object, Key, Value)

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

DESIGNATE:T(Arguments)

Trace a function logic level 1.

DESIGNATE:T2(Arguments)

Trace a function logic level 2.

DESIGNATE:T3(Arguments)

Trace a function logic level 3.

DESIGNATE:TraceAll(TraceAll)

Trace all methods in MOOSE

DESIGNATE:TraceClass(Class)

Set tracing for a class

DESIGNATE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

DESIGNATE:TraceLevel(Level)

Set trace level

DESIGNATE:TraceOff()

Set trace off.

DESIGNATE:TraceOn()

Set trace on.

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

DESIGNATE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

DESIGNATE._

DESIGNATE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

DESIGNATE:_Serialize(Arguments)

(Internal) Serialize arguments

DESIGNATE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

DESIGNATE.__

DESIGNATE:onEvent(event)

The main event handling function...

Field(s)

#table DESIGNATE.MenuLaserCodes

This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

Function(s)

Add a specific lase code to the designate lase menu to lase targets with a specific laser code.

The MenuText will appear in the lase menu.

Defined in:

DESIGNATE

Parameters:

#number LaserCode

The specific laser code to be added to the lase menu.

#string MenuText

The text to be shown to the player. If you specify a %d in the MenuText, the %d will be replaced with the LaserCode specified.

Return value:

Usage:

  RecceDesignation:AddMenuLaserCode( 1113, "Lase with %d for Su-25T" )
  RecceDesignation:AddMenuLaserCode( 1680, "Lase with %d for A-10A" )

Coordinates the Auto Lase.

Defined in:

DESIGNATE

Return value:

Adapt the designation scope according the detected items.

Defined in:

DESIGNATE

Return value:

Detect Trigger for DESIGNATE

Defined in:

DESIGNATE

Generate an array of possible laser codes.

Each new lase will select a code from this table. The entered value can range from 1111 - 1788, -- but the first digit of the series must be a 1 or 2 -- and the last three digits must be between 1 and 8. The range used to be bugged so its not 1 - 8 but 0 - 7. function below will use the range 1-7 just in case

Defined in:

DESIGNATE

Return value:

Illuminate Trigger for DESIGNATE

Defined in:

DESIGNATE

LaseOff Trigger for DESIGNATE

Defined in:

DESIGNATE

LaseOn Trigger for DESIGNATE

Defined in:

DESIGNATE

Defined in:

DESIGNATE

Parameter:

AutoLase

Defined in:

DESIGNATE

Parameters:

AttackGroup

Flash

Defined in:

DESIGNATE

Parameter:

Index

Defined in:

DESIGNATE

Parameter:

Index

Defined in:

DESIGNATE

Parameters:

Index

Duration

LaserCode

Defined in:

DESIGNATE

Parameters:

Index

Duration

Defined in:

DESIGNATE

Parameters:

Index

Duration

Defined in:

DESIGNATE

Parameters:

Index

Color

Defined in:

DESIGNATE

Parameter:

AttackGroup

DESIGNATE Constructor.

This class is an abstract class and should not be instantiated.

Defined in:

DESIGNATE

Parameters:

Core.Set#SET_GROUP AttackSet

The Attack collection of GROUP objects to designate and report for.

(Optional) The Mission where the menu needs to be attached.

Return value:

Detect Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Illuminate Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

LaseOff Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

LaseOn Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Smoke Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Status Handler OnAfter for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Detect Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

Illuminate Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

LaseOff Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

LaseOn Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

Smoke Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

Status Handler OnBefore for DESIGNATE

Defined in:

DESIGNATE

Parameters:

#string From

#string Event

#string To

Return value:

#boolean:

Removes a specific lase code from the designate lase menu.

Defined in:

DESIGNATE

Parameter:

#number LaserCode

The specific laser code that was set to be added to the lase menu.

Return value:

Usage:

  RecceDesignation:RemoveMenuLaserCode( 1113 )
  

Sends the status to the Attack Groups.

Defined in:

DESIGNATE

Parameters:

Wrapper.Group#GROUP AttackGroup

#number Duration

The time in seconds the report should be visible.

MenuAttackGroup

Return value:

Set auto lase.

Auto lase will start lasing targets immediately when these are in range.

Defined in:

DESIGNATE

Parameters:

#boolean AutoLase

(optional) true sets autolase on, false off. Default is off.

#boolean Message

(optional) true is send message, false or nil won't send a message. Default is no message sent.

Return value:

Sets the Designate Menu for all the attack groups.

Defined in:

DESIGNATE

Return value:

Set the name of the designation.

The name will appear in the menu. This method can be used to control different designations for different plane types.

Defined in:

DESIGNATE

Parameter:

#string DesignateName

Return value:

Set the flashing of the new detection messages.

Defined in:

DESIGNATE

Parameter:

#boolean FlashDetectionMessage

true: The detection message will be flashed every time a new detection was done; false: no messages will be displayed.

Return value:

Usage:


-- Enable the message flashing...
Designate:SetFlashDetectionMessages( true )

-- Disable the message flashing...
Designate:SetFlashDetectionMessages()

-- Disable the message flashing...
Designate:SetFlashDetectionMessages( false )

Set the flashing of the status menu for all AttackGroups.

Defined in:

DESIGNATE

Parameter:

#boolean FlashMenu

true: the status menu will be flashed every detection run; false: no flashing of the menu.

Return value:

Usage:


-- Enable the designate status message flashing...
Designate:SetFlashStatusMenu( true )

-- Disable the designate statusmessage flashing...
Designate:SetFlashStatusMenu()

-- Disable the designate status message flashing...
Designate:SetFlashStatusMenu( false )

Set the lase duration for designations.

Defined in:

DESIGNATE

Parameter:

#number LaseDuration

The time in seconds a lase will continue to hold on target. The default is 120 seconds.

Return value:

Set an array of possible laser codes.

Each new lase will select a code from this table.

Defined in:

DESIGNATE

Parameter:

#list<#number> LaserCodes

Return value:

Set the maximum amount of designations (target groups).

This will put a limit on the amount of designations in scope. Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected.

Defined in:

DESIGNATE

Parameter:

#number MaximumDesignations

Return value:

Set the maximum air designation distance.

Defined in:

DESIGNATE

Parameter:

#number MaximumDistanceAirDesignation

Maximum air designation distance in meters.

Return value:

Set the overall maximum distance when designations can be accepted.

Defined in:

DESIGNATE

Parameter:

#number MaximumDistanceDesignations

Maximum distance in meters to accept designations.

Return value:

Set the maximum ground designation distance.

Defined in:

DESIGNATE

Parameter:

#number MaximumDistanceGroundDesignation

Maximum ground designation distance in meters.

Return value:

Set the maximum amount of markings FACs will do, per designated target group.

This will limit the number of parallelly marked units of a target group.

Defined in:

DESIGNATE

Parameter:

#number MaximumMarkings

Maximum markings FACs will do, per designated target group.

Return value:

Sets the Designate Menu for one attack groups.

Defined in:

DESIGNATE

Parameter:

AttackGroup

Return value:

Set the MISSION object for which designate will function.

When a MISSION object is assigned, the menu for the designation will be located at the Mission Menu.

Defined in:

DESIGNATE

Parameter:

The MISSION object.

Return value:

Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

Defined in:

DESIGNATE

Parameter:

#boolean Prioritize

Return value:

Smoke Trigger for DESIGNATE

Defined in:

DESIGNATE

Status Trigger for DESIGNATE

Defined in:

DESIGNATE

Detect Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

Illuminate Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

LaseOff Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

LaseOn Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

Smoke Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

Status Asynchronous Trigger for DESIGNATE

Defined in:

DESIGNATE

Parameter:

#number Delay

Defined in:

DESIGNATE

Return value:

DoneIlluminating

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Return value:

DoneSmoking

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Return value:

Illuminating

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Return value:

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Return value:

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Duration

LaserCode

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Duration

LaserCodeRequested

Return value:

Defined in:

DESIGNATE

Parameters:

From

Event

To

Index

Color

Return value:

Field(s)

#table DESIGNATE.MenuLaserCodes

This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

Function(s)

Assign the process to a Wrapper.Unit and activate the process.

Defined in:

Parameters:

Wrapper.Unit#UNIT ProcessUnit

Return value:

self

Creates a new FSM_PROCESS object based on this FSM_PROCESS.

Defined in:

Parameters:

Controllable

Task

Return value:

Gets the mission of the process.

Gets the mission of the process.

Defined in:

Return value:

Gets the task of the process.

Defined in:

Return value:

Defined in:

Parameter:

FsmProcess

Send a message of the Tasking.Task to the Group of the Unit.

Defined in:

Parameter:

Message

Creates a new FSM_PROCESS object.

Defined in:

Parameters:

Controllable

Task

Return value:

Removes an FSM_PROCESS object.

Defined in:

Return value:

Sets the task of the process.

Defined in:

Parameter:

Return value:

Defined in:

Parameters:

step

trigger

params

EventName

Defined in:

Parameters:

ProcessUnit

Task

From

Event

To

StateMachine callback function for a FSM_PROCESS

Defined in:

Parameters:

#string Event

#string From

#string To

Task

Field(s)

#table DESIGNATE.MenuLaserCodes

This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

Function(s)

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Creates a new FSM_CONTROLLABLE object.

Defined in:

Parameters:

#table FSMT

Finite State Machine Table

(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Return value:

OnAfter Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnBefore Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnEnter Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnLeave Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Defined in:

Parameter:

Return value:

Synchronous Event Trigger for Event Stop.

Asynchronous Event Trigger for Event Stop.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Defined in:

Parameters:

step

trigger

params

EventName

Field(s)

#table DESIGNATE.MenuLaserCodes

This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

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)

#table DESIGNATE.MenuLaserCodes

This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

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

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

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