Module Functional.Detection
Functional - Models the detection of enemy units by FACs or RECCEs and group them according various methods.
Features:
- Detection of targets by recce units.
- Group detected targets per unit, type or area (zone).
- Keep persistency of detected targets, if when detection is lost.
- Provide an indication of detected targets.
- Report detected targets.
- Refresh detection upon specified time intervals.
Missions:
Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnaissance Units). It uses the in-built detection capabilities of DCS World, but adds new functionalities.
Contributions:
- Mechanist : Early concept of DETECTION_AREAS.
Authors:
- FlightControl : Analysis, Design, Programming, Testing
Global(s)
Global DETECTION_AREAS |
Detect units within the battle zone for a list of Wrapper.Groups detecting targets following (a) detection method(s), and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected. |
Detect units within the battle zone for a list of Wrapper.Groups 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) are implemented in Functional.Detection#DETECTION_AREAS.
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.Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Functional.Detection#DETECTION_AREAS.GetDetectionZones(). To understand the amount of zones created, use the method Functional.Detection#DETECTION_AREAS.GetDetectionZoneCount(). If you want to obtain a specific zone from the DetectedZones, use the method Functional.Detection#DETECTION_AREAS.GetDetectionZoneByID() with a given index.
## 4.4) Flare or Smoke detected units
Use the methods Functional.Detection#DETECTION_AREAS.FlareDetectedUnits() or Functional.Detection#DETECTION_AREAS.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:
- Functional.Detection#DETECTION_AREAS.FlareDetectedZones() to flare in a color
- Functional.Detection#DETECTION_AREAS.SmokeDetectedZones() to smoke in a color
- Functional.Detection#DETECTION_AREAS.SmokeDetectedZones() to bound with a tire with a white flag
the detected zones when a new detection has taken place.
Global DETECTION_BASE |
Defines the core functions to administer detected objects. |
Defines the core functions to administer detected objects.
The DETECTION_BASE class will detect objects within the battle zone for a list of Wrapper.Groups detecting targets following (a) detection method(s).
DETECTION_BASE constructor
Construct a new DETECTION_BASE instance using the DETECTION_BASE.New() method.
Initialization
By default, detection will return detected objects with all the detection sensors available. However, you can ask how the objects were found with specific detection methods. If you use one of the below methods, the detection will work with the detection method specified. You can specify to apply multiple detection methods.
Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:
- DETECTION_BASE.InitDetectVisual(): Detected using Visual.
- DETECTION_BASE.InitDetectOptical(): Detected using Optical.
- DETECTION_BASE.InitDetectRadar(): Detected using Radar.
- DETECTION_BASE.InitDetectIRST(): Detected using IRST.
- DETECTION_BASE.InitDetectRWR(): Detected using RWR.
- DETECTION_BASE.InitDetectDLINK(): Detected using DLINK.
Filter detected units based on category of the unit
Filter the detected units based on Unit.Category using the method DETECTION_BASE.FilterCategories(). 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 } )
Radar Blur - use to make the radar less exact, e.g. for WWII scenarios
- DETECTION_BASE.SetRadarBlur(): Set the radar blur to be used.
DETECTION_ derived classes group the detected units into a DetectedItems[] list
DETECTION_BASE derived classes build a list called DetectedItems[], which is essentially a first later of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains a SET_UNIT object that contains the detected units that belong to that group.
Derived classes will apply different methods to group the detected units. Examples are per area, per quadrant, per distance, per type. See further the derived DETECTION classes on which grouping methods are currently supported.
Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:
- The method Functional.Detection#DETECTION_BASE.GetDetectedItems() retrieves the DetectedItems[] list.
- A DetectedItem from the DetectedItems[] list can be retrieved using the method Functional.Detection#DETECTION_BASE.GetDetectedItem( DetectedItemIndex ). Note that this method returns a DetectedItem element from the list, that contains a Set variable and further information about the DetectedItem that is set by the DETECTION_BASE derived classes, used to group the DetectedItem.
- A DetectedSet from the DetectedItems[] list can be retrieved using the method Functional.Detection#DETECTION_BASE.GetDetectedSet( DetectedItemIndex ). This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).
Visual filters to fine-tune the probability of the detected objects
By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means. That being said, the DCS World detection algorithm can sometimes be unrealistic. Especially for a visual detection, DCS World is able to report within 1 second a detailed detection of a group of 20 units (including types of the units) that are 10 kilometers away, using only visual capabilities. Additionally, trees and other obstacles are not accounted during the DCS World detection.
Therefore, an additional (optional) filtering has been built into the DETECTION_BASE class, that can be set for visual detected units. For electronic detection, this filtering is not applied, only for visually detected targets.
The following additional filtering can be applied for visual filtering:
- A probability factor per kilometer distance.
- A probability factor based on the alpha angle between the detected object and the unit detecting. A detection from a higher altitude allows for better detection than when on the ground.
- Define a probability factor for "cloudy zones", which are zones where forests or villages are located. In these zones, detection will be much more difficult. The mission designer needs to define these cloudy zones within the mission, and needs to register these zones in the DETECTION_ objects adding a probability factor per zone.
I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters. Only when you experience unrealistic behavior in your missions, these filters could be applied.
Distance visual detection probability
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%.
Note that based on this probability factor, not only the detection but also the type of the unit will be applied!
Use the method Functional.Detection#DETECTION_BASE.SetDistanceProbability() to set the probability factor upon a 10 km distance.
Alpha Angle visual detection probability
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%
Use the method Functional.Detection#DETECTION_BASE.SetAlphaAngleProbability() to set the probability factor if 0°.
Cloudy Zones detection probability
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.
Use the method Functional.Detection#DETECTION_BASE.SetZoneProbability() to set for a defined number of zones, the probability factors.
Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take from the DETECTION_BASE to calculate the presence of the detected unit within each zone. Especially for ZONE_POLYGON, try to limit the amount of nodes of the polygon!
Typically, this kind of filter would be applied for very specific areas where a detection needs to be very realistic for AI not to detect so easily targets within a forrest or village rich area.
Accept / Reject detected units
DETECTION_BASE can accept or reject successful detections based on the location of the detected object, if it is located in range or located inside or outside of specific zones.
Detection acceptance of within range limit
A range can be set that will limit a successful detection for a unit. Use the method Functional.Detection#DETECTION_BASE.SetAcceptRange() to apply a range in meters till where detected units will be accepted.
local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
-- Build a detect object.
local Detection = DETECTION_UNITS:New( SetGroup )
-- This will accept detected units if the range is below 5000 meters.
Detection:SetAcceptRange( 5000 )
-- Start the Detection.
Detection:Start()
Detection acceptance if within zone(s).
Specific ZONE_BASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONE_BASE object(s). Use the method Functional.Detection#DETECTION_BASE.SetAcceptZones() will accept detected units if they are within the specified zones.
local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
-- Search fo the zones where units are to be accepted.
local ZoneAccept1 = ZONE:New( "AcceptZone1" )
local ZoneAccept2 = ZONE:New( "AcceptZone2" )
-- Build a detect object.
local Detection = DETECTION_UNITS:New( SetGroup )
-- This will accept detected units by Detection when the unit is within ZoneAccept1 OR ZoneAccept2.
Detection:SetAcceptZones( { ZoneAccept1, ZoneAccept2 } )
-- Start the Detection.
Detection:Start()
Detection rejection if within zone(s).
Specific ZONE_BASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONE_BASE object(s). Use the method Functional.Detection#DETECTION_BASE.SetRejectZones() will reject detected units if they are within the specified zones. An example of how to use the method is shown below.
local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
-- Search fo the zones where units are to be rejected.
local ZoneReject1 = ZONE:New( "RejectZone1" )
local ZoneReject2 = ZONE:New( "RejectZone2" )
-- Build a detect object.
local Detection = DETECTION_UNITS:New( SetGroup )
-- This will reject detected units by Detection when the unit is within ZoneReject1 OR ZoneReject2.
Detection:SetRejectZones( { ZoneReject1, ZoneReject2 } )
-- Start the Detection.
Detection:Start()
Detection of Friendlies Nearby
Use the method Functional.Detection#DETECTION_BASE.SetFriendliesRange() to set the range what will indicate when friendlies are nearby a DetectedItem. The default range is 6000 meters. For air detections, it is advisory to use about 30.000 meters.
DETECTION_BASE is a Finite State Machine
Various Events and State Transitions can be tailored using DETECTION_BASE.
DETECTION_BASE States
- Detecting: The detection is running.
- Stopped: The detection is stopped.
DETECTION_BASE Events
- Start: Start the detection process.
- Detect: Detect new units.
- Detected: New units have been detected.
- Stop: Stop the detection process.
Global DETECTION_TYPES |
Will detect units within the battle zone. |
Will detect units within the battle zone.
It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. Each DetectedItem will contain a field Set, which contains a Core.Set#SET_UNIT containing ONE Wrapper.Unit#UNIT object reference. Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also.
Global DETECTION_UNITS |
Will detect units within the battle zone. |
Will detect units within the battle zone.
It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a Core.Set#SET_UNIT containing ONE Wrapper.Unit#UNIT object reference. Beware that when the amount of units detected is large, the DetectedItems list will be large also.
Type(s)
Fields and Methods inherited from DETECTION_AREAS | Description |
---|---|
Bound the detected zones |
|
Calculate the optimal intercept point of the DetectedItem. |
|
Make a DetectionSet table. |
|
DETECTION_AREAS:DetectedItemReportMenu(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
DETECTION_AREAS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
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. |
|
Report detailed of a detection result. |
|
The range till which targets are grouped upon the first detected target. |
|
Flare the detected units |
|
Flare the detected zones |
|
Make text documenting the changes of the detected zone. |
|
Retrieve a specific zone by its ID (number) |
|
Retrieve number of detected zones. |
|
Retrieve set of detected zones. |
|
DETECTION_AREAS constructor. |
|
Smoke the detected units |
|
Smoke the detected zones |
|
Fields and Methods inherited from DETECTION_BASE | Description |
---|---|
Accepts changes from the detected item. |
|
DETECTION_AREAS:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) |
Add a change to the detected zone. |
DETECTION_AREAS:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) |
Add a change to the detected zone. |
DETECTION_AREAS:AddDetectedItem(ItemPrefix, DetectedItemKey, Set) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_AREAS:AddDetectedItemZone(DetectedItemKey, Set, Zone, ItemPrefix) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_AREAS:CleanDetectionItem(DetectedItem, DetectedItemID) |
Clean the DetectedItem table. |
Make a DetectionSet table. |
|
Synchronous Event Trigger for Event Detect. |
|
Synchronous Event Trigger for Event Detected. |
|
DETECTION_AREAS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
The list of detected objects. |
|
Map of the DetectedObjects identified. |
|
Report detailed of a detection result. |
|
The range till which targets are accepted to be detected. |
|
The Core.Set of GROUPs in the Forward Air Controller role. |
|
Filter the detected units based on Unit.Category
Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression. |
|
Forget a Unit from a DetectionItem |
|
Get a detected ID using a given numeric index. |
|
Get a detected item using a given numeric index. |
|
Get a detected item using a given Key. |
|
Get the detected item coordinate. |
|
Get a list of the detected item coordinates. |
|
Get a detected ItemID using a given numeric index. |
|
Get the Core.Set#SET_UNIT of a detection area using a given numeric index. |
|
Get the detected item coordinate. |
|
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index. |
|
Get the DetectedItems by Key. |
|
Get the DetectedItems by Index. |
|
Get the amount of SETs with detected objects. |
|
Gets a detected object with a given name. |
|
Gets a detected unit type name, taking into account the detection results. |
|
Get the Detection Set. |
|
Returns the distance used to identify friendlies near the detected item ... |
|
Returns friendly units nearby the FAC units ... |
|
Returns friendly units nearby the intercept point ... |
|
Returns friendly units nearby the FAC units ... |
|
Identifies a detected object during detection processing. |
|
Detect DLINK. |
|
Detect IRST. |
|
Detect Optical. |
|
Detect RWR. |
|
Detect Radar. |
|
Detect Visual. |
|
Checks if there is at least one UNIT detected in the Set of the the DetectedItem. |
|
Validate if the detected item is locked. |
|
Determines if a detected object has already been identified during detection processing. |
|
Returns if there are friendlies nearby the FAC units ... |
|
Returns if there are friendlies nearby the intercept ... |
|
Returns if there are friendlies nearby the FAC units ... |
|
Lock a detected item. |
|
Lock the detected items when created and lock all existing detected items. |
|
Find the nearest Recce of the DetectedItem. |
|
DETECTION constructor. |
|
OnAfter Transition Handler for Event Detect. |
|
OnAfter Transition Handler for Event Detected. |
|
DETECTION_AREAS:OnAfterDetectedItem(From, Event, To, DetectedItem) |
OnAfter Transition Handler for Event DetectedItem. |
OnAfter Transition Handler for Event Start. |
|
OnAfter Transition Handler for Event Stop. |
|
OnBefore Transition Handler for Event Detect. |
|
OnBefore Transition Handler for Event Detected. |
|
OnBefore Transition Handler for Event Start. |
|
OnBefore Transition Handler for Event Stop. |
|
OnEnter Transition Handler for State Detecting. |
|
OnEnter Transition Handler for State Stopped. |
|
OnLeave Transition Handler for State Detecting. |
|
OnLeave Transition Handler for State Stopped. |
|
Removes an existing DetectedItem from the DetectedItems list. |
|
Background worker function to determine if there are friendlies nearby ... |
|
Schedule the DETECTION construction. |
|
Accept detections if within a range in meters. |
|
Accept detections if within the specified zone(s). |
|
DETECTION_AREAS: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_AREAS:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit) |
Set the detected item coordinate. |
DETECTION_AREAS:SetDetectedItemThreatLevel(The, DetectedItem) |
Set the detected item threat level. |
Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. |
|
Set the radius in meters to validate if friendlies are nearby. |
|
This will allow during friendly search any recce or detection unit to be also considered as a friendly. |
|
Set the parameters to calculate to optimal intercept point. |
|
DETECTION_AREAS:SetRadarBlur(minheight, thresheight, thresblur, closing) |
Method to make the radar detection less accurate, e.g. |
Set the detection interval time in seconds. |
|
Reject detections if within the specified zone(s). |
|
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. |
|
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. |
|
Unlock the detected items when created and unlock all existing detected items. |
|
Set IsDetected flag for the DetectedItem, which can have more units. |
|
Asynchronous Event Trigger for Event Detect. |
|
Asynchronous Event Trigger for Event Detected. |
|
Asynchronous Event Trigger for Event Start. |
|
Asynchronous Event Trigger for Event Stop. |
|
DETECTION_AREAS:onafterDetection(From, Event, To, Detection, DetectionTimeStamp) |
|
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
DETECTION_AREAS: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. |
Adds a score for the FSM to be achieved. |
|
DETECTION_AREAS:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
DETECTION_AREAS:_call_handler(step, trigger, params, EventName) |
Call handler. |
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
DETECTION_AREAS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
DETECTION_AREAS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
DETECTION_AREAS:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
DETECTION_AREAS:CreateEventDynamicCargoRemoved(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
DETECTION_AREAS:CreateEventDynamicCargoUnloaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
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. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
DETECTION_AREAS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
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. |
|
UnSubscribe to a DCS event. |
|
DETECTION_AREAS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
DETECTION_AREAS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from DETECTION_BASE | Description |
---|---|
Accepts changes from the detected item. |
|
DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) |
Add a change to the detected zone. |
DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) |
Add a change to the detected zone. |
DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemKey, Set) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_BASE:AddDetectedItemZone(DetectedItemKey, Set, Zone, ItemPrefix) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_BASE:CleanDetectionItem(DetectedItem, DetectedItemID) |
Clean the DetectedItem table. |
Make a DetectionSet table. |
|
Synchronous Event Trigger for Event Detect. |
|
Synchronous Event Trigger for Event Detected. |
|
DETECTION_BASE:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
The list of detected objects. |
|
Map of the DetectedObjects identified. |
|
Report detailed of a detection result. |
|
The range till which targets are accepted to be detected. |
|
The Core.Set of GROUPs in the Forward Air Controller role. |
|
Filter the detected units based on Unit.Category
Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression. |
|
Forget a Unit from a DetectionItem |
|
Get a detected ID using a given numeric index. |
|
Get a detected item using a given numeric index. |
|
Get a detected item using a given Key. |
|
Get the detected item coordinate. |
|
Get a list of the detected item coordinates. |
|
Get a detected ItemID using a given numeric index. |
|
Get the Core.Set#SET_UNIT of a detection area using a given numeric index. |
|
Get the detected item coordinate. |
|
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index. |
|
Get the DetectedItems by Key. |
|
Get the DetectedItems by Index. |
|
Get the amount of SETs with detected objects. |
|
Gets a detected object with a given name. |
|
Gets a detected unit type name, taking into account the detection results. |
|
Get the Detection Set. |
|
Returns the distance used to identify friendlies near the detected item ... |
|
Returns friendly units nearby the FAC units ... |
|
Returns friendly units nearby the intercept point ... |
|
Returns friendly units nearby the FAC units ... |
|
Identifies a detected object during detection processing. |
|
Detect DLINK. |
|
Detect IRST. |
|
Detect Optical. |
|
Detect RWR. |
|
Detect Radar. |
|
Detect Visual. |
|
Checks if there is at least one UNIT detected in the Set of the the DetectedItem. |
|
Validate if the detected item is locked. |
|
Determines if a detected object has already been identified during detection processing. |
|
Returns if there are friendlies nearby the FAC units ... |
|
Returns if there are friendlies nearby the intercept ... |
|
Returns if there are friendlies nearby the FAC units ... |
|
Lock a detected item. |
|
Lock the detected items when created and lock all existing detected items. |
|
Find the nearest Recce of the DetectedItem. |
|
DETECTION constructor. |
|
OnAfter Transition Handler for Event Detect. |
|
OnAfter Transition Handler for Event Detected. |
|
DETECTION_BASE:OnAfterDetectedItem(From, Event, To, DetectedItem) |
OnAfter Transition Handler for Event DetectedItem. |
OnAfter Transition Handler for Event Start. |
|
OnAfter Transition Handler for Event Stop. |
|
OnBefore Transition Handler for Event Detect. |
|
OnBefore Transition Handler for Event Detected. |
|
OnBefore Transition Handler for Event Start. |
|
OnBefore Transition Handler for Event Stop. |
|
OnEnter Transition Handler for State Detecting. |
|
OnEnter Transition Handler for State Stopped. |
|
OnLeave Transition Handler for State Detecting. |
|
OnLeave Transition Handler for State Stopped. |
|
Removes an existing DetectedItem from the DetectedItems list. |
|
Background worker function to determine if there are friendlies nearby ... |
|
Schedule the DETECTION construction. |
|
Accept detections if within a range in meters. |
|
Accept detections if within the specified zone(s). |
|
DETECTION_BASE: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_BASE:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit) |
Set the detected item coordinate. |
DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem) |
Set the detected item threat level. |
Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. |
|
Set the radius in meters to validate if friendlies are nearby. |
|
This will allow during friendly search any recce or detection unit to be also considered as a friendly. |
|
Set the parameters to calculate to optimal intercept point. |
|
DETECTION_BASE:SetRadarBlur(minheight, thresheight, thresblur, closing) |
Method to make the radar detection less accurate, e.g. |
Set the detection interval time in seconds. |
|
Reject detections if within the specified zone(s). |
|
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. |
|
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. |
|
Unlock the detected items when created and unlock all existing detected items. |
|
Set IsDetected flag for the DetectedItem, which can have more units. |
|
Asynchronous Event Trigger for Event Detect. |
|
Asynchronous Event Trigger for Event Detected. |
|
Asynchronous Event Trigger for Event Start. |
|
Asynchronous Event Trigger for Event Stop. |
|
DETECTION_BASE:onafterDetection(From, Event, To, Detection, DetectionTimeStamp) |
|
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
DETECTION_BASE: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. |
Adds a score for the FSM to be achieved. |
|
DETECTION_BASE:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
DETECTION_BASE:_call_handler(step, trigger, params, EventName) |
Call handler. |
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
DETECTION_BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
DETECTION_BASE:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
DETECTION_BASE:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
DETECTION_BASE:CreateEventDynamicCargoUnloaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
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. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
DETECTION_BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
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. |
|
UnSubscribe to a DCS event. |
|
DETECTION_BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
DETECTION_BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from DETECTION_BASE.DetectedItem | Description |
---|---|
Category name of the detected unit. |
|
Documents if the detected area has changed. |
|
A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes). |
|
The last known coordinate of the DetectedItem. |
|
Distance to the detected item. |
|
Distance in meters of the Recce. |
|
Table of distances to friendly units. |
|
Indicates if there are friendlies within the detected area. |
|
The identifier of the detected area. |
|
Detected item key. Could also be a string. |
|
Intercept coordinate. |
|
Indicates if the DetectedItem has been detected or not. |
|
If true, detected object is visible. |
|
ItemPrefix .. "." .. self.DetectedItemMax. |
|
Distance to the detected item is known. |
|
Type of detected item is known. |
|
Last known position of the detected item. |
|
Last time the detected item was seen. |
|
Last recorded 3D velocity vector of the detected item. |
|
Lock detected item. |
|
Name of the detected object. |
|
The nearest FAC near the Area. |
|
Table of nearby players. |
|
The Set of Units in the detected area. |
|
Type name of the detected unit. |
|
The Zone of the detected area. |
Fields and Methods inherited from DETECTION_BASE.DetectedObject | Description |
---|---|
Fields and Methods inherited from DETECTION_TYPES | Description |
---|---|
Create the DetectedItems list from the DetectedObjects table. |
|
DETECTION_TYPES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a DetectedItem using a given numeric index. |
Report detailed of a detection result. |
|
Make text documenting the changes of the detected zone. |
|
DETECTION_TYPES constructor. |
|
Fields and Methods inherited from DETECTION_BASE | Description |
---|---|
Accepts changes from the detected item. |
|
DETECTION_TYPES:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) |
Add a change to the detected zone. |
DETECTION_TYPES:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) |
Add a change to the detected zone. |
DETECTION_TYPES:AddDetectedItem(ItemPrefix, DetectedItemKey, Set) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_TYPES:AddDetectedItemZone(DetectedItemKey, Set, Zone, ItemPrefix) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_TYPES:CleanDetectionItem(DetectedItem, DetectedItemID) |
Clean the DetectedItem table. |
Make a DetectionSet table. |
|
Synchronous Event Trigger for Event Detect. |
|
Synchronous Event Trigger for Event Detected. |
|
DETECTION_TYPES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
The list of detected objects. |
|
Map of the DetectedObjects identified. |
|
Report detailed of a detection result. |
|
The range till which targets are accepted to be detected. |
|
The Core.Set of GROUPs in the Forward Air Controller role. |
|
Filter the detected units based on Unit.Category
Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression. |
|
Forget a Unit from a DetectionItem |
|
Get a detected ID using a given numeric index. |
|
Get a detected item using a given numeric index. |
|
Get a detected item using a given Key. |
|
Get the detected item coordinate. |
|
Get a list of the detected item coordinates. |
|
Get a detected ItemID using a given numeric index. |
|
Get the Core.Set#SET_UNIT of a detection area using a given numeric index. |
|
Get the detected item coordinate. |
|
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index. |
|
Get the DetectedItems by Key. |
|
Get the DetectedItems by Index. |
|
Get the amount of SETs with detected objects. |
|
Gets a detected object with a given name. |
|
Gets a detected unit type name, taking into account the detection results. |
|
Get the Detection Set. |
|
Returns the distance used to identify friendlies near the detected item ... |
|
Returns friendly units nearby the FAC units ... |
|
Returns friendly units nearby the intercept point ... |
|
Returns friendly units nearby the FAC units ... |
|
Identifies a detected object during detection processing. |
|
Detect DLINK. |
|
Detect IRST. |
|
Detect Optical. |
|
Detect RWR. |
|
Detect Radar. |
|
Detect Visual. |
|
Checks if there is at least one UNIT detected in the Set of the the DetectedItem. |
|
Validate if the detected item is locked. |
|
Determines if a detected object has already been identified during detection processing. |
|
Returns if there are friendlies nearby the FAC units ... |
|
Returns if there are friendlies nearby the intercept ... |
|
Returns if there are friendlies nearby the FAC units ... |
|
Lock a detected item. |
|
Lock the detected items when created and lock all existing detected items. |
|
Find the nearest Recce of the DetectedItem. |
|
DETECTION constructor. |
|
OnAfter Transition Handler for Event Detect. |
|
OnAfter Transition Handler for Event Detected. |
|
DETECTION_TYPES:OnAfterDetectedItem(From, Event, To, DetectedItem) |
OnAfter Transition Handler for Event DetectedItem. |
OnAfter Transition Handler for Event Start. |
|
OnAfter Transition Handler for Event Stop. |
|
OnBefore Transition Handler for Event Detect. |
|
OnBefore Transition Handler for Event Detected. |
|
OnBefore Transition Handler for Event Start. |
|
OnBefore Transition Handler for Event Stop. |
|
OnEnter Transition Handler for State Detecting. |
|
OnEnter Transition Handler for State Stopped. |
|
OnLeave Transition Handler for State Detecting. |
|
OnLeave Transition Handler for State Stopped. |
|
Removes an existing DetectedItem from the DetectedItems list. |
|
Background worker function to determine if there are friendlies nearby ... |
|
Schedule the DETECTION construction. |
|
Accept detections if within a range in meters. |
|
Accept detections if within the specified zone(s). |
|
DETECTION_TYPES: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_TYPES:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit) |
Set the detected item coordinate. |
DETECTION_TYPES:SetDetectedItemThreatLevel(The, DetectedItem) |
Set the detected item threat level. |
Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. |
|
Set the radius in meters to validate if friendlies are nearby. |
|
This will allow during friendly search any recce or detection unit to be also considered as a friendly. |
|
Set the parameters to calculate to optimal intercept point. |
|
DETECTION_TYPES:SetRadarBlur(minheight, thresheight, thresblur, closing) |
Method to make the radar detection less accurate, e.g. |
Set the detection interval time in seconds. |
|
Reject detections if within the specified zone(s). |
|
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. |
|
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. |
|
Unlock the detected items when created and unlock all existing detected items. |
|
Set IsDetected flag for the DetectedItem, which can have more units. |
|
Asynchronous Event Trigger for Event Detect. |
|
Asynchronous Event Trigger for Event Detected. |
|
Asynchronous Event Trigger for Event Start. |
|
Asynchronous Event Trigger for Event Stop. |
|
DETECTION_TYPES:onafterDetection(From, Event, To, Detection, DetectionTimeStamp) |
|
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
DETECTION_TYPES: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. |
Adds a score for the FSM to be achieved. |
|
DETECTION_TYPES:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
DETECTION_TYPES:_call_handler(step, trigger, params, EventName) |
Call handler. |
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
DETECTION_TYPES:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
DETECTION_TYPES:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
DETECTION_TYPES:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
DETECTION_TYPES:CreateEventDynamicCargoRemoved(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
DETECTION_TYPES:CreateEventDynamicCargoUnloaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
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. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
DETECTION_TYPES:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
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. |
|
UnSubscribe to a DCS event. |
|
DETECTION_TYPES:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
DETECTION_TYPES:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from DETECTION_UNITS | Description |
---|---|
Create the DetectedItems list from the DetectedObjects table. |
|
DETECTION_UNITS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings, ForceA2GCoordinate) |
Report summary of a DetectedItem using a given numeric index. |
Report detailed of a detection result. |
|
The range till which targets are detected. |
|
Make text documenting the changes of the detected zone. |
|
DETECTION_UNITS constructor. |
|
Fields and Methods inherited from DETECTION_BASE | Description |
---|---|
Accepts changes from the detected item. |
|
DETECTION_UNITS:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) |
Add a change to the detected zone. |
DETECTION_UNITS:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) |
Add a change to the detected zone. |
DETECTION_UNITS:AddDetectedItem(ItemPrefix, DetectedItemKey, Set) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_UNITS:AddDetectedItemZone(DetectedItemKey, Set, Zone, ItemPrefix) |
Adds a new DetectedItem to the DetectedItems list. |
DETECTION_UNITS:CleanDetectionItem(DetectedItem, DetectedItemID) |
Clean the DetectedItem table. |
Make a DetectionSet table. |
|
Synchronous Event Trigger for Event Detect. |
|
Synchronous Event Trigger for Event Detected. |
|
DETECTION_UNITS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
The list of detected objects. |
|
Map of the DetectedObjects identified. |
|
Report detailed of a detection result. |
|
The range till which targets are accepted to be detected. |
|
The Core.Set of GROUPs in the Forward Air Controller role. |
|
Filter the detected units based on Unit.Category
Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression. |
|
Forget a Unit from a DetectionItem |
|
Get a detected ID using a given numeric index. |
|
Get a detected item using a given numeric index. |
|
Get a detected item using a given Key. |
|
Get the detected item coordinate. |
|
Get a list of the detected item coordinates. |
|
Get a detected ItemID using a given numeric index. |
|
Get the Core.Set#SET_UNIT of a detection area using a given numeric index. |
|
Get the detected item coordinate. |
|
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index. |
|
Get the DetectedItems by Key. |
|
Get the DetectedItems by Index. |
|
Get the amount of SETs with detected objects. |
|
Gets a detected object with a given name. |
|
Gets a detected unit type name, taking into account the detection results. |
|
Get the Detection Set. |
|
Returns the distance used to identify friendlies near the detected item ... |
|
Returns friendly units nearby the FAC units ... |
|
Returns friendly units nearby the intercept point ... |
|
Returns friendly units nearby the FAC units ... |
|
Identifies a detected object during detection processing. |
|
Detect DLINK. |
|
Detect IRST. |
|
Detect Optical. |
|
Detect RWR. |
|
Detect Radar. |
|
Detect Visual. |
|
Checks if there is at least one UNIT detected in the Set of the the DetectedItem. |
|
Validate if the detected item is locked. |
|
Determines if a detected object has already been identified during detection processing. |
|
Returns if there are friendlies nearby the FAC units ... |
|
Returns if there are friendlies nearby the intercept ... |
|
Returns if there are friendlies nearby the FAC units ... |
|
Lock a detected item. |
|
Lock the detected items when created and lock all existing detected items. |
|
Find the nearest Recce of the DetectedItem. |
|
DETECTION constructor. |
|
OnAfter Transition Handler for Event Detect. |
|
OnAfter Transition Handler for Event Detected. |
|
DETECTION_UNITS:OnAfterDetectedItem(From, Event, To, DetectedItem) |
OnAfter Transition Handler for Event DetectedItem. |
OnAfter Transition Handler for Event Start. |
|
OnAfter Transition Handler for Event Stop. |
|
OnBefore Transition Handler for Event Detect. |
|
OnBefore Transition Handler for Event Detected. |
|
OnBefore Transition Handler for Event Start. |
|
OnBefore Transition Handler for Event Stop. |
|
OnEnter Transition Handler for State Detecting. |
|
OnEnter Transition Handler for State Stopped. |
|
OnLeave Transition Handler for State Detecting. |
|
OnLeave Transition Handler for State Stopped. |
|
Removes an existing DetectedItem from the DetectedItems list. |
|
Background worker function to determine if there are friendlies nearby ... |
|
Schedule the DETECTION construction. |
|
Accept detections if within a range in meters. |
|
Accept detections if within the specified zone(s). |
|
DETECTION_UNITS: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_UNITS:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit) |
Set the detected item coordinate. |
DETECTION_UNITS:SetDetectedItemThreatLevel(The, DetectedItem) |
Set the detected item threat level. |
Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. |
|
Set the radius in meters to validate if friendlies are nearby. |
|
This will allow during friendly search any recce or detection unit to be also considered as a friendly. |
|
Set the parameters to calculate to optimal intercept point. |
|
DETECTION_UNITS:SetRadarBlur(minheight, thresheight, thresblur, closing) |
Method to make the radar detection less accurate, e.g. |
Set the detection interval time in seconds. |
|
Reject detections if within the specified zone(s). |
|
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. |
|
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. |
|
Unlock the detected items when created and unlock all existing detected items. |
|
Set IsDetected flag for the DetectedItem, which can have more units. |
|
Asynchronous Event Trigger for Event Detect. |
|
Asynchronous Event Trigger for Event Detected. |
|
Asynchronous Event Trigger for Event Start. |
|
Asynchronous Event Trigger for Event Stop. |
|
DETECTION_UNITS:onafterDetection(From, Event, To, Detection, DetectionTimeStamp) |
|
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
DETECTION_UNITS: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. |
Adds a score for the FSM to be achieved. |
|
DETECTION_UNITS:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
DETECTION_UNITS:_call_handler(step, trigger, params, EventName) |
Call handler. |
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
DETECTION_UNITS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
DETECTION_UNITS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
DETECTION_UNITS:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
DETECTION_UNITS:CreateEventDynamicCargoRemoved(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
DETECTION_UNITS:CreateEventDynamicCargoUnloaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
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. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
DETECTION_UNITS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
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. |
|
UnSubscribe to a DCS event. |
|
DETECTION_UNITS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
DETECTION_UNITS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Field(s)
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.
The range till which targets are grouped upon the first detected target.
Function(s)
Bound the detected zones
Calculate the optimal intercept point of the DetectedItem.
Make a DetectionSet table.
This function will be overridden in the derived classes.
Report summary of a detected item using a given numeric index.
Defined in:
DETECTION_AREAS
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to get the settings for.
Core.Settings#SETTINGS Settings
(Optional) Message formatting settings to use.
Return value:
The report of the detection items.
Report summary of a detected item using a given numeric index.
Defined in:
DETECTION_AREAS
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to get the settings for.
Core.Settings#SETTINGS Settings
(Optional) Message formatting settings to use.
Return value:
The report of the detection items.
Report detailed of a detection result.
Defined in:
DETECTION_AREAS
Parameter:
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Return value:
#string:
Flare the detected units
Flare the detected zones
Make text documenting the changes of the detected zone.
Defined in:
DETECTION_AREAS
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#string:
The Changes text
Retrieve a specific zone by its ID (number)
Defined in:
DETECTION_AREAS
Parameter:
#number ID
Return value:
The zone or nil if it does not exist
Retrieve number of detected zones.
Defined in:
DETECTION_AREAS
Return value:
#number:
The number of zones.
Retrieve set of detected zones.
DETECTION_AREAS constructor.
Defined in:
DETECTION_AREAS
Parameters:
Core.Set#SET_GROUP DetectionSetGroup
The Core.Set of GROUPs in the Forward Air Controller role.
#number DetectionZoneRange
The range in meters within which targets are grouped upon the first detected target. Default 5000m.
Return value:
Smoke the detected units
Smoke the detected zones
Field(s)
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.
The range till which targets are grouped upon the first detected target.
Function(s)
Accepts changes from the detected item.
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
ItemUnitType
Return value:
self
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
#string ChangeUnitType
Return value:
self
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.
Core.Zone#ZONE_UNIT Zone
(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.
Defined in:
Make a DetectionSet table.
This function will be overridden in the derived clsses.
Synchronous Event Trigger for Event Detect.
Defined in:
Synchronous Event Trigger for Event Detected.
Report summary of a detected item using a given numeric index.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
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:
self
@param #DETECTION_BASE self
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#string:
DetectedItemID
Get the Core.Set#SET_UNIT of a detection area using a given numeric index.
Get the detected item coordinate.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#number:
ThreatLevel
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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.
Get the Detection Set.
Returns the distance used to identify friendlies near the detected item ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#table:
A table of distances to friendlies.
Returns friendly units nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#map<#string,Wrapper.Unit#UNIT>:
The map of Friendly UNITs.
Identifies a detected object during detection processing.
Detect DLINK.
Defined in:
Parameter:
#boolean DetectDLINK
Return value:
self
Detect IRST.
Defined in:
Parameter:
#boolean DetectIRST
Return value:
self
Detect Optical.
Defined in:
Parameter:
#boolean DetectOptical
Return value:
self
Detect RWR.
Defined in:
Parameter:
#boolean DetectRWR
Return value:
self
Detect Radar.
Defined in:
Parameter:
#boolean DetectRadar
Return value:
self
Detect Visual.
Defined in:
Parameter:
#boolean DetectVisual
Return value:
self
Checks if there is at least one UNIT detected in the Set of the the DetectedItem.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#boolean:
Determines if a detected object has already been identified during detection processing.
Defined in:
Parameter:
#DETECTION_BASE.DetectedObject DetectedObject
Return value:
#boolean:
true if already identified.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
trhe if there are friendlies near the intercept.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
true if there are friendlies nearby
Lock a detected item.
Lock the detected items when created and lock all existing detected items.
Find the nearest Recce of the DetectedItem.
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:
self
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 ...
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:
self
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:
self
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:
self
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:
self
Set the detected item coordinate.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem to set the coordinate at.
Core.Point#COORDINATE Coordinate
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:
self
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:
self
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:
self
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:
self
Set the detection interval time in seconds.
Defined in:
Parameter:
#number RefreshTimeInterval
Interval in seconds.
Return value:
self
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:
self
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:
self
Synchronous Event Trigger for Event Start.
Defined in:
Synchronous Event Trigger for Event Stop.
Defined in:
UnIdentify all detected objects during detection processing.
Defined in:
UnIdentify a detected object during detection processing.
Unlock a detected item.
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.
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.
Asynchronous Event Trigger for Event Stop.
@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:
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
Wrapper.Group#GROUP Detection
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.
Field(s)
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.
The range till which targets are grouped upon the first detected target.
Function(s)
Adds an End 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.
Core.Fsm#FSM_PROCESS Process
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.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
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.
Sets the start state of the FSM.
Add to map.
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.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
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)
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.
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.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
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.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
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.
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()
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:
Core.Event#EVENTS EventID
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.
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).
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
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.
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.
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
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
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.
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.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
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.
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
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.
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.
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.
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
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
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
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.
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.
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.
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.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace level
Set trace off.
Set trace on.
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.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
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.
Field(s)
Map of the DetectedObjects identified.
The range till which targets are accepted to be detected.
The Core.Set of GROUPs in the Forward Air Controller role.
Function(s)
Accepts changes from the detected item.
Add a change to the detected zone.
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
ItemUnitType
Return value:
self
Add a change to the detected zone.
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
#string ChangeUnitType
Return value:
self
Adds a new DetectedItem to the DetectedItems list.
The DetectedItem is a table and contains a SET_UNIT in the field Set.
Defined in:
DETECTION_BASE
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:
DETECTION_BASE
Parameters:
DetectedItemKey
The key of the DetectedItem.
(optional) The Set of Units to be added.
Core.Zone#ZONE_UNIT Zone
(optional) The Zone to be added where the Units are located.
ItemPrefix
Return value:
Clean the DetectedItem table.
@param #DETECTION_BASE self @param #number The amount of alive recce.
Defined in:
DETECTION_BASE
Make a DetectionSet table.
This function will be overridden in the derived clsses.
Synchronous Event Trigger for Event Detected.
Defined in:
DETECTION_BASE
Parameter:
#table Units
Table of detected units.
Report summary of a detected item using a given numeric index.
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
Message formatting settings to use.
Return value:
Report detailed of a detection result.
Defined in:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
#list<DCS#Unit> FilterCategories
The Categories entries
Return value:
self
@param #DETECTION_BASE self
Defined in:
DETECTION_BASE
Parameters:
IteratorFunction
...
Forget a Unit from a DetectionItem
Defined in:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
#number Index
Return value:
#string:
DetectedItemID
Get a detected item using a given numeric index.
Get a detected item using a given Key.
Get the detected item coordinate.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem to set the coordinate at.
Return value:
Get a list of the detected item coordinates.
Defined in:
DETECTION_BASE
Return value:
#table:
A table of Core.Point#COORDINATE
Get a detected ItemID using a given numeric index.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#string:
DetectedItemID
Get the Core.Set#SET_UNIT of a detection area using a given numeric index.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
DetectedSet
Get the detected item coordinate.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#number:
ThreatLevel
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
#string ObjectName
Return value:
Gets a detected unit type name, taking into account the detection results.
Defined in:
DETECTION_BASE
Parameter:
Wrapper.Unit#UNIT DetectedUnit
Return value:
#string:
The type name
Get the Detection Set.
Returns the distance used to identify friendlies near the detected item ...
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#table:
A table of distances to friendlies.
Returns friendly units nearby the FAC units ...
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#map<#string,Wrapper.Unit#UNIT>:
The map of Friendly UNITs.
Returns friendly units nearby the FAC units ...
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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.
Detect Optical.
Detect RWR.
Detect Radar.
Detect Visual.
Checks if there is at least one UNIT detected in the Set of the the DetectedItem.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#boolean:
Determines if a detected object has already been identified during detection processing.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedObject DetectedObject
Return value:
#boolean:
true if already identified.
Returns if there are friendlies nearby the FAC units ...
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
The category of the unit.
Return value:
#boolean:
true if there are friendlies nearby
Returns if there are friendlies nearby the intercept ...
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
trhe if there are friendlies near the intercept.
Returns if there are friendlies nearby the FAC units ...
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
true if there are friendlies nearby
Lock a detected item.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
The nearest FAC unit
DETECTION constructor.
Defined in:
DETECTION_BASE
Parameter:
Core.Set#SET_GROUP DetectionSet
The Core.Set of Wrapper.Groups that is used to detect the units.
Return value:
self
OnAfter Transition Handler for Event Detect.
Defined in:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
#table TargetData
Schedule the DETECTION construction.
Defined in:
DETECTION_BASE
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:
self
Accept detections if within a range in meters.
Defined in:
DETECTION_BASE
Parameter:
#number AcceptRange
Accept a detection if the unit is within the AcceptRange in meters.
Return value:
self
Accept detections if within the specified zone(s).
Defined in:
DETECTION_BASE
Parameter:
Core.Zone#ZONE_BASE AcceptZones
Can be a list or ZONE_BASE objects, or a single ZONE_BASE object.
Return value:
self
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:
DETECTION_BASE
Parameter:
AlphaAngleProbability
The probability factor.
Return value:
self
Set the detected item coordinate.
Defined in:
DETECTION_BASE
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem to set the coordinate at.
Core.Point#COORDINATE Coordinate
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:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
DistanceProbability
The probability factor.
Return value:
self
Set the radius in meters to validate if friendlies are nearby.
Defined in:
DETECTION_BASE
Parameter:
#number FriendliesRange
Radius to use when checking if Friendlies are nearby.
Return value:
self
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:
DETECTION_BASE
Parameter:
#string FriendlyPrefixes
A string or a list of prefixes.
Return value:
Set the parameters to calculate to optimal intercept point.
Defined in:
DETECTION_BASE
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:
self
Method to make the radar detection less accurate, e.g.
for WWII scenarios.
Defined in:
DETECTION_BASE
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:
self
Set the detection interval time in seconds.
Defined in:
DETECTION_BASE
Parameter:
#number RefreshTimeInterval
Interval in seconds.
Return value:
self
Reject detections if within the specified zone(s).
Defined in:
DETECTION_BASE
Parameter:
Core.Zone#ZONE_BASE RejectZones
Can be a list or ZONE_BASE objects, or a single ZONE_BASE object.
Return value:
self
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:
DETECTION_BASE
Parameter:
ZoneArray
Aray of a The ZONE_BASE object and a ZoneProbability pair..
Return value:
self
UnIdentify all detected objects during detection processing.
Defined in:
DETECTION_BASE
UnIdentify a detected object during detection processing.
Unlock a detected item.
Defined in:
DETECTION_BASE
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
DETECTION_BASE
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:
DETECTION_BASE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Detected.
Defined in:
DETECTION_BASE
Parameters:
#number Delay
The delay in seconds.
#table Units
Table of detected units.
Asynchronous Event Trigger for Event Start.
Defined in:
DETECTION_BASE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Stop.
Defined in:
DETECTION_BASE
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:
DETECTION_BASE
Parameters:
From
Event
To
Defined in:
DETECTION_BASE
Parameters:
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
Wrapper.Group#GROUP Detection
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:
DETECTION_BASE
Parameters:
From
Event
To
Field(s)
Map of the DetectedObjects identified.
The range till which targets are accepted to be detected.
The Core.Set of GROUPs in the Forward Air Controller role.
Function(s)
Adds an End 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.
Core.Fsm#FSM_PROCESS Process
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.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
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.
Sets the start state of the FSM.
Add to map.
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.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
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)
Map of the DetectedObjects identified.
The range till which targets are accepted to be detected.
The Core.Set of GROUPs in the Forward Air Controller role.
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.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
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.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
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.
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()
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:
Core.Event#EVENTS EventID
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.
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).
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
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.
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.
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
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
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.
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.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
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.
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
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.
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.
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.
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
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
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
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.
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.
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.
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.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace level
Set trace off.
Set trace on.
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.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
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.
Detected item data structure.
Field(s)
Category name of the detected unit.
Documents if the detected area has changed.
A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).
The last known coordinate of the DetectedItem.
Distance to the detected item.
Distance in meters of the Recce.
Table of distances to friendly units.
Indicates if there are friendlies within the detected area.
The identifier of the detected area.
Detected item key. Could also be a string.
Indicates if the DetectedItem has been detected or not.
If true, detected object is visible.
ItemPrefix .. "." .. self.DetectedItemMax.
Distance to the detected item is known.
Type of detected item is known.
Last time the detected item was seen.
Last recorded 3D velocity vector of the detected item.
Lock detected item.
Name of the detected object.
Table of nearby players.
Type name of the detected unit.
Function(s)
Field(s)
Function(s)
Field(s)
Function(s)
Create the DetectedItems list from the DetectedObjects table.
For each DetectedItem, a one field array is created containing the Unit detected.
Report summary of a DetectedItem using a given numeric index.
Defined in:
DETECTION_TYPES
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
Message formatting settings to use.
Return value:
The report of the detection items.
Report detailed of a detection result.
Defined in:
DETECTION_TYPES
Parameter:
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Return value:
#string:
Make text documenting the changes of the detected zone.
Defined in:
DETECTION_TYPES
Parameter:
Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#string:
The Changes text
DETECTION_TYPES constructor.
Defined in:
DETECTION_TYPES
Parameter:
Core.Set#SET_GROUP DetectionSetGroup
The Core.Set of GROUPs in the Recce role.
Return value:
Field(s)
Function(s)
Accepts changes from the detected item.
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
ItemUnitType
Return value:
self
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
#string ChangeUnitType
Return value:
self
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.
Core.Zone#ZONE_UNIT Zone
(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.
Defined in:
Make a DetectionSet table.
This function will be overridden in the derived clsses.
Synchronous Event Trigger for Event Detect.
Defined in:
Synchronous Event Trigger for Event Detected.
Report summary of a detected item using a given numeric index.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
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:
self
@param #DETECTION_BASE self
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#string:
DetectedItemID
Get the Core.Set#SET_UNIT of a detection area using a given numeric index.
Get the detected item coordinate.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#number:
ThreatLevel
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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.
Get the Detection Set.
Returns the distance used to identify friendlies near the detected item ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#table:
A table of distances to friendlies.
Returns friendly units nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#map<#string,Wrapper.Unit#UNIT>:
The map of Friendly UNITs.
Identifies a detected object during detection processing.
Detect DLINK.
Defined in:
Parameter:
#boolean DetectDLINK
Return value:
self
Detect IRST.
Defined in:
Parameter:
#boolean DetectIRST
Return value:
self
Detect Optical.
Defined in:
Parameter:
#boolean DetectOptical
Return value:
self
Detect RWR.
Defined in:
Parameter:
#boolean DetectRWR
Return value:
self
Detect Radar.
Defined in:
Parameter:
#boolean DetectRadar
Return value:
self
Detect Visual.
Defined in:
Parameter:
#boolean DetectVisual
Return value:
self
Checks if there is at least one UNIT detected in the Set of the the DetectedItem.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#boolean:
Determines if a detected object has already been identified during detection processing.
Defined in:
Parameter:
#DETECTION_BASE.DetectedObject DetectedObject
Return value:
#boolean:
true if already identified.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
trhe if there are friendlies near the intercept.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
true if there are friendlies nearby
Lock a detected item.
Lock the detected items when created and lock all existing detected items.
Find the nearest Recce of the DetectedItem.
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:
self
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 ...
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:
self
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:
self
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:
self
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:
self
Set the detected item coordinate.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem to set the coordinate at.
Core.Point#COORDINATE Coordinate
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:
self
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:
self
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:
self
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:
self
Set the detection interval time in seconds.
Defined in:
Parameter:
#number RefreshTimeInterval
Interval in seconds.
Return value:
self
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:
self
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:
self
Synchronous Event Trigger for Event Start.
Defined in:
Synchronous Event Trigger for Event Stop.
Defined in:
UnIdentify all detected objects during detection processing.
Defined in:
UnIdentify a detected object during detection processing.
Unlock a detected item.
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.
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.
Asynchronous Event Trigger for Event Stop.
@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:
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
Wrapper.Group#GROUP Detection
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.
Field(s)
Function(s)
Adds an End 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.
Core.Fsm#FSM_PROCESS Process
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.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
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.
Sets the start state of the FSM.
Add to map.
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.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
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)
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.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
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.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
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.
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()
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:
Core.Event#EVENTS EventID
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.
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).
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
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.
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.
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
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
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.
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.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
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.
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
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.
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.
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.
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
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
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
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.
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.
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.
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.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace level
Set trace off.
Set trace on.
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.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
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.
Field(s)
Function(s)
Create the DetectedItems list from the DetectedObjects table.
For each DetectedItem, a one field array is created containing the Unit detected.
Report summary of a DetectedItem using a given numeric index.
Defined in:
DETECTION_UNITS
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
Message formatting settings to use.
#boolean ForceA2GCoordinate
Set creation of A2G coordinate
Return value:
The report of the detection items.
Report detailed of a detection result.
Defined in:
DETECTION_UNITS
Parameter:
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Return value:
#string:
Make text documenting the changes of the detected zone.
Defined in:
DETECTION_UNITS
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#string:
The Changes text
DETECTION_UNITS constructor.
Defined in:
DETECTION_UNITS
Parameter:
Core.Set#SET_GROUP DetectionSetGroup
The Core.Set of GROUPs in the Forward Air Controller role.
Return value:
Field(s)
Function(s)
Accepts changes from the detected item.
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
ItemUnitType
Return value:
self
Add a change to the detected zone.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
#string ChangeCode
#string ChangeUnitType
Return value:
self
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.
Core.Zone#ZONE_UNIT Zone
(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.
Defined in:
Make a DetectionSet table.
This function will be overridden in the derived clsses.
Synchronous Event Trigger for Event Detect.
Defined in:
Synchronous Event Trigger for Event Detected.
Report summary of a detected item using a given numeric index.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Core.Settings#SETTINGS Settings
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:
self
@param #DETECTION_BASE self
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#string:
DetectedItemID
Get the Core.Set#SET_UNIT of a detection area using a given numeric index.
Get the detected item coordinate.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#number:
ThreatLevel
Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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.
Get the Detection Set.
Returns the distance used to identify friendlies near the detected item ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#table:
A table of distances to friendlies.
Returns friendly units nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The detected item.
Return value:
#map<#string,Wrapper.Unit#UNIT>:
The map of Friendly UNITs.
Identifies a detected object during detection processing.
Detect DLINK.
Defined in:
Parameter:
#boolean DetectDLINK
Return value:
self
Detect IRST.
Defined in:
Parameter:
#boolean DetectIRST
Return value:
self
Detect Optical.
Defined in:
Parameter:
#boolean DetectOptical
Return value:
self
Detect RWR.
Defined in:
Parameter:
#boolean DetectRWR
Return value:
self
Detect Radar.
Defined in:
Parameter:
#boolean DetectRadar
Return value:
self
Detect Visual.
Defined in:
Parameter:
#boolean DetectVisual
Return value:
self
Checks if there is at least one UNIT detected in the Set of the the DetectedItem.
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
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:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Return value:
#boolean:
Determines if a detected object has already been identified during detection processing.
Defined in:
Parameter:
#DETECTION_BASE.DetectedObject DetectedObject
Return value:
#boolean:
true if already identified.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
DCS#Unit.Category Category
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:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
trhe if there are friendlies near the intercept.
Returns if there are friendlies nearby the FAC units ...
Defined in:
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#boolean:
true if there are friendlies nearby
Lock a detected item.
Lock the detected items when created and lock all existing detected items.
Find the nearest Recce of the DetectedItem.
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:
self
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 ...
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:
self
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:
self
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:
self
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:
self
Set the detected item coordinate.
Defined in:
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem to set the coordinate at.
Core.Point#COORDINATE Coordinate
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:
self
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:
self
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:
self
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:
self
Set the detection interval time in seconds.
Defined in:
Parameter:
#number RefreshTimeInterval
Interval in seconds.
Return value:
self
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:
self
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:
self
Synchronous Event Trigger for Event Start.
Defined in:
Synchronous Event Trigger for Event Stop.
Defined in:
UnIdentify all detected objects during detection processing.
Defined in:
UnIdentify a detected object during detection processing.
Unlock a detected item.
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.
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.
Asynchronous Event Trigger for Event Stop.
@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:
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
Wrapper.Group#GROUP Detection
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.
Field(s)
Function(s)
Adds an End 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.
Core.Fsm#FSM_PROCESS Process
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.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
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.
Sets the start state of the FSM.
Add to map.
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.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
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)
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.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
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.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
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.
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()
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:
Core.Event#EVENTS EventID
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.
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).
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
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.
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.
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
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
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.
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.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
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.
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
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.
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.
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.
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
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
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
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.
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.
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.
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.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace level
Set trace off.
Set trace on.
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.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
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.