Banner Image

Module Functional.DetectionZones

Functional - Captures the class DETECTION_ZONES.

Global(s)

Global DETECTION_ZONES

(old, to be revised ) Detect units within the battle zone for a list of Core.Zones detecting targets following (a) detection method(s), and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected.

#DETECTION_ZONES DETECTION_ZONES

(old, to be revised ) Detect units within the battle zone for a list of Core.Zones detecting targets following (a) detection method(s), and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected.

The class is group the detected units within zones given a DetectedZoneRange parameter. A set with multiple detected zones will be created as there are groups of units detected.

4.1) Retrieve the Detected Unit Sets and Detected Zones

The methods to manage the DetectedItems[].Set(s) are implemented in Functional.Detection#DECTECTION_BASE and the methods to manage the DetectedItems[].Zone(s) is implemented in Functional.Detection#DETECTION_ZONES.

Retrieve the DetectedItems[].Set with the method Functional.Detection#DETECTION_BASE.GetDetectedSet(). A Core.Set#SET_UNIT object will be returned.

Retrieve the formed Core.Zone#ZONE_UNITs as a result of the grouping the detected units within the DetectionZoneRange, use the method Functional.Detection#DETECTION_BASE.GetDetectionZones(). To understand the amount of zones created, use the method Functional.Detection#DETECTION_BASE.GetDetectionZoneCount(). If you want to obtain a specific zone from the DetectedZones, use the method Functional.Detection#DETECTION_BASE.GetDetectionZone() with a given index.

4.4) Flare or Smoke detected units

Use the methods Functional.Detection#DETECTION_ZONES.FlareDetectedUnits() or Functional.Detection#DETECTION_ZONES.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

4.5) Flare or Smoke or Bound detected zones

Use the methods:

the detected zones when a new detection has taken place.

Type(s)

Fields and Methods inherited from DETECTION_BASE.DetectedItem Description

DETECTION_BASE.DetectedItem.Changed

DETECTION_BASE.DetectedItem.InterceptCoord

Fields and Methods inherited from DETECTION_ZONES Description

DETECTION_ZONES:BoundDetectedZones()

Bound the detected zones

DETECTION_ZONES:CalculateIntercept(DetectedItem)

Calculate the optimal intercept point of the DetectedItem.

DETECTION_ZONES:CountAliveRecce(The)

DETECTION_ZONES.CountryID

DETECTION_ZONES:CreateDetectionItems()

Make a DetectionSet table.

DETECTION_ZONES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a detected item using a given numeric index.

DETECTION_ZONES.DetectedItems

A list of areas containing the set of Wrapper.Units, Core.Zones, the center Wrapper.Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DETECTION_ZONES:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

DETECTION_ZONES.DetectionCoalition

DETECTION_ZONES.DetectionRun

DETECTION_ZONES.DetectionSetZone

DETECTION_ZONES.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

DETECTION_ZONES:FlareDetectedUnits()

Flare the detected units

DETECTION_ZONES:FlareDetectedZones()

Flare the detected zones

DETECTION_ZONES:ForEachAliveRecce(IteratorFunction, ...)

DETECTION_ZONES:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

DETECTION_ZONES:New(DetectionSetZone, DetectionCoalition)

DETECTION_ZONES constructor.

DETECTION_ZONES:SmokeDetectedUnits()

Smoke the detected units

DETECTION_ZONES:SmokeDetectedZones()

Smoke the detected zones

DETECTION_ZONES:UpdateDetectedItemDetection(DetectedItem)

Set IsDetected flag for the DetectedItem, which can have more units.

DETECTION_ZONES._BoundDetectedZones

DETECTION_ZONES._FlareDetectedUnits

DETECTION_ZONES._FlareDetectedZones

DETECTION_ZONES._SmokeDetectedUnits

DETECTION_ZONES._SmokeDetectedZones

DETECTION_ZONES:onafterDetection(From, Event, To, Detection, DetectionTimeStamp)

Fields and Methods inherited from DETECTION_BASE Description

DETECTION_ZONES:AcceptChanges(DetectedItem)

Accepts changes from the detected item.

DETECTION_ZONES.AcceptRange

DETECTION_ZONES.AcceptZones

DETECTION_ZONES:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType)

Add a change to the detected zone.

DETECTION_ZONES:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType)

Add a change to the detected zone.

DETECTION_ZONES:AddDetectedItem(ItemPrefix, DetectedItemKey, Set)

Adds a new DetectedItem to the DetectedItems list.

DETECTION_ZONES:AddDetectedItemZone(DetectedItemKey, Set, Zone, ItemPrefix)

Adds a new DetectedItem to the DetectedItems list.

DETECTION_ZONES.AlphaAngleProbability

DETECTION_ZONES:CleanDetectionItem(DetectedItem, DetectedItemID)

Clean the DetectedItem table.

DETECTION_ZONES:CountAliveRecce()

DETECTION_ZONES:CreateDetectionItems()

Make a DetectionSet table.

DETECTION_ZONES:Detect()

Synchronous Event Trigger for Event Detect.

DETECTION_ZONES.DetectDLINK

DETECTION_ZONES.DetectIRST

DETECTION_ZONES.DetectOptical

DETECTION_ZONES.DetectRWR

DETECTION_ZONES.DetectRadar

DETECTION_ZONES.DetectVisual

DETECTION_ZONES:Detected(Units)

Synchronous Event Trigger for Event Detected.

DETECTION_ZONES.DetectedItemCount

DETECTION_ZONES.DetectedItemMax

DETECTION_ZONES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a detected item using a given numeric index.

DETECTION_ZONES.DetectedItems

DETECTION_ZONES.DetectedObjects

The list of detected objects.

DETECTION_ZONES.DetectedObjectsIdentified

Map of the DetectedObjects identified.

DETECTION_ZONES:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

DETECTION_ZONES.DetectionRange

The range till which targets are accepted to be detected.

DETECTION_ZONES.DetectionRun

DETECTION_ZONES.DetectionScheduler

DETECTION_ZONES.DetectionSet

DETECTION_ZONES.DetectionSetGroup

The Core.Set of GROUPs in the Forward Air Controller role.

DETECTION_ZONES.DistanceProbability

DETECTION_ZONES:FilterCategories(FilterCategories)

Filter the detected units based on Unit.Category
The different values of Unit.Category can be:

  • Unit.Category.AIRPLANE
  • Unit.Category.GROUND_UNIT
  • Unit.Category.HELICOPTER
  • Unit.Category.SHIP
  • Unit.Category.STRUCTURE

Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

DETECTION_ZONES:ForEachAliveRecce(IteratorFunction, ...)

DETECTION_ZONES:ForgetDetectedUnit(UnitName)

Forget a Unit from a DetectionItem

DETECTION_ZONES.FriendliesRange

DETECTION_ZONES.FriendlyPrefixes

DETECTION_ZONES:GetDetectedID(Index)

Get a detected ID using a given numeric index.

DETECTION_ZONES:GetDetectedItemByIndex(Index)

Get a detected item using a given numeric index.

DETECTION_ZONES:GetDetectedItemByKey(Key)

Get a detected item using a given Key.

DETECTION_ZONES:GetDetectedItemCoordinate(DetectedItem)

Get the detected item coordinate.

DETECTION_ZONES:GetDetectedItemCoordinates()

Get a list of the detected item coordinates.

DETECTION_ZONES:GetDetectedItemID(DetectedItem)

Get a detected ItemID using a given numeric index.

DETECTION_ZONES:GetDetectedItemSet(DetectedItem)

Get the Core.Set#SET_UNIT of a detection area using a given numeric index.

DETECTION_ZONES:GetDetectedItemThreatLevel(DetectedItem)

Get the detected item coordinate.

DETECTION_ZONES:GetDetectedItemZone(DetectedItem)

Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.

DETECTION_ZONES:GetDetectedItems()

Get the DetectedItems by Key.

DETECTION_ZONES:GetDetectedItemsByIndex()

Get the DetectedItems by Index.

DETECTION_ZONES:GetDetectedItemsCount()

Get the amount of SETs with detected objects.

DETECTION_ZONES:GetDetectedObject(ObjectName)

Gets a detected object with a given name.

DETECTION_ZONES:GetDetectedUnitTypeName(DetectedUnit)

Gets a detected unit type name, taking into account the detection results.

DETECTION_ZONES:GetDetectionSet()

Get the Detection Set.

DETECTION_ZONES:GetFriendliesDistance(DetectedItem)

Returns the distance used to identify friendlies near the detected item ...

DETECTION_ZONES:GetFriendliesNearBy(DetectedItem, Category)

Returns friendly units nearby the FAC units ...

DETECTION_ZONES:GetFriendliesNearIntercept(DetectedItem)

Returns friendly units nearby the intercept point ...

DETECTION_ZONES:GetPlayersNearBy(DetectedItem)

Returns friendly units nearby the FAC units ...

DETECTION_ZONES:IdentifyDetectedObject(DetectedObject)

Identifies a detected object during detection processing.

DETECTION_ZONES:InitDetectDLINK(DetectDLINK)

Detect DLINK.

DETECTION_ZONES:InitDetectIRST(DetectIRST)

Detect IRST.

DETECTION_ZONES:InitDetectOptical(DetectOptical)

Detect Optical.

DETECTION_ZONES:InitDetectRWR(DetectRWR)

Detect RWR.

DETECTION_ZONES:InitDetectRadar(DetectRadar)

Detect Radar.

DETECTION_ZONES:InitDetectVisual(DetectVisual)

Detect Visual.

DETECTION_ZONES.Intercept

DETECTION_ZONES.InterceptDelay

DETECTION_ZONES:IsDetectedItemDetected(DetectedItem)

Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

DETECTION_ZONES:IsDetectedItemLocked(DetectedItem)

Validate if the detected item is locked.

DETECTION_ZONES:IsDetectedObjectIdentified(DetectedObject)

Determines if a detected object has already been identified during detection processing.

DETECTION_ZONES:IsFriendliesNearBy(DetectedItem, Category)

Returns if there are friendlies nearby the FAC units ...

DETECTION_ZONES:IsFriendliesNearIntercept(DetectedItem)

Returns if there are friendlies nearby the intercept ...

DETECTION_ZONES:IsPlayersNearBy(DetectedItem)

Returns if there are friendlies nearby the FAC units ...

DETECTION_ZONES:LockDetectedItem(DetectedItem)

Lock a detected item.

DETECTION_ZONES:LockDetectedItems()

Lock the detected items when created and lock all existing detected items.

DETECTION_ZONES.Locking

DETECTION_ZONES:NearestRecce(DetectedItem)

Find the nearest Recce of the DetectedItem.

DETECTION_ZONES:New(DetectionSet)

DETECTION constructor.

DETECTION_ZONES:OnAfterDetect(From, Event, To)

OnAfter Transition Handler for Event Detect.

DETECTION_ZONES:OnAfterDetected(From, Event, To, Units)

OnAfter Transition Handler for Event Detected.

DETECTION_ZONES:OnAfterDetectedItem(From, Event, To, DetectedItem)

OnAfter Transition Handler for Event DetectedItem.

DETECTION_ZONES:OnAfterStart(From, Event, To)

OnAfter Transition Handler for Event Start.

DETECTION_ZONES:OnAfterStop(From, Event, To)

OnAfter Transition Handler for Event Stop.

DETECTION_ZONES:OnBeforeDetect(From, Event, To)

OnBefore Transition Handler for Event Detect.

DETECTION_ZONES:OnBeforeDetected(From, Event, To)

OnBefore Transition Handler for Event Detected.

DETECTION_ZONES:OnBeforeStart(From, Event, To)

OnBefore Transition Handler for Event Start.

DETECTION_ZONES:OnBeforeStop(From, Event, To)

OnBefore Transition Handler for Event Stop.

DETECTION_ZONES:OnEnterDetecting(From, Event, To)

OnEnter Transition Handler for State Detecting.

DETECTION_ZONES:OnEnterStopped(From, Event, To)

OnEnter Transition Handler for State Stopped.

DETECTION_ZONES:OnLeaveDetecting(From, Event, To)

OnLeave Transition Handler for State Detecting.

DETECTION_ZONES:OnLeaveStopped(From, Event, To)

OnLeave Transition Handler for State Stopped.

DETECTION_ZONES.RadarBlur

DETECTION_ZONES.RadarBlurClosing

DETECTION_ZONES.RadarBlurClosingSquare

DETECTION_ZONES.RadarBlurMinHeight

DETECTION_ZONES.RadarBlurThresBlur

DETECTION_ZONES.RadarBlurThresHeight

DETECTION_ZONES.RefreshTimeInterval

DETECTION_ZONES.RejectZones

DETECTION_ZONES:RemoveDetectedItem(DetectedItemKey)

Removes an existing DetectedItem from the DetectedItems list.

DETECTION_ZONES:ReportFriendliesNearBy(TargetData)

Background worker function to determine if there are friendlies nearby ...

DETECTION_ZONES:Schedule(DelayTime, RepeatInterval)

Schedule the DETECTION construction.

DETECTION_ZONES.ScheduleDelayTime

DETECTION_ZONES.ScheduleRepeatInterval

DETECTION_ZONES:SetAcceptRange(AcceptRange)

Accept detections if within a range in meters.

DETECTION_ZONES:SetAcceptZones(AcceptZones)

Accept detections if within the specified zone(s).

DETECTION_ZONES:SetAlphaAngleProbability(AlphaAngleProbability)

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

DETECTION_ZONES:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit)

Set the detected item coordinate.

DETECTION_ZONES:SetDetectedItemThreatLevel(The, DetectedItem)

Set the detected item threat level.

DETECTION_ZONES:SetDistanceProbability(DistanceProbability)

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

DETECTION_ZONES:SetFriendliesRange(FriendliesRange)

Set the radius in meters to validate if friendlies are nearby.

DETECTION_ZONES:SetFriendlyPrefixes(FriendlyPrefixes)

This will allow during friendly search any recce or detection unit to be also considered as a friendly.

DETECTION_ZONES:SetIntercept(Intercept, InterceptDelay)

Set the parameters to calculate to optimal intercept point.

DETECTION_ZONES:SetRadarBlur(minheight, thresheight, thresblur, closing)

Method to make the radar detection less accurate, e.g.

DETECTION_ZONES:SetRefreshTimeInterval(RefreshTimeInterval)

Set the detection interval time in seconds.

DETECTION_ZONES:SetRejectZones(RejectZones)

Reject detections if within the specified zone(s).

DETECTION_ZONES:SetZoneProbability(ZoneArray)

Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

DETECTION_ZONES:Start()

Synchronous Event Trigger for Event Start.

DETECTION_ZONES:Stop()

Synchronous Event Trigger for Event Stop.

DETECTION_ZONES:UnIdentifyAllDetectedObjects()

UnIdentify all detected objects during detection processing.

DETECTION_ZONES:UnIdentifyDetectedObject(DetectedObject)

UnIdentify a detected object during detection processing.

DETECTION_ZONES:UnlockDetectedItem(DetectedItem)

Unlock a detected item.

DETECTION_ZONES:UnlockDetectedItems()

Unlock the detected items when created and unlock all existing detected items.

DETECTION_ZONES:UpdateDetectedItemDetection(DetectedItem)

Set IsDetected flag for the DetectedItem, which can have more units.

DETECTION_ZONES.ZoneProbability

DETECTION_ZONES:__Detect(Delay)

Asynchronous Event Trigger for Event Detect.

DETECTION_ZONES:__Detected(Delay, Units)

Asynchronous Event Trigger for Event Detected.

DETECTION_ZONES:__Start(Delay)

Asynchronous Event Trigger for Event Start.

DETECTION_ZONES:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

DETECTION_ZONES:onafterDetect(From, Event, To)

DETECTION_ZONES:onafterDetection(From, Event, To, Detection, DetectionTimeStamp)

DETECTION_ZONES:onafterStart(From, Event, To)

Fields and Methods inherited from FSM Description

DETECTION_ZONES:AddEndState(State)

Adds an End state.

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

DETECTION_ZONES:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

DETECTION_ZONES:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

DETECTION_ZONES.CallScheduler

Call scheduler.

DETECTION_ZONES.ClassName

Name of the class.

DETECTION_ZONES.Events

DETECTION_ZONES:GetCurrentState()

Get current state.

DETECTION_ZONES:GetEndStates()

Returns the End states.

DETECTION_ZONES:GetProcess(From, Event)

DETECTION_ZONES:GetProcesses()

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

DETECTION_ZONES:GetScores()

Returns a table with the scores defined.

DETECTION_ZONES:GetStartState()

Returns the start state of the FSM.

DETECTION_ZONES:GetState()

Get current state.

DETECTION_ZONES:GetSubs()

Returns a table with the Subs defined.

DETECTION_ZONES:GetTransitions()

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

DETECTION_ZONES:Is(State)

Check if FSM is in state.

DETECTION_ZONES:LoadCallBacks(CallBackTable)

Load call backs.

DETECTION_ZONES:New()

Creates a new FSM object.

DETECTION_ZONES.Scores

Scores.

DETECTION_ZONES:SetProcess(From, Event, Fsm)

DETECTION_ZONES:SetStartState(State)

Sets the start state of the FSM.

DETECTION_ZONES._EndStates

DETECTION_ZONES._EventSchedules

DETECTION_ZONES._Processes

DETECTION_ZONES._Scores

DETECTION_ZONES._StartState

DETECTION_ZONES._Transitions

DETECTION_ZONES:_add_to_map(Map, Event)

Add to map.

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

Call handler.

DETECTION_ZONES:_create_transition(EventName)

Create transition.

DETECTION_ZONES:_delayed_transition(EventName)

Delayed transition.

DETECTION_ZONES:_eventmap(Events, EventStructure)

Event map.

DETECTION_ZONES:_gosub(ParentFrom, ParentEvent)

Go sub.

DETECTION_ZONES:_handler(EventName, ...)

Handler.

DETECTION_ZONES:_isendstate(Current)

Is end state.

DETECTION_ZONES:_submap(subs, sub, name)

Sub maps.

DETECTION_ZONES:can(e)

Check if can do an event.

DETECTION_ZONES:cannot(e)

Check if cannot do an event.

DETECTION_ZONES.current

Current state name.

DETECTION_ZONES.endstates

DETECTION_ZONES:is(State, state)

Check if FSM is in state.

DETECTION_ZONES.options

Options.

DETECTION_ZONES.subs

Subs.

Fields and Methods inherited from BASE Description

DETECTION_ZONES.ClassID

The ID number of the class.

DETECTION_ZONES.ClassName

The name of the class.

DETECTION_ZONES.ClassNameAndID

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

DETECTION_ZONES:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

DETECTION_ZONES:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

DETECTION_ZONES:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

DETECTION_ZONES:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

DETECTION_ZONES:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

DETECTION_ZONES:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

DETECTION_ZONES:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

DETECTION_ZONES:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

DETECTION_ZONES:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

DETECTION_ZONES:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

DETECTION_ZONES:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

DETECTION_ZONES:E(Arguments)

Log an exception which will be traced always.

DETECTION_ZONES:EventDispatcher()

Returns the event dispatcher

DETECTION_ZONES:EventRemoveAll()

Remove all subscribed events

DETECTION_ZONES:F(Arguments)

Trace a function call.

DETECTION_ZONES:F2(Arguments)

Trace a function call level 2.

DETECTION_ZONES:F3(Arguments)

Trace a function call level 3.

DETECTION_ZONES:GetClassID()

Get the ClassID of the class instance.

DETECTION_ZONES:GetClassName()

Get the ClassName of the class instance.

DETECTION_ZONES:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

DETECTION_ZONES:GetEventPriority()

Get the Class Core.Event processing Priority.

DETECTION_ZONES:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

DETECTION_ZONES:GetState(Object, Key)

Get a Value given a Key from the Object.

DETECTION_ZONES:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

DETECTION_ZONES:I(Arguments)

Log an information which will be traced always.

DETECTION_ZONES:Inherit(Child, Parent)

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

DETECTION_ZONES:IsInstanceOf(ClassName)

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

DETECTION_ZONES:IsTrace()

Enquires if tracing is on (for the class).

DETECTION_ZONES:New()

BASE constructor.

DETECTION_ZONES:OnEvent(EventData)

Occurs when an Event for an object is triggered.

DETECTION_ZONES:OnEventBDA(EventData)

BDA.

DETECTION_ZONES:OnEventBaseCaptured(EventData)

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

DETECTION_ZONES:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

DETECTION_ZONES:OnEventCrash(EventData)

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

DETECTION_ZONES:OnEventDead(EventData)

Occurs when an object is dead.

DETECTION_ZONES:OnEventDetailedFailure(EventData)

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

DETECTION_ZONES:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

DETECTION_ZONES:OnEventDynamicCargoLoaded(EventData)

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

DETECTION_ZONES:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

DETECTION_ZONES:OnEventDynamicCargoUnloaded(EventData)

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

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

DETECTION_ZONES:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

DETECTION_ZONES:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

DETECTION_ZONES:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

DETECTION_ZONES:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

DETECTION_ZONES:OnEventKill(EventData)

Occurs on the death of a unit.

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

DETECTION_ZONES:OnEventLandingAfterEjection(EventData)

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

DETECTION_ZONES:OnEventLandingQualityMark(EventData)

Landing quality mark.

DETECTION_ZONES:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

DETECTION_ZONES:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

DETECTION_ZONES:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

DETECTION_ZONES:OnEventMissionEnd(EventData)

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

DETECTION_ZONES:OnEventMissionStart(EventData)

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

DETECTION_ZONES:OnEventNewDynamicCargo(EventData)

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

DETECTION_ZONES:OnEventParatrooperLanding(EventData)

Weapon add.

DETECTION_ZONES:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

DETECTION_ZONES:OnEventPlayerEnterAircraft(EventData)

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

DETECTION_ZONES:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

DETECTION_ZONES:OnEventPlayerLeaveUnit(EventData)

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

DETECTION_ZONES:OnEventRefueling(EventData)

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

DETECTION_ZONES:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

DETECTION_ZONES:OnEventScore(EventData)

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

DETECTION_ZONES:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

DETECTION_ZONES:OnEventShootingStart(EventData)

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

DETECTION_ZONES:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

DETECTION_ZONES:OnEventTakeoff(EventData)

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

DETECTION_ZONES:OnEventTriggerZone(EventData)

Trigger zone.

DETECTION_ZONES:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

DETECTION_ZONES:ScheduleStop(SchedulerID)

Stops the Schedule.

DETECTION_ZONES.Scheduler

DETECTION_ZONES:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

DETECTION_ZONES:SetState(Object, Key, Value)

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

DETECTION_ZONES:T(Arguments)

Trace a function logic level 1.

DETECTION_ZONES:T2(Arguments)

Trace a function logic level 2.

DETECTION_ZONES:T3(Arguments)

Trace a function logic level 3.

DETECTION_ZONES:TraceAll(TraceAll)

Trace all methods in MOOSE

DETECTION_ZONES:TraceClass(Class)

Set tracing for a class

DETECTION_ZONES:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

DETECTION_ZONES:TraceLevel(Level)

Set trace level

DETECTION_ZONES:TraceOff()

Set trace off.

DETECTION_ZONES:TraceOn()

Set trace on.

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

DETECTION_ZONES:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

DETECTION_ZONES._

DETECTION_ZONES:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

DETECTION_ZONES:_Serialize(Arguments)

(Internal) Serialize arguments

DETECTION_ZONES:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

DETECTION_ZONES.__

DETECTION_ZONES:onEvent(event)

The main event handling function...

Field(s)

DETECTION_BASE.DetectedItem.InterceptCoord
local DetectedSpeed = DetectedCoord:GetVelocity()
local DetectedHeading = DetectedCoord:GetHeading()

if self.Intercept then
  local DetectedSet = DetectedItem.Set
  -- todo: speed

  local TranslateDistance = DetectedSpeed * self.InterceptDelay

  local InterceptCoord = DetectedCoord:Translate( TranslateDistance, DetectedHeading )

  DetectedItem.InterceptCoord = InterceptCoord
else
  DetectedItem.InterceptCoord = DetectedCoord
end

Function(s)

Field(s)

#DETECTION_BASE.DetectedItems DETECTION_ZONES.DetectedItems

A list of areas containing the set of Wrapper.Units, Core.Zones, the center Wrapper.Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DCS#Distance DETECTION_ZONES.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

Function(s)

Bound the detected zones

Defined in:

DETECTION_ZONES

Return value:

Calculate the optimal intercept point of the DetectedItem.

Defined in:

DETECTION_ZONES

Parameter:

Defined in:

DETECTION_ZONES

Parameter:

#number The

amount of alive recce.

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Defined in:

DETECTION_ZONES

Return value:

Report summary of a detected item using a given numeric index.

Defined in:

DETECTION_ZONES

Parameters:

The DetectedItem.

Wrapper.Group#GROUP AttackGroup

The group to get the settings for.

(Optional) Message formatting settings to use.

Return value:

The report of the detection items.

Report detailed of a detection result.

Defined in:

DETECTION_ZONES

Parameter:

Wrapper.Group#GROUP AttackGroup

The group to generate the report for.

Return value:

#string:

Flare the detected units

Defined in:

DETECTION_ZONES

Return value:

Flare the detected zones

Defined in:

DETECTION_ZONES

Return value:

Defined in:

DETECTION_ZONES

Parameters:

IteratorFunction

...

Make text documenting the changes of the detected zone.

Defined in:

DETECTION_ZONES

Parameter:

Return value:

#string:

The Changes text

DETECTION_ZONES constructor.

Defined in:

DETECTION_ZONES

Parameters:

Core.Set#SET_ZONE DetectionSetZone

The Core.Set of ZONE_RADIUS.

DCS#Coalition.side DetectionCoalition

The coalition of the detection.

Return value:

Smoke the detected units

Defined in:

DETECTION_ZONES

Return value:

Smoke the detected zones

Defined in:

DETECTION_ZONES

Return value:

Set IsDetected flag for the DetectedItem, which can have more units.

Defined in:

DETECTION_ZONES

Parameter:

DetectedItem

Return values:

DetectedItem

#boolean:

true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

Defined in:

DETECTION_ZONES

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Detection

The element on which the detection is based.

#number DetectionTimeStamp

Time stamp of detection event.

Field(s)

#DETECTION_BASE.DetectedItems DETECTION_ZONES.DetectedItems

A list of areas containing the set of Wrapper.Units, Core.Zones, the center Wrapper.Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DCS#Distance DETECTION_ZONES.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

Function(s)

Accepts changes from the detected item.

Defined in:

Parameter:

Return value:

Add a change to the detected zone.

Defined in:

Parameters:

#string ChangeCode

ItemUnitType

Return value:

Add a change to the detected zone.

Defined in:

Parameters:

#string ChangeCode

#string ChangeUnitType

Return value:

Adds a new DetectedItem to the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Defined in:

Parameters:

#string ItemPrefix

Prefix of detected item.

#number DetectedItemKey

The key of the DetectedItem. Default self.DetectedItemMax. Could also be a string in principle.

(optional) The Set of Units to be added.

Return value:

Adds a new DetectedItem to the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Defined in:

Parameters:

DetectedItemKey

The key of the DetectedItem.

(optional) The Set of Units to be added.

(optional) The Zone to be added where the Units are located.

ItemPrefix

Return value:

Clean the DetectedItem table.

Defined in:

Parameters:

DetectedItem

DetectedItemID

Return value:

@param #DETECTION_BASE self @param #number The amount of alive recce.

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Synchronous Event Trigger for Event Detect.

Synchronous Event Trigger for Event Detected.

Defined in:

Parameter:

#table Units

Table of detected units.

Report summary of a detected item using a given numeric index.

Defined in:

Parameters:

The DetectedItem.

Wrapper.Group#GROUP AttackGroup

The group to generate the report for.

Message formatting settings to use.

Return value:

Report detailed of a detection result.

Defined in:

Parameter:

Wrapper.Group#GROUP AttackGroup

The group to generate the report for.

Return value:

#string:

Filter the detected units based on Unit.Category
The different values of Unit.Category can be:

  • Unit.Category.AIRPLANE
  • Unit.Category.GROUND_UNIT
  • Unit.Category.HELICOPTER
  • Unit.Category.SHIP
  • Unit.Category.STRUCTURE

Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

Example to filter a single category (Unit.Category.AIRPLANE).

DetectionObject:FilterCategories( Unit.Category.AIRPLANE ) 

Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.

DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )

Defined in:

Parameter:

#list<DCS#Unit> FilterCategories

The Categories entries

Return value:

@param #DETECTION_BASE self

Defined in:

Parameters:

IteratorFunction

...

Forget a Unit from a DetectionItem

Defined in:

Parameter:

#string UnitName

The UnitName that needs to be forgotten from the DetectionItem Sets.

Return value:

Get a detected ID using a given numeric index.

Defined in:

Parameter:

#number Index

Return value:

#string:

DetectedItemID

Get a detected item using a given numeric index.

Defined in:

Parameter:

#number Index

Return value:

Get a detected item using a given Key.

Defined in:

Parameter:

Key

Return value:

Get the detected item coordinate.

Defined in:

Parameter:

The DetectedItem to set the coordinate at.

Return value:

Get a list of the detected item coordinates.

Defined in:

Return value:

#table:

A table of Core.Point#COORDINATE

Get a detected ItemID using a given numeric index.

Defined in:

Parameter:

The DetectedItem.

Return value:

#string:

DetectedItemID

Get the Core.Set#SET_UNIT of a detection area using a given numeric index.

Defined in:

Parameter:

Return value:

DetectedSet

Get the detected item coordinate.

Defined in:

Parameter:

The DetectedItem.

Return value:

#number:

ThreatLevel

Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.

Defined in:

Parameter:

The DetectedItem.

Return value:

DetectedZone

Get the DetectedItems by Key.

This will return the DetectedItems collection, indexed by the Key, which can be any object that acts as the key of the detection.

Get the DetectedItems by Index.

This will return the DetectedItems collection, indexed by an internal numerical Index.

Get the amount of SETs with detected objects.

Defined in:

Return value:

#number:

The amount of detected items. Note that the amount of detected items can differ with the reality, because detections are not real-time but done in intervals!

Gets a detected object with a given name.

Defined in:

Parameter:

#string ObjectName

Return value:

Gets a detected unit type name, taking into account the detection results.

Defined in:

Parameter:

Wrapper.Unit#UNIT DetectedUnit

Return value:

#string:

The type name

Get the Detection Set.

Defined in:

Return value:

Returns the distance used to identify friendlies near the detected item ...

Defined in:

Parameter:

The detected item.

Return value:

#table:

A table of distances to friendlies.

Returns friendly units nearby the FAC units ...

Defined in:

Parameters:

The category of the unit.

Return value:

#map<#string,Wrapper.Unit#UNIT>:

The map of Friendly UNITs.

Returns friendly units nearby the intercept point ...

Defined in:

Parameter:

The detected item.

Return value:

#map<#string,Wrapper.Unit#UNIT>:

The map of Friendly UNITs.

Returns friendly units nearby the FAC units ...

Defined in:

Parameter:

The detected item.

Return value:

#map<#string,Wrapper.Unit#UNIT>:

The map of Friendly UNITs.

Identifies a detected object during detection processing.

Detect DLINK.

Detect IRST.

Defined in:

Parameter:

#boolean DetectIRST

Return value:

Detect Optical.

Defined in:

Parameter:

#boolean DetectOptical

Return value:

Detect RWR.

Defined in:

Parameter:

#boolean DetectRWR

Return value:

Detect Radar.

Defined in:

Parameter:

#boolean DetectRadar

Return value:

Detect Visual.

Defined in:

Parameter:

#boolean DetectVisual

Return value:

Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

Defined in:

Parameter:

Return value:

#boolean:

true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

Validate if the detected item is locked.

Defined in:

Parameter:

The DetectedItem.

Return value:

#boolean:

Determines if a detected object has already been identified during detection processing.

Defined in:

Parameter:

Return value:

#boolean:

true if already identified.

Returns if there are friendlies nearby the FAC units ...

Defined in:

Parameters:

The category of the unit.

Return value:

#boolean:

true if there are friendlies nearby

Returns if there are friendlies nearby the intercept ...

Defined in:

Parameter:

Return value:

#boolean:

trhe if there are friendlies near the intercept.

Returns if there are friendlies nearby the FAC units ...

Defined in:

Parameter:

Return value:

#boolean:

true if there are friendlies nearby

Lock a detected item.

Defined in:

Parameter:

The DetectedItem.

Return value:

Lock the detected items when created and lock all existing detected items.

Find the nearest Recce of the DetectedItem.

Defined in:

Parameter:

Return value:

The nearest FAC unit

DETECTION constructor.

Defined in:

Parameter:

Core.Set#SET_GROUP DetectionSet

The Core.Set of Wrapper.Groups that is used to detect the units.

Return value:

OnAfter Transition Handler for Event Detect.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Detected.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

#table Units

Table of detected units.

OnAfter Transition Handler for Event DetectedItem.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

#DetectedItem DetectedItem

The DetectedItem data structure.

OnAfter Transition Handler for Event Start.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Stop.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnBefore Transition Handler for Event Detect.

Defined in:

Parameters:

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

OnBefore Transition Handler for Event Detected.

Defined in:

Parameters:

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

OnBefore Transition Handler for Event Start.

Defined in:

Parameters:

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

OnBefore Transition Handler for Event Stop.

Defined in:

Parameters:

#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 Detecting.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnEnter Transition Handler for State Stopped.

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnLeave Transition Handler for State Detecting.

Defined in:

Parameters:

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

OnLeave Transition Handler for State Stopped.

Defined in:

Parameters:

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

Removes an existing DetectedItem from the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Defined in:

Parameter:

DetectedItemKey

The key in the DetectedItems list where the item needs to be removed.

Background worker function to determine if there are friendlies nearby ...

Defined in:

Parameter:

#table TargetData

Schedule the DETECTION construction.

Defined in:

Parameters:

#number DelayTime

The delay in seconds to wait the reporting.

#number RepeatInterval

The repeat interval in seconds for the reporting to happen repeatedly.

Return value:

Accept detections if within a range in meters.

Defined in:

Parameter:

#number AcceptRange

Accept a detection if the unit is within the AcceptRange in meters.

Return value:

Accept detections if within the specified zone(s).

Defined in:

Parameter:

Core.Zone#ZONE_BASE AcceptZones

Can be a list or ZONE_BASE objects, or a single ZONE_BASE object.

Return value:

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.

A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.

For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like: 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%

Defined in:

Parameter:

AlphaAngleProbability

The probability factor.

Return value:

Set the detected item coordinate.

Defined in:

Parameters:

The DetectedItem to set the coordinate at.

The coordinate to set the last know detected position at.

Wrapper.Unit#UNIT DetectedItemUnit

The unit to set the heading and altitude from.

Return value:

Set the detected item threat level.

Defined in:

Parameters:

DetectedItem to calculate the threat level for.

DetectedItem

Return value:

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

Also, the speed of accurate detection plays a role. A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance. For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like: 1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.

Defined in:

Parameter:

DistanceProbability

The probability factor.

Return value:

Set the radius in meters to validate if friendlies are nearby.

Defined in:

Parameter:

#number FriendliesRange

Radius to use when checking if Friendlies are nearby.

Return value:

This will allow during friendly search any recce or detection unit to be also considered as a friendly.

By default, recce aren't considered friendly, because that would mean that a recce would be also an attacking friendly, and this is wrong. However, in a CAP situation, when the CAP is part of an EWR network, the CAP is also an attacker. This, this method allows to register for a detection the CAP unit name prefixes to be considered CAP.

Defined in:

Parameter:

#string FriendlyPrefixes

A string or a list of prefixes.

Return value:

Set the parameters to calculate to optimal intercept point.

Defined in:

Parameters:

#boolean Intercept

Intercept is true if an intercept point is calculated. Intercept is false if it is disabled. The default Intercept is false.

#number InterceptDelay

If Intercept is true, then InterceptDelay is the average time it takes to get airplanes airborne.

Return value:

Method to make the radar detection less accurate, e.g.

for WWII scenarios.

Defined in:

Parameters:

#number minheight

Minimum flight height to be detected, in meters AGL (above ground)

#number thresheight

Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)

#number thresblur

Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)

#number closing

Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.

Return value:

Set the detection interval time in seconds.

Defined in:

Parameter:

#number RefreshTimeInterval

Interval in seconds.

Return value:

Reject detections if within the specified zone(s).

Defined in:

Parameter:

Core.Zone#ZONE_BASE RejectZones

Can be a list or ZONE_BASE objects, or a single ZONE_BASE object.

Return value:

Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission zones that reflect cloudy areas where detected units may not be so easily visually detected.

Defined in:

Parameter:

ZoneArray

Aray of a The ZONE_BASE object and a ZoneProbability pair..

Return value:

Synchronous Event Trigger for Event Start.

Synchronous Event Trigger for Event Stop.

UnIdentify all detected objects during detection processing.

UnIdentify a detected object during detection processing.

Unlock a detected item.

Defined in:

Parameter:

The DetectedItem.

Return value:

Unlock the detected items when created and unlock all existing detected items.

Set IsDetected flag for the DetectedItem, which can have more units.

Defined in:

Parameter:

DetectedItem

Return values:

DetectedItem

#boolean:

true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

Asynchronous Event Trigger for Event Detect.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Detected.

Defined in:

Parameters:

#number Delay

The delay in seconds.

#table Units

Table of detected units.

Asynchronous Event Trigger for Event Start.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Stop.

Defined in:

Parameter:

#number Delay

The delay in seconds.

@param #DETECTION_BASE self @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string.

Defined in:

Parameters:

From

Event

To

Defined in:

Parameters:

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

The Group detecting.

#number DetectionTimeStamp

Time stamp of detection event.

@param #DETECTION_BASE self @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string.

Defined in:

Parameters:

From

Event

To

Field(s)

#DETECTION_BASE.DetectedItems DETECTION_ZONES.DetectedItems

A list of areas containing the set of Wrapper.Units, Core.Zones, the center Wrapper.Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DCS#Distance DETECTION_ZONES.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

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)

#DETECTION_BASE.DetectedItems DETECTION_ZONES.DetectedItems

A list of areas containing the set of Wrapper.Units, Core.Zones, the center Wrapper.Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DCS#Distance DETECTION_ZONES.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

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_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

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 player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

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.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.

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