Banner Image

Module Core.Set

Core - Define collections of objects to perform bulk actions and logically group objects.


Features:

  • Dynamically maintain collections of objects.
  • Manually modify the collection, by adding or removing objects.
  • Collections of different types.
  • Validate the presence of objects in the collection.
  • Perform bulk actions on collection.

Managing a set

Use Add...() and Remove...() to manage entries explicitly. Use SET_BASE.FilterOnce() to apply the current criteria once. This example collects groups whose names contain Transport.

local transports = SET_GROUP:New():FilterPrefixes("Transport"):FilterOnce()

To keep updating the set, call FilterStart() on the concrete class. It adds matching objects from its data source and subscribes to the events supported by that class. For SET_GROUP, SET_UNIT, SET_CLIENT and SET_DYNAMICCARGO, a configured zone filter also checks membership periodically. With a mission zone named Transport Area, check membership every 30 seconds.

local area = ZONE:FindByName("Transport Area")
transports:FilterZones({ area }):FilterOnce()
transports:FilterZoneTimer(30):FilterStart()

Call FilterStop() to stop active updates and keep the current members. SET_BASE.FilterClear() clears the criteria and stops the zone timer while leaving event subscriptions active. Call FilterOnce() to apply changed criteria to the data source immediately. Call FilterStart() again to start periodic checks after configuring a new zone filter. On filter methods that take Clear, passing true replaces the previous values of that criterion with the supplied values. SET_SCENERY:FilterOnce() filters the entries already collected in the set. Use SET_SCENERY:New(ZoneSet) or SET_SCENERY:NewFromZone(Zone) to find scenery.

Various types of SET_ classes are available:

These classes are derived from #SET_BASE, which contains the main methods to manage the collections.

A multitude of other methods are available in the individual set classes that allow to:

  • Validate the presence of objects in the SET.
  • Trigger events when objects in the SET change a zone presence.

Matching names

FilterPrefixes() searches for a match anywhere in the name. It uses Lua patterns and escapes hyphens by default. For example, FilterPrefixes("UH-1H Al-Assad") matches names containing that text with the default settings. Use FilterSetRegex(true):FilterPrefixes("UH-1H Al-Assad") to treat every character in the search as literal text. Use FilterSetRegex(false, false) to leave patterns as supplied, for example when providing an explicit %-. Only hyphens are escaped. Other magic characters such as ., %, (, ), [, ], +, *, ?, ^ and $ keep their pattern meaning. For example, FilterPrefixes("F.A") also matches F-A and FXA. Use FilterSetRegex(true) to search for such characters as literal text.


Author: FlightControl

Contributions: funkyfranky, applevangelist


Global(s)

Global SET_AIRBASE

Mission designers can use the Core.Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

  • Coalitions

SET_AIRBASE constructor

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

#SET_AIRBASE SET_AIRBASE

Mission designers can use the Core.Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

  • Coalitions

SET_AIRBASE constructor

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

Add or Remove AIRBASEs from SET_AIRBASE

AIRBASEs can be added and removed using the Core.Set#SET_AIRBASE.AddAirbasesByName and Core.Set#SET_AIRBASE.RemoveAirbasesByName respectively. These methods take a single AIRBASE name or an array of AIRBASE names to be added or removed from SET_AIRBASE.

SET_AIRBASE filter criteria

You can set filter criteria to define the set of clients within the SET_AIRBASE. Filter criteria are defined by:

Once the filter criteria have been set for the SET_AIRBASE, you can start filtering using:

SET_AIRBASE iterators

Once the filters have been defined and the SET_AIRBASE has been built, you can iterate the SET_AIRBASE with the available iterator methods. The iterator methods will walk the SET_AIRBASE set, and call for each airbase within the set a function that you provide. The following iterator methods are currently available within the SET_AIRBASE:


Global SET_BASE

The Core.Set#SET_BASE class defines the core functions that define a collection of objects.

#SET_BASE SET_BASE

The Core.Set#SET_BASE class defines the core functions that define a collection of objects.

SET_BASE.ForEach() and SET_BASE.ForSome() call their callbacks synchronously. The iterator receives the object first, followed by any iterator arguments. An optional condition receives its arguments first, followed by the object.

Add or remove objects from the SET

Some key core functions are Core.Set#SET_BASE.Add and Core.Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

Limit the number of objects evaluated

SET_BASE.SetSomeIteratorLimit() sets the maximum number of objects evaluated by ForSome(). Objects that fail the optional condition still count toward the limit.

Global SET_CLIENT

Mission designers can use the Core.Set#SET_CLIENT class to build sets of units belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Client types
  • Starting with certain prefix strings.
#SET_CLIENT SET_CLIENT

Mission designers can use the Core.Set#SET_CLIENT class to build sets of units belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Client types
  • Starting with certain prefix strings.

1) SET_CLIENT constructor

Create a new SET_CLIENT object with the SET_CLIENT.New method:

2) Add or Remove CLIENT(s) from SET_CLIENT

CLIENTs can be added and removed using the Core.Set#SET_CLIENT.AddClientsByName and Core.Set#SET_CLIENT.RemoveClientsByName respectively. These methods take a single CLIENT name or an array of CLIENT names to be added or removed from SET_CLIENT.

3) SET_CLIENT filter criteria

You can set filter criteria to define the set of clients within the SET_CLIENT. Filter criteria are defined by:

Once the filter criteria have been set for the SET_CLIENT, you can start filtering using:

4) SET_CLIENT iterators

Once the filters have been defined and the SET_CLIENT has been built, you can iterate the SET_CLIENT with the available iterator methods. The iterator methods will walk the SET_CLIENT set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_CLIENT:


Global SET_DYNAMICCARGO

The Core.Set#SET_DYNAMICCARGO class defines the functions that define a collection of objects form Wrapper.DynamicCargo#DYNAMICCARGO.

#SET_DYNAMICCARGO SET_DYNAMICCARGO

The Core.Set#SET_DYNAMICCARGO class defines the functions that define a collection of objects form Wrapper.DynamicCargo#DYNAMICCARGO.

A SET provides iterators to iterate the SET. - Mission designers can use the SET_DYNAMICCARGO class to build sets of cargos belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Static types
  • Starting with certain prefix strings.
  • Etc.

SET_DYNAMICCARGO constructor

Create a new SET_DYNAMICCARGO object with the SET_DYNAMICCARGO.New method:

SET_DYNAMICCARGO filter criteria

You can set filter criteria to define the set of objects within the SET_DYNAMICCARGO. Filter criteria are defined by:

Once the filter criteria have been set for the SET_DYNAMICCARGO, you can start and stop filtering using:

SET_DYNAMICCARGO iterators

Once the filters have been defined and the SET_DYNAMICCARGO has been built, you can iterate the SET_DYNAMICCARGO with the available iterator methods. The iterator methods will walk the SET_DYNAMICCARGO set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_DYNAMICCARGO:

SET_DYNAMICCARGO atomic methods

Various methods exist for a SET_DYNAMICCARGO to perform actions or calculations and retrieve results from the SET_DYNAMICCARGO:


Global SET_GROUP

Mission designers can use the Core.Set#SET_GROUP class to build sets of groups belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Starting with certain prefix strings.
#SET_GROUP SET_GROUP

Mission designers can use the Core.Set#SET_GROUP class to build sets of groups belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Starting with certain prefix strings.

SET_GROUP constructor

Create a new SET_GROUP object with the SET_GROUP.New method:

Add or Remove GROUP(s) from SET_GROUP

GROUPS can be added and removed using the Core.Set#SET_GROUP.AddGroupsByName and Core.Set#SET_GROUP.RemoveGroupsByName respectively. These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_GROUP.

SET_GROUP filter criteria

You can set filter criteria to define the set of groups within the SET_GROUP. Filter criteria are defined by:

For the Category Filter, extra methods have been added:

Once the filter criteria have been set for the SET_GROUP, you can start filtering using:

SET_GROUP iterators

Once the filters have been defined and the SET_GROUP has been built, you can iterate the SET_GROUP with the available iterator methods. The iterator methods will walk the SET_GROUP set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_GROUP:

SET_GROUP trigger events on the GROUP objects.

The SET is derived from the FSM class, which provides extra capabilities to track the contents of the GROUP objects in the SET_GROUP.

When a GROUP object crashes or is dead, the SET_GROUP will trigger a Dead event.

You can handle the event using the OnBefore and OnAfter event handlers. The event handlers need to have the parameters From, Event, To, GroupObject. The GroupObject is the GROUP object that is dead and within the SET_GROUP, and is passed as a parameter to the event handler. See the following example:

   -- Create the SetCarrier SET_GROUP collection.

   local SetHelicopter = SET_GROUP:New():FilterPrefixes("Helicopter"):FilterStart()

   -- Put a Dead event handler on SetCarrier, to ensure that when a carrier is destroyed, that all internal parameters are reset.

   function SetHelicopter:OnAfterDead(From, Event, To, GroupObject)
     --self:F({ GroupObject = GroupObject:GetName() })
   end

Global SET_OPSGROUP

Mission designers can use the Core.Set#SET_OPSGROUP class to build sets of OPS groups belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Contain a certain string pattern

SET_OPSGROUP constructor

Create a new SET_OPSGROUP object with the SET_OPSGROUP.New method:

#SET_OPSGROUP SET_OPSGROUP

Mission designers can use the Core.Set#SET_OPSGROUP class to build sets of OPS groups belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Contain a certain string pattern

SET_OPSGROUP constructor

Create a new SET_OPSGROUP object with the SET_OPSGROUP.New method:

Add or Remove GROUP(s) from SET_OPSGROUP

GROUPS can be added and removed using the Core.Set#SET_OPSGROUP.AddGroupsByName and Core.Set#SET_OPSGROUP.RemoveGroupsByName respectively. These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_OPSGROUP.

SET_OPSGROUP filter criteria

You can set filter criteria to define the set of groups within the SET_OPSGROUP. Filter criteria are defined by:

For the Category Filter, extra methods have been added:

Once the filter criteria have been set for the SET_OPSGROUP, you can start filtering using:

SET_OPSGROUP iterators

Once the filters have been defined and the SET_OPSGROUP has been built, you can iterate the SET_OPSGROUP with the available iterator methods. The iterator methods will walk the SET_OPSGROUP set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_OPSGROUP:

SET_OPSGROUP trigger events on the GROUP objects.

The SET is derived from the FSM class, which provides extra capabilities to track the contents of the GROUP objects in the SET_OPSGROUP.

When a GROUP object crashes or is dead, the SET_OPSGROUP will trigger a Dead event.

You can handle the event using the OnBefore and OnAfter event handlers. The event handlers need to have the parameters From, Event, To, GroupObject. The GroupObject is the GROUP object that is dead and within the SET_OPSGROUP, and is passed as a parameter to the event handler. See the following example:

   -- Create the SetCarrier SET_OPSGROUP collection.

   local SetHelicopter = SET_OPSGROUP:New():FilterPrefixes("Helicopter"):FilterStart()

   -- Put a Dead event handler on SetCarrier, to ensure that when a carrier is destroyed, that all internal parameters are reset.

   function SetHelicopter:OnAfterDead(From, Event, To, GroupObject)
     --self:F({ GroupObject = GroupObject:GetName() })
   end

Global SET_OPSZONE

A collection of OPSZONE objects from DATABASE.OPSZONES.

#SET_OPSZONE SET_OPSZONE

A collection of OPSZONE objects from DATABASE.OPSZONES.

When multiple OPSZONE objects are created with the same name, DATABASE.OPSZONES keeps the first one, so FilterOnce() and FilterStart() use the first instance.

SET_OPSZONE constructor

Create a new SET_OPSZONE object with the SET_OPSZONE.New method:

Add or Remove ZONEs from SET_OPSZONE

Add an OPSZONE object with Core.Set#SET_OPSZONE.AddZone(). Remove one or more entries by name with Core.Set#SET_OPSZONE.RemoveZonesByName().

SET_OPSZONE filter criteria

You can set filter criteria to build the collection of zones in SET_OPSZONE. Filter criteria are defined by:

FilterStart() reads registered OPSZONE objects and processes zone-goal events carrying an OPSZONE. OPSZONE:New() registers the OPSZONE in the DATABASE but raises no such event. An OPSZONE created after FilterStart() is therefore not added automatically. Add it with SET_OPSZONE.AddZone() or call SET_OPSZONE.FilterOnce() again.

SET_OPSZONE iterators

Once the filters have been defined and the SET_OPSZONE has been built, you can iterate the SET_OPSZONE with the available iterator methods. Pass a callback to process each OPSZONE object in the set. The following iterator methods are currently available within the SET_OPSZONE:


Global SET_PLAYER

Mission designers can use the Core.Set#SET_PLAYER class to build sets of units belonging to alive players:

SET_PLAYER constructor

Create a new SET_PLAYER object with the SET_PLAYER.New method:

#SET_PLAYER SET_PLAYER

Mission designers can use the Core.Set#SET_PLAYER class to build sets of units belonging to alive players:

SET_PLAYER constructor

Create a new SET_PLAYER object with the SET_PLAYER.New method:

SET_PLAYER filter criteria

You can set filter criteria to define the set of clients within the SET_PLAYER. Filter criteria are defined by:

  • SET_PLAYER.FilterCoalitions: Builds the SET_PLAYER with the clients belonging to the coalition(s).
  • SET_PLAYER.FilterCategories: Builds the SET_PLAYER with the clients belonging to the category(ies).
  • SET_PLAYER.FilterTypes: Builds the SET_PLAYER with the clients belonging to the client type(s).
  • SET_PLAYER.FilterCountries: Builds the SET_PLAYER with the clients belonging to the country(ies).
  • SET_PLAYER.FilterPrefixes: Builds the SET_PLAYER with the clients sharing the same string(s) in their unit/pilot name. Attention! LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results. Have a read through here to understand the application of regular expressions: LUA regular expressions

Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:

Planned filter criteria within development are (so these are not yet available):

SET_PLAYER iterators

Once the filters have been defined and the SET_PLAYER has been built, you can iterate the SET_PLAYER with the available iterator methods. The iterator methods will walk the SET_PLAYER set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_PLAYER:


Global SET_SCENERY

Mission designers can use the SET_SCENERY class to build sets of scenery belonging to certain:

  • Zone Sets

SET_SCENERY constructor

Create a new SET_SCENERY object with the SET_SCENERY.New method:

#SET_SCENERY SET_SCENERY

Mission designers can use the SET_SCENERY class to build sets of scenery belonging to certain:

  • Zone Sets

SET_SCENERY constructor

Create a new SET_SCENERY object with the SET_SCENERY.New method:

Add or Remove SCENERY(s) from SET_SCENERY

SCENERYs can be added and removed using the Core.Set#SET_SCENERY.AddSceneryByName and Core.Set#SET_SCENERY.RemoveSceneryByName respectively. These methods take a single SCENERY name or an array of SCENERY names to be added or removed from SET_SCENERY.

SET_SCENERY filter criteria

N/A at the moment

SET_SCENERY iterators

Once the filters have been defined and the SET_SCENERY has been built, you can iterate the SET_SCENERY with the available iterator methods. The iterator methods will walk the SET_SCENERY set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_SCENERY:

SET_SCENERY atomic methods

N/A at the moment


Global SET_STATIC

Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Static types
  • Starting with certain prefix strings.
#SET_STATIC SET_STATIC

Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Static types
  • Starting with certain prefix strings.

SET_STATIC constructor

Create a new SET_STATIC object with the SET_STATIC.New method:

Add or Remove STATIC(s) from SET_STATIC

STATICs can be added and removed using the Core.Set#SET_STATIC.AddStaticsByName and Core.Set#SET_STATIC.RemoveStaticsByName respectively. These methods take a single STATIC name or an array of STATIC names to be added or removed from SET_STATIC.

SET_STATIC filter criteria

You can set filter criteria to define the set of units within the SET_STATIC. Filter criteria are defined by:

Once the filter criteria have been set for the SET_STATIC, you can start filtering using:

SET_STATIC iterators

Once the filters have been defined and the SET_STATIC has been built, you can iterate the SET_STATIC with the available iterator methods. The iterator methods will walk the SET_STATIC set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_STATIC:

SET_STATIC atomic methods

Various methods exist for a SET_STATIC to perform actions or calculations and retrieve results from the SET_STATIC:


Global SET_UNIT

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Unit types
  • Starting with certain prefix strings.
#SET_UNIT SET_UNIT

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

  • Coalitions
  • Categories
  • Countries
  • Unit types
  • Starting with certain prefix strings.

1) SET_UNIT constructor

Create a new SET_UNIT object with the SET_UNIT.New method:

2) Add or Remove UNIT(s) from SET_UNIT

UNITs can be added and removed using the Core.Set#SET_UNIT.AddUnitsByName and Core.Set#SET_UNIT.RemoveUnitsByName respectively. These methods take a single UNIT name or an array of UNIT names to be added or removed from SET_UNIT.

3) SET_UNIT filter criteria

You can set filter criteria to define the set of units within the SET_UNIT. Filter criteria are defined by:

Once the filter criteria have been set for the SET_UNIT, you can start filtering using:

4) SET_UNIT iterators

Once the filters have been defined and the SET_UNIT has been built, you can iterate the SET_UNIT with the available iterator methods. The iterator methods will walk the SET_UNIT set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_UNIT:

5) SET_UNIT atomic methods

Various methods exist for a SET_UNIT to perform actions or calculations and retrieve results from the SET_UNIT:

6) SET_UNIT trigger events on the UNIT objects.

The SET is derived from the FSM class, which provides extra capabilities to track the contents of the UNIT objects in the SET_UNIT.

6.1) When a UNIT object crashes or is dead, the SET_UNIT will trigger a Dead event.

You can handle the event using the OnBefore and OnAfter event handlers. The event handlers need to have the parameters From, Event, To, GroupObject. The GroupObject is the UNIT object that is dead and within the SET_UNIT, and is passed as a parameter to the event handler. See the following example:

   -- Create the SetCarrier SET_UNIT collection.

   local SetHelicopter = SET_UNIT:New():FilterPrefixes("Helicopter"):FilterStart()

   -- Put a Dead event handler on SetCarrier, to ensure that when a carrier unit is destroyed, that all internal parameters are reset.

   function SetHelicopter:OnAfterDead(From, Event, To, UnitObject)
     --self:F({ UnitObject = UnitObject:GetName() })
   end

Global SET_ZONE

Mission designers can use the Core.Set#SET_ZONE class to build sets of zones of various types.

#SET_ZONE SET_ZONE

Mission designers can use the Core.Set#SET_ZONE class to build sets of zones of various types.

SET_ZONE constructor

Create a new SET_ZONE object with the SET_ZONE.New method:

Add or Remove ZONEs from SET_ZONE

ZONEs can be added and removed using the Core.Set#SET_ZONE.AddZonesByName and Core.Set#SET_ZONE.RemoveZonesByName respectively. These methods take a single ZONE name or an array of ZONE names to be added or removed from SET_ZONE.

SET_ZONE filter criteria

You can set filter criteria to build the collection of zones in SET_ZONE. Filter criteria are defined by:

Once the filter criteria have been set for the SET_ZONE, you can start filtering using:

SET_ZONE iterators

Once the filters have been defined and the SET_ZONE has been built, you can iterate the SET_ZONE with the available iterator methods. The iterator methods will walk the SET_ZONE set, and call for each airbase within the set a function that you provide. The following iterator methods are currently available within the SET_ZONE:


Global SET_ZONE_GOAL

A collection of ZONE_GOAL objects from DATABASE.ZONES_GOAL.

#SET_ZONE_GOAL SET_ZONE_GOAL

A collection of ZONE_GOAL objects from DATABASE.ZONES_GOAL.

When multiple objects are created with the same name, running and newly started sets both use the first registered instance.

SET_ZONE_GOAL constructor

Create a new SET_ZONE_GOAL object with the SET_ZONE_GOAL.New method:

Add or Remove ZONEs from SET_ZONE_GOAL

Add a ZONE_GOAL object with Core.Set#SET_ZONE_GOAL.AddZone(). Remove one or more entries by name with Core.Set#SET_ZONE_GOAL.RemoveZonesByName().

SET_ZONE_GOAL filter criteria

You can set filter criteria to build the collection of zones in SET_ZONE_GOAL. Filter criteria are defined by:

FilterStart() reads registered zone goals and listens for zone-goal creation and deletion events.

SET_ZONE_GOAL iterators

Once the filters have been defined and the SET_ZONE_GOAL has been built, you can iterate the SET_ZONE_GOAL with the available iterator methods. Pass a callback to process each ZONE_GOAL object in the set. The following iterator methods are currently available within the SET_ZONE_GOAL:


Type(s)

Fields and Methods inherited from SET_AIRBASE Description

SET_AIRBASE:AddAirbase(airbase)

Add an AIRBASE object to SET_AIRBASE.

SET_AIRBASE:AddAirbasesByName(AddAirbaseNames)

Add AIRBASEs to SET_AIRBASE.

SET_AIRBASE:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_AIRBASE:FilterCategories(Categories, Clear)

Builds a set of airbases out of categories.

SET_AIRBASE:FilterStart()

Starts the filtering.

SET_AIRBASE:FilterStop()

Stops the filtering.

SET_AIRBASE:FilterZones(Zones, Clear)

Builds a set of airbase objects in zones.

SET_AIRBASE:FindAirbase(AirbaseName)

Finds a Airbase based on the Airbase Name.

SET_AIRBASE:FindAirbaseInRange(Coordinate, Range)

Finds an Airbase in range of a coordinate.

SET_AIRBASE:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_AIRBASE:FindNearestAirbaseFromPointVec2(Coordinate)

Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#COORDINATE.

SET_AIRBASE:ForEachAirbase(IteratorFunction, ...)

Iterate the SET_AIRBASE and call an iterator function for each AIRBASE, providing the AIRBASE and optional parameters.

SET_AIRBASE:GetRandomAirbase()

Finds a random Airbase in the set.

SET_AIRBASE:IsIncludeObject(MAirbase)

SET_AIRBASE:New()

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

SET_AIRBASE:OnEventBaseCaptured(EventData)

Base capturing event.

SET_AIRBASE:OnEventDead(EventData)

Dead event.

SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames)

Remove AIRBASEs from SET_AIRBASE.

Fields and Methods inherited from SET_BASE Description

SET_AIRBASE:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_AIRBASE:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_AIRBASE:AddSet(SetToAdd)

Add a SET to this set.

SET_AIRBASE.CallScheduler

SET_AIRBASE:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_AIRBASE:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_AIRBASE:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_AIRBASE.Database

SET_AIRBASE.Filter

Filters

SET_AIRBASE:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_AIRBASE:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_AIRBASE:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_AIRBASE:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_AIRBASE:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_AIRBASE:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_AIRBASE:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_AIRBASE:FilterStop()

Stops the filtering for the defined collection.

SET_AIRBASE:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_AIRBASE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_AIRBASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_AIRBASE:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_AIRBASE:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_AIRBASE:GetAliveSet()

Get a new set table that only contains alive objects.

SET_AIRBASE:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_AIRBASE:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_AIRBASE:GetObjectNames()

Gets a string with all the object names.

SET_AIRBASE:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_AIRBASE:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_AIRBASE:GetSet()

Gets the Set.

SET_AIRBASE:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_AIRBASE:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_AIRBASE:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_AIRBASE:GetSetObjects()

Returns a table of the Objects in the Set.

SET_AIRBASE:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_AIRBASE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_AIRBASE:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_AIRBASE.Index

Table of indices.

SET_AIRBASE:IsInSet(Object)

Decides whether an object is in the SET

SET_AIRBASE:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_AIRBASE:IsIncludeObject(Object)

Decides whether to include the Object.

SET_AIRBASE:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_AIRBASE.List

Unused table.

SET_AIRBASE:New(Database)

Creates an empty set.

SET_AIRBASE:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_AIRBASE:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_AIRBASE:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_AIRBASE.Set

Table of objects.

SET_AIRBASE:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_AIRBASE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_AIRBASE.SomeIteratorLimit

SET_AIRBASE:SortByName()

Sort the set by name.

SET_AIRBASE:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_AIRBASE:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_AIRBASE:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_AIRBASE:_FilterStart()

Starts the filtering for the defined collection.

SET_AIRBASE:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_AIRBASE:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_AIRBASE:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_AIRBASE:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_AIRBASE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_AIRBASE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_AIRBASE.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_AIRBASE.ClassName

The name of the class.

SET_AIRBASE:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_AIRBASE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_AIRBASE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_AIRBASE:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_AIRBASE:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_AIRBASE:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_AIRBASE:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_AIRBASE:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_AIRBASE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_AIRBASE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_AIRBASE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_AIRBASE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_AIRBASE:E(Arguments)

Log an exception which will be traced always.

SET_AIRBASE:EventDispatcher()

Returns the event dispatcher

SET_AIRBASE:EventRemoveAll()

Remove all subscribed events

SET_AIRBASE:F(Arguments)

Trace a function call.

SET_AIRBASE:F2(Arguments)

Trace a function call level 2.

SET_AIRBASE:F3(Arguments)

Trace a function call level 3.

SET_AIRBASE:GetClassID()

Get the ClassID of the class instance.

SET_AIRBASE:GetClassName()

Get the ClassName of the class instance.

SET_AIRBASE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_AIRBASE:GetEventPriority()

Get the object's configured event priority.

SET_AIRBASE:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_AIRBASE:GetProperties()

Get all of the properties of an object in a table.

SET_AIRBASE:GetProperty(Key)

Get one property of an object by the key.

SET_AIRBASE:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_AIRBASE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_AIRBASE:I(Arguments)

Log an information which will be traced always.

SET_AIRBASE:Inherit(Child, Parent)

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

SET_AIRBASE:IsInstanceOf(ClassName)

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

SET_AIRBASE:IsTrace()

Check whether tracing is enabled for the object.

SET_AIRBASE:New()

BASE constructor.

SET_AIRBASE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_AIRBASE:OnEventBDA(EventData)

BDA.

SET_AIRBASE:OnEventBaseCaptured(EventData)

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

SET_AIRBASE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_AIRBASE:OnEventCrash(EventData)

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

SET_AIRBASE:OnEventDead(EventData)

Occurs when an object is dead.

SET_AIRBASE:OnEventDetailedFailure(EventData)

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

SET_AIRBASE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_AIRBASE:OnEventDynamicCargoLoaded(EventData)

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

SET_AIRBASE:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_AIRBASE:OnEventDynamicCargoUnloaded(EventData)

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

SET_AIRBASE:OnEventEjection(EventData)

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

SET_AIRBASE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_AIRBASE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_AIRBASE:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_AIRBASE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_AIRBASE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_AIRBASE:OnEventKill(EventData)

Occurs on the death of a unit.

SET_AIRBASE:OnEventLand(EventData)

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

SET_AIRBASE:OnEventLandingAfterEjection(EventData)

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

SET_AIRBASE:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_AIRBASE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_AIRBASE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_AIRBASE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_AIRBASE:OnEventMissionEnd(EventData)

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

SET_AIRBASE:OnEventMissionStart(EventData)

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

SET_AIRBASE:OnEventNewDynamicCargo(EventData)

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

SET_AIRBASE:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_AIRBASE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_AIRBASE:OnEventPlayerEnterAircraft(EventData)

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

SET_AIRBASE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_AIRBASE:OnEventPlayerLeaveUnit(EventData)

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

SET_AIRBASE:OnEventRefueling(EventData)

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

SET_AIRBASE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_AIRBASE:OnEventScore(EventData)

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

SET_AIRBASE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_AIRBASE:OnEventShootingStart(EventData)

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

SET_AIRBASE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_AIRBASE:OnEventTakeoff(EventData)

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

SET_AIRBASE:OnEventTriggerZone(EventData)

Trigger zone.

SET_AIRBASE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_AIRBASE:OnEventWeaponAdd(EventData)

Weapon add.

SET_AIRBASE.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_AIRBASE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_AIRBASE.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_AIRBASE:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_AIRBASE:SetProperty(Key, Value)

Set one property of an object.

SET_AIRBASE:SetState(Object, Key, Value)

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

SET_AIRBASE.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_AIRBASE:T(Arguments)

Trace a function logic level 1.

SET_AIRBASE:T2(Arguments)

Trace a function logic level 2.

SET_AIRBASE:T3(Arguments)

Trace a function logic level 3.

SET_AIRBASE:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_AIRBASE:TraceClass(Class)

Set tracing for all methods of a class.

SET_AIRBASE:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_AIRBASE:TraceLevel(Level)

Set the highest trace level.

SET_AIRBASE:TraceOff()

Set trace off.

SET_AIRBASE:TraceOn()

Set trace on.

SET_AIRBASE:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_AIRBASE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_AIRBASE._

SET_AIRBASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_AIRBASE:_Serialize(Arguments)

(Internal) Serialize arguments

SET_AIRBASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_AIRBASE.__

SET_AIRBASE:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_BASE Description

SET_BASE:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_BASE:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_BASE:AddSet(SetToAdd)

Add a SET to this set.

SET_BASE.CallScheduler

SET_BASE:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_BASE:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_BASE:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_BASE.Database

SET_BASE.Filter

Filters

SET_BASE:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_BASE:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_BASE:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_BASE:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_BASE:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_BASE:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_BASE:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_BASE:FilterStop()

Stops the filtering for the defined collection.

SET_BASE:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_BASE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_BASE:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_BASE:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_BASE:GetAliveSet()

Get a new set table that only contains alive objects.

SET_BASE:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_BASE:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_BASE:GetObjectNames()

Gets a string with all the object names.

SET_BASE:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_BASE:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_BASE:GetSet()

Gets the Set.

SET_BASE:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_BASE:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_BASE:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_BASE:GetSetObjects()

Returns a table of the Objects in the Set.

SET_BASE:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_BASE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_BASE:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_BASE.Index

Table of indices.

SET_BASE:IsInSet(Object)

Decides whether an object is in the SET

SET_BASE:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_BASE:IsIncludeObject(Object)

Decides whether to include the Object.

SET_BASE:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_BASE.List

Unused table.

SET_BASE:New(Database)

Creates an empty set.

SET_BASE:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_BASE:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_BASE:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_BASE.Set

Table of objects.

SET_BASE:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_BASE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_BASE.SomeIteratorLimit

SET_BASE:SortByName()

Sort the set by name.

SET_BASE:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_BASE:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_BASE:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_BASE:_FilterStart()

Starts the filtering for the defined collection.

SET_BASE:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_BASE:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_BASE:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_BASE:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_BASE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_BASE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_BASE.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_BASE.ClassName

The name of the class.

SET_BASE:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_BASE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_BASE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_BASE:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_BASE:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_BASE:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_BASE:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_BASE:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_BASE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_BASE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_BASE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_BASE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_BASE:E(Arguments)

Log an exception which will be traced always.

SET_BASE:EventDispatcher()

Returns the event dispatcher

SET_BASE:EventRemoveAll()

Remove all subscribed events

SET_BASE:F(Arguments)

Trace a function call.

SET_BASE:F2(Arguments)

Trace a function call level 2.

SET_BASE:F3(Arguments)

Trace a function call level 3.

SET_BASE:GetClassID()

Get the ClassID of the class instance.

SET_BASE:GetClassName()

Get the ClassName of the class instance.

SET_BASE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_BASE:GetEventPriority()

Get the object's configured event priority.

SET_BASE:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_BASE:GetProperties()

Get all of the properties of an object in a table.

SET_BASE:GetProperty(Key)

Get one property of an object by the key.

SET_BASE:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_BASE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_BASE:I(Arguments)

Log an information which will be traced always.

SET_BASE:Inherit(Child, Parent)

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

SET_BASE:IsInstanceOf(ClassName)

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

SET_BASE:IsTrace()

Check whether tracing is enabled for the object.

SET_BASE:New()

BASE constructor.

SET_BASE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_BASE:OnEventBDA(EventData)

BDA.

SET_BASE:OnEventBaseCaptured(EventData)

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

SET_BASE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_BASE:OnEventCrash(EventData)

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

SET_BASE:OnEventDead(EventData)

Occurs when an object is dead.

SET_BASE:OnEventDetailedFailure(EventData)

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

SET_BASE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_BASE:OnEventDynamicCargoLoaded(EventData)

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

SET_BASE:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_BASE:OnEventDynamicCargoUnloaded(EventData)

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

SET_BASE:OnEventEjection(EventData)

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

SET_BASE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_BASE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_BASE:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_BASE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_BASE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_BASE:OnEventKill(EventData)

Occurs on the death of a unit.

SET_BASE:OnEventLand(EventData)

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

SET_BASE:OnEventLandingAfterEjection(EventData)

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

SET_BASE:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_BASE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_BASE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_BASE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_BASE:OnEventMissionEnd(EventData)

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

SET_BASE:OnEventMissionStart(EventData)

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

SET_BASE:OnEventNewDynamicCargo(EventData)

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

SET_BASE:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_BASE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_BASE:OnEventPlayerEnterAircraft(EventData)

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

SET_BASE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_BASE:OnEventPlayerLeaveUnit(EventData)

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

SET_BASE:OnEventRefueling(EventData)

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

SET_BASE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_BASE:OnEventScore(EventData)

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

SET_BASE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_BASE:OnEventShootingStart(EventData)

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

SET_BASE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_BASE:OnEventTakeoff(EventData)

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

SET_BASE:OnEventTriggerZone(EventData)

Trigger zone.

SET_BASE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_BASE:OnEventWeaponAdd(EventData)

Weapon add.

SET_BASE.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_BASE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_BASE.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_BASE:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_BASE:SetProperty(Key, Value)

Set one property of an object.

SET_BASE:SetState(Object, Key, Value)

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

SET_BASE.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_BASE:T(Arguments)

Trace a function logic level 1.

SET_BASE:T2(Arguments)

Trace a function logic level 2.

SET_BASE:T3(Arguments)

Trace a function logic level 3.

SET_BASE:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_BASE:TraceClass(Class)

Set tracing for all methods of a class.

SET_BASE:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_BASE:TraceLevel(Level)

Set the highest trace level.

SET_BASE:TraceOff()

Set trace off.

SET_BASE:TraceOn()

Set trace on.

SET_BASE:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_BASE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_BASE._

SET_BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_BASE:_Serialize(Arguments)

(Internal) Serialize arguments

SET_BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_BASE.__

SET_BASE:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_BASE.Filter Description

SET_BASE.Filter.Coalition

Coalitions

SET_BASE.Filter.Prefix

Prefixes.

Fields and Methods inherited from SET_BASE.Filters Description

SET_BASE.Filters.Coalitions

SET_BASE.Filters.Functions

Fields and Methods inherited from SET_CLIENT Description

SET_CLIENT:AddClientsByName(AddClientNames)

Add CLIENT(s) to SET_CLIENT.

SET_CLIENT:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_CLIENT:CountAlive()

Iterate the SET_CLIENT and count alive units.

SET_CLIENT:FilterActive(Active)

Includes only clients that are active and alive when the activity filter is enabled.

SET_CLIENT:FilterAlive()

Builds a set of units which exist and are alive.

SET_CLIENT:FilterCallsigns(Callsigns, Clear)

Builds a set of clients of certain callsigns.

SET_CLIENT:FilterCategories(Categories, Clear)

Builds a set of clients out of categories.

SET_CLIENT:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_CLIENT:FilterCountries(Countries, Clear)

Builds a set of clients of defined countries.

SET_CLIENT:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_CLIENT:FilterGroupPrefixes(Prefixes)

Builds a set of clients which belong to groups with certain group names.

SET_CLIENT:FilterOnce()

Filter the set once

SET_CLIENT:FilterPlayernames(Playernames, Clear)

Filters clients by matches in the current player's name using the options set by FilterSetRegex().

SET_CLIENT:FilterPrefixes(Prefixes, Clear)

Filters clients by matches in the unit name.

SET_CLIENT:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_CLIENT:FilterStart()

Starts the filtering.

SET_CLIENT:FilterStop()

Stops the filtering.

SET_CLIENT:FilterTypes(Types, Clear)

Builds a set of clients of defined client types.

SET_CLIENT:FilterZoneTimer(Seconds)

Set filter timer interval for FilterZones if using active filtering with FilterStart().

SET_CLIENT:FilterZones(Zones, Clear)

Builds a set of clients in zones.

SET_CLIENT:FindClient(ClientName)

Finds a Client based on the Client Name.

SET_CLIENT:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_CLIENT:ForEachClient(IteratorFunction, ...)

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT, providing the CLIENT and optional parameters.

SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Core.Zone, providing the CLIENT and optional parameters to the called function.

SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Core.Zone, providing the CLIENT and optional parameters to the called function.

SET_CLIENT:GetAliveSet()

Gets the alive set.

SET_CLIENT:HandleCASlots()

Make the SET handle CA slots only (GROUND units used by any player).

SET_CLIENT.HandleCASlotsEnabled

SET_CLIENT:IsIncludeObject(MClient)

SET_CLIENT:New()

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_CLIENT:RemoveClientsByName(RemoveClientNames)

Remove CLIENT(s) from SET_CLIENT.

SET_CLIENT.ZoneTimer

SET_CLIENT.ZoneTimerInterval

SET_CLIENT:_ContinousZoneFilter()

[Internal] Private function for use of continous zone filter

SET_CLIENT:_EventPlayerEnterUnit(Event)

Handle CA slots addition

SET_CLIENT:_EventPlayerLeaveUnit(Event)

Handle CA slots removal

Fields and Methods inherited from SET_BASE Description

SET_CLIENT:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_CLIENT:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_CLIENT:AddSet(SetToAdd)

Add a SET to this set.

SET_CLIENT.CallScheduler

SET_CLIENT:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_CLIENT:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_CLIENT:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_CLIENT.Database

SET_CLIENT.Filter

Filters

SET_CLIENT:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_CLIENT:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_CLIENT:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_CLIENT:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_CLIENT:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_CLIENT:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_CLIENT:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_CLIENT:FilterStop()

Stops the filtering for the defined collection.

SET_CLIENT:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_CLIENT:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_CLIENT:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_CLIENT:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_CLIENT:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_CLIENT:GetAliveSet()

Get a new set table that only contains alive objects.

SET_CLIENT:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_CLIENT:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_CLIENT:GetObjectNames()

Gets a string with all the object names.

SET_CLIENT:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_CLIENT:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_CLIENT:GetSet()

Gets the Set.

SET_CLIENT:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_CLIENT:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_CLIENT:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_CLIENT:GetSetObjects()

Returns a table of the Objects in the Set.

SET_CLIENT:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_CLIENT:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_CLIENT:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_CLIENT.Index

Table of indices.

SET_CLIENT:IsInSet(Object)

Decides whether an object is in the SET

SET_CLIENT:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_CLIENT:IsIncludeObject(Object)

Decides whether to include the Object.

SET_CLIENT:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_CLIENT.List

Unused table.

SET_CLIENT:New(Database)

Creates an empty set.

SET_CLIENT:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_CLIENT:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_CLIENT:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_CLIENT.Set

Table of objects.

SET_CLIENT:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_CLIENT:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_CLIENT.SomeIteratorLimit

SET_CLIENT:SortByName()

Sort the set by name.

SET_CLIENT:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_CLIENT:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_CLIENT:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_CLIENT:_FilterStart()

Starts the filtering for the defined collection.

SET_CLIENT:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_CLIENT:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_CLIENT:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_CLIENT:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_CLIENT.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_CLIENT.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_CLIENT.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_CLIENT.ClassName

The name of the class.

SET_CLIENT:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_CLIENT:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_CLIENT:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_CLIENT:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_CLIENT:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_CLIENT:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_CLIENT:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_CLIENT:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_CLIENT:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_CLIENT:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_CLIENT:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_CLIENT:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_CLIENT:E(Arguments)

Log an exception which will be traced always.

SET_CLIENT:EventDispatcher()

Returns the event dispatcher

SET_CLIENT:EventRemoveAll()

Remove all subscribed events

SET_CLIENT:F(Arguments)

Trace a function call.

SET_CLIENT:F2(Arguments)

Trace a function call level 2.

SET_CLIENT:F3(Arguments)

Trace a function call level 3.

SET_CLIENT:GetClassID()

Get the ClassID of the class instance.

SET_CLIENT:GetClassName()

Get the ClassName of the class instance.

SET_CLIENT:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_CLIENT:GetEventPriority()

Get the object's configured event priority.

SET_CLIENT:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_CLIENT:GetProperties()

Get all of the properties of an object in a table.

SET_CLIENT:GetProperty(Key)

Get one property of an object by the key.

SET_CLIENT:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_CLIENT:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_CLIENT:I(Arguments)

Log an information which will be traced always.

SET_CLIENT:Inherit(Child, Parent)

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

SET_CLIENT:IsInstanceOf(ClassName)

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

SET_CLIENT:IsTrace()

Check whether tracing is enabled for the object.

SET_CLIENT:New()

BASE constructor.

SET_CLIENT:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_CLIENT:OnEventBDA(EventData)

BDA.

SET_CLIENT:OnEventBaseCaptured(EventData)

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

SET_CLIENT:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_CLIENT:OnEventCrash(EventData)

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

SET_CLIENT:OnEventDead(EventData)

Occurs when an object is dead.

SET_CLIENT:OnEventDetailedFailure(EventData)

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

SET_CLIENT:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_CLIENT:OnEventDynamicCargoLoaded(EventData)

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

SET_CLIENT:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_CLIENT:OnEventDynamicCargoUnloaded(EventData)

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

SET_CLIENT:OnEventEjection(EventData)

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

SET_CLIENT:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_CLIENT:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_CLIENT:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_CLIENT:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_CLIENT:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_CLIENT:OnEventKill(EventData)

Occurs on the death of a unit.

SET_CLIENT:OnEventLand(EventData)

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

SET_CLIENT:OnEventLandingAfterEjection(EventData)

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

SET_CLIENT:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_CLIENT:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_CLIENT:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_CLIENT:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_CLIENT:OnEventMissionEnd(EventData)

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

SET_CLIENT:OnEventMissionStart(EventData)

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

SET_CLIENT:OnEventNewDynamicCargo(EventData)

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

SET_CLIENT:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_CLIENT:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_CLIENT:OnEventPlayerEnterAircraft(EventData)

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

SET_CLIENT:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_CLIENT:OnEventPlayerLeaveUnit(EventData)

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

SET_CLIENT:OnEventRefueling(EventData)

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

SET_CLIENT:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_CLIENT:OnEventScore(EventData)

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

SET_CLIENT:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_CLIENT:OnEventShootingStart(EventData)

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

SET_CLIENT:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_CLIENT:OnEventTakeoff(EventData)

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

SET_CLIENT:OnEventTriggerZone(EventData)

Trigger zone.

SET_CLIENT:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_CLIENT:OnEventWeaponAdd(EventData)

Weapon add.

SET_CLIENT.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_CLIENT:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_CLIENT.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_CLIENT:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_CLIENT:SetProperty(Key, Value)

Set one property of an object.

SET_CLIENT:SetState(Object, Key, Value)

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

SET_CLIENT.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_CLIENT:T(Arguments)

Trace a function logic level 1.

SET_CLIENT:T2(Arguments)

Trace a function logic level 2.

SET_CLIENT:T3(Arguments)

Trace a function logic level 3.

SET_CLIENT:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_CLIENT:TraceClass(Class)

Set tracing for all methods of a class.

SET_CLIENT:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_CLIENT:TraceLevel(Level)

Set the highest trace level.

SET_CLIENT:TraceOff()

Set trace off.

SET_CLIENT:TraceOn()

Set trace on.

SET_CLIENT:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_CLIENT:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_CLIENT._

SET_CLIENT:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_CLIENT:_Serialize(Arguments)

(Internal) Serialize arguments

SET_CLIENT:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_CLIENT.__

SET_CLIENT:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_DYNAMICCARGO Description

SET_DYNAMICCARGO.CallScheduler

SET_DYNAMICCARGO.Filter

Filters.

SET_DYNAMICCARGO:FilterCountries(Countries, Clear)

Builds a set of dynamic cargo of defined countries.

SET_DYNAMICCARGO:FilterCrashes()

This filter is N/A for SET_DYNAMICCARGO

SET_DYNAMICCARGO:FilterCurrentOwner(PlayerName)

Builds a set of DYNAMICCARGOs that are owned at the moment by this player name.

SET_DYNAMICCARGO:FilterDeads()

This filter is N/A for SET_DYNAMICCARGO

SET_DYNAMICCARGO:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_DYNAMICCARGO:FilterIsLoaded()

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.

SET_DYNAMICCARGO:FilterIsNew()

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.NEW (i.e.

SET_DYNAMICCARGO:FilterIsUnloaded()

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.

SET_DYNAMICCARGO:FilterNamePattern(Patterns, Clear)

Builds a set of DYNAMICCARGOs that contain the given string in their name.

SET_DYNAMICCARGO:FilterOnce()

Filter the set once

SET_DYNAMICCARGO:FilterPrefixes(Prefixes, Clear)

Builds a set of DYNAMICCARGOs that contain the given string in their name.

SET_DYNAMICCARGO:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_DYNAMICCARGO:FilterStart()

Starts the filtering.

SET_DYNAMICCARGO:FilterStop()

Stops the filtering.

SET_DYNAMICCARGO:FilterTypes(Types, Clear)

Builds a set of dynamic cargo of defined dynamic cargo type names.

SET_DYNAMICCARGO:FilterZoneTimer(Seconds)

Set filter timer interval for FilterZones if using active filtering with FilterStart().

SET_DYNAMICCARGO:FilterZones(Zones, Clear)

Builds a set of dynamic cargo in zones.

SET_DYNAMICCARGO:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_DYNAMICCARGO:GetOwnerClientObjects()

Gets the clients found for the current cargo owners.

SET_DYNAMICCARGO:GetOwnerNames()

Gets the distinct player names of the current cargo owners.

SET_DYNAMICCARGO:GetStorageObjects()

Gets the storage objects associated with the cargo.

SET_DYNAMICCARGO.Index

Table of indices.

SET_DYNAMICCARGO:IsIncludeObject(DCargo)

SET_DYNAMICCARGO.List

Unused table.

SET_DYNAMICCARGO:New()

Creates a new SET_DYNAMICCARGO object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_DYNAMICCARGO.Set

Table of objects.

SET_DYNAMICCARGO.ZoneTimer

Timer for active filtering of zones.

SET_DYNAMICCARGO.ZoneTimerInterval

SET_DYNAMICCARGO:_ContinousZoneFilter()

[Internal] Private function for use of continous zone filter

SET_DYNAMICCARGO:_EventHandlerDCAdd(Event)

Handles the events for the Set.

SET_DYNAMICCARGO:_EventHandlerDCRemove(Event)

Handles the remove event for dynamic cargo set.

Fields and Methods inherited from SET_BASE Description

SET_DYNAMICCARGO:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_DYNAMICCARGO:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_DYNAMICCARGO:AddSet(SetToAdd)

Add a SET to this set.

SET_DYNAMICCARGO.CallScheduler

SET_DYNAMICCARGO:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_DYNAMICCARGO:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_DYNAMICCARGO:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_DYNAMICCARGO.Database

SET_DYNAMICCARGO.Filter

Filters

SET_DYNAMICCARGO:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_DYNAMICCARGO:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_DYNAMICCARGO:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_DYNAMICCARGO:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_DYNAMICCARGO:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_DYNAMICCARGO:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_DYNAMICCARGO:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_DYNAMICCARGO:FilterStop()

Stops the filtering for the defined collection.

SET_DYNAMICCARGO:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_DYNAMICCARGO:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_DYNAMICCARGO:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_DYNAMICCARGO:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_DYNAMICCARGO:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_DYNAMICCARGO:GetAliveSet()

Get a new set table that only contains alive objects.

SET_DYNAMICCARGO:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_DYNAMICCARGO:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_DYNAMICCARGO:GetObjectNames()

Gets a string with all the object names.

SET_DYNAMICCARGO:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_DYNAMICCARGO:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_DYNAMICCARGO:GetSet()

Gets the Set.

SET_DYNAMICCARGO:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_DYNAMICCARGO:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_DYNAMICCARGO:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_DYNAMICCARGO:GetSetObjects()

Returns a table of the Objects in the Set.

SET_DYNAMICCARGO:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_DYNAMICCARGO:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_DYNAMICCARGO:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_DYNAMICCARGO.Index

Table of indices.

SET_DYNAMICCARGO:IsInSet(Object)

Decides whether an object is in the SET

SET_DYNAMICCARGO:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_DYNAMICCARGO:IsIncludeObject(Object)

Decides whether to include the Object.

SET_DYNAMICCARGO:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_DYNAMICCARGO.List

Unused table.

SET_DYNAMICCARGO:New(Database)

Creates an empty set.

SET_DYNAMICCARGO:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_DYNAMICCARGO:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_DYNAMICCARGO:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_DYNAMICCARGO.Set

Table of objects.

SET_DYNAMICCARGO:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_DYNAMICCARGO:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_DYNAMICCARGO.SomeIteratorLimit

SET_DYNAMICCARGO:SortByName()

Sort the set by name.

SET_DYNAMICCARGO:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_DYNAMICCARGO:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_DYNAMICCARGO:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_DYNAMICCARGO:_FilterStart()

Starts the filtering for the defined collection.

SET_DYNAMICCARGO:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_DYNAMICCARGO:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_DYNAMICCARGO:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_DYNAMICCARGO:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_DYNAMICCARGO.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_DYNAMICCARGO.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_DYNAMICCARGO.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_DYNAMICCARGO.ClassName

The name of the class.

SET_DYNAMICCARGO:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_DYNAMICCARGO:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_DYNAMICCARGO:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_DYNAMICCARGO:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_DYNAMICCARGO:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_DYNAMICCARGO:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_DYNAMICCARGO:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_DYNAMICCARGO:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_DYNAMICCARGO:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_DYNAMICCARGO:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_DYNAMICCARGO:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_DYNAMICCARGO:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_DYNAMICCARGO:E(Arguments)

Log an exception which will be traced always.

SET_DYNAMICCARGO:EventDispatcher()

Returns the event dispatcher

SET_DYNAMICCARGO:EventRemoveAll()

Remove all subscribed events

SET_DYNAMICCARGO:F(Arguments)

Trace a function call.

SET_DYNAMICCARGO:F2(Arguments)

Trace a function call level 2.

SET_DYNAMICCARGO:F3(Arguments)

Trace a function call level 3.

SET_DYNAMICCARGO:GetClassID()

Get the ClassID of the class instance.

SET_DYNAMICCARGO:GetClassName()

Get the ClassName of the class instance.

SET_DYNAMICCARGO:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_DYNAMICCARGO:GetEventPriority()

Get the object's configured event priority.

SET_DYNAMICCARGO:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_DYNAMICCARGO:GetProperties()

Get all of the properties of an object in a table.

SET_DYNAMICCARGO:GetProperty(Key)

Get one property of an object by the key.

SET_DYNAMICCARGO:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_DYNAMICCARGO:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_DYNAMICCARGO:I(Arguments)

Log an information which will be traced always.

SET_DYNAMICCARGO:Inherit(Child, Parent)

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

SET_DYNAMICCARGO:IsInstanceOf(ClassName)

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

SET_DYNAMICCARGO:IsTrace()

Check whether tracing is enabled for the object.

SET_DYNAMICCARGO:New()

BASE constructor.

SET_DYNAMICCARGO:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_DYNAMICCARGO:OnEventBDA(EventData)

BDA.

SET_DYNAMICCARGO:OnEventBaseCaptured(EventData)

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

SET_DYNAMICCARGO:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_DYNAMICCARGO:OnEventCrash(EventData)

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

SET_DYNAMICCARGO:OnEventDead(EventData)

Occurs when an object is dead.

SET_DYNAMICCARGO:OnEventDetailedFailure(EventData)

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

SET_DYNAMICCARGO:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_DYNAMICCARGO:OnEventDynamicCargoLoaded(EventData)

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

SET_DYNAMICCARGO:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_DYNAMICCARGO:OnEventDynamicCargoUnloaded(EventData)

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

SET_DYNAMICCARGO:OnEventEjection(EventData)

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

SET_DYNAMICCARGO:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_DYNAMICCARGO:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_DYNAMICCARGO:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_DYNAMICCARGO:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_DYNAMICCARGO:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_DYNAMICCARGO:OnEventKill(EventData)

Occurs on the death of a unit.

SET_DYNAMICCARGO:OnEventLand(EventData)

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

SET_DYNAMICCARGO:OnEventLandingAfterEjection(EventData)

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

SET_DYNAMICCARGO:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_DYNAMICCARGO:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_DYNAMICCARGO:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_DYNAMICCARGO:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_DYNAMICCARGO:OnEventMissionEnd(EventData)

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

SET_DYNAMICCARGO:OnEventMissionStart(EventData)

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

SET_DYNAMICCARGO:OnEventNewDynamicCargo(EventData)

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

SET_DYNAMICCARGO:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_DYNAMICCARGO:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_DYNAMICCARGO:OnEventPlayerEnterAircraft(EventData)

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

SET_DYNAMICCARGO:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_DYNAMICCARGO:OnEventPlayerLeaveUnit(EventData)

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

SET_DYNAMICCARGO:OnEventRefueling(EventData)

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

SET_DYNAMICCARGO:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_DYNAMICCARGO:OnEventScore(EventData)

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

SET_DYNAMICCARGO:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_DYNAMICCARGO:OnEventShootingStart(EventData)

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

SET_DYNAMICCARGO:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_DYNAMICCARGO:OnEventTakeoff(EventData)

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

SET_DYNAMICCARGO:OnEventTriggerZone(EventData)

Trigger zone.

SET_DYNAMICCARGO:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_DYNAMICCARGO:OnEventWeaponAdd(EventData)

Weapon add.

SET_DYNAMICCARGO.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_DYNAMICCARGO:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_DYNAMICCARGO.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_DYNAMICCARGO:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_DYNAMICCARGO:SetProperty(Key, Value)

Set one property of an object.

SET_DYNAMICCARGO:SetState(Object, Key, Value)

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

SET_DYNAMICCARGO.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_DYNAMICCARGO:T(Arguments)

Trace a function logic level 1.

SET_DYNAMICCARGO:T2(Arguments)

Trace a function logic level 2.

SET_DYNAMICCARGO:T3(Arguments)

Trace a function logic level 3.

SET_DYNAMICCARGO:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_DYNAMICCARGO:TraceClass(Class)

Set tracing for all methods of a class.

SET_DYNAMICCARGO:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_DYNAMICCARGO:TraceLevel(Level)

Set the highest trace level.

SET_DYNAMICCARGO:TraceOff()

Set trace off.

SET_DYNAMICCARGO:TraceOn()

Set trace on.

SET_DYNAMICCARGO:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_DYNAMICCARGO:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_DYNAMICCARGO._

SET_DYNAMICCARGO:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_DYNAMICCARGO:_Serialize(Arguments)

(Internal) Serialize arguments

SET_DYNAMICCARGO:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_DYNAMICCARGO.__

SET_DYNAMICCARGO:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_GROUP Description

SET_GROUP:Activate(Delay)

Activate late activated groups.

SET_GROUP:AddGroup(group, DontSetCargoBayLimit)

Add a GROUP to SET_GROUP.

SET_GROUP:AddGroupsByName(AddGroupNames)

Add GROUP(s) to SET_GROUP.

SET_GROUP:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_GROUP:AllCompletelyInZone(Zone)

Iterate the SET_GROUP and return true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE

SET_GROUP:AnyCompletelyInZone(Zone)

Iterate the SET_GROUP and return true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#ZONE

SET_GROUP:AnyInZone(Zone)

Iterate the SET_GROUP and return true if at least one #UNIT of one Wrapper.Group#GROUP of the #SET_GROUP is in Core.Zone

SET_GROUP:AnyPartlyInZone(Zone)

Iterate the SET_GROUP and return true if at least one Wrapper.Group#GROUP of the #SET_GROUP is partly in Core.Zone.

SET_GROUP:CountAlive()

Iterate the SET_GROUP and count how many GROUPs and UNITs are alive.

SET_GROUP:CountInZone(Zone)

Iterate the SET_GROUP and count how many GROUPs are completely in the Zone That could easily be done with SET_GROUP:ForEachGroupCompletelyInZone(), but this function provides an easy to use shortcut...

SET_GROUP:CountUnitInZone(Zone)

Iterate the SET_GROUP and count how many UNITs are completely in the Zone

SET_GROUP:FilterActive(Active)

Includes only active groups when the activity filter is enabled.

SET_GROUP:FilterAlive()

Build a set of groups that are alive.

SET_GROUP:FilterCategories(Categories, Clear)

Builds a set of groups out of categories.

SET_GROUP:FilterCategoryAirplane()

Builds a set of groups out of airplane category.

SET_GROUP:FilterCategoryGround()

Builds a set of groups out of ground category.

SET_GROUP:FilterCategoryHelicopter()

Builds a set of groups out of helicopter category.

SET_GROUP:FilterCategoryShip()

Builds a set of groups out of ship category.

SET_GROUP:FilterCategoryStructure()

Builds a set of groups out of structure category.

SET_GROUP:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_GROUP:FilterCountries(Countries, Clear)

Builds a set of groups of defined countries.

SET_GROUP:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_GROUP:FilterOnce()

Filter the set once

SET_GROUP:FilterPrefixes(Prefixes, Clear)

Builds a set of groups that contain the given string in their group name.

SET_GROUP:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_GROUP:FilterStart()

Starts the filtering.

SET_GROUP:FilterStop()

Stops the filtering.

SET_GROUP:FilterZoneTimer(Seconds)

Set filter timer interval for FilterZones if using active filtering with FilterStart().

SET_GROUP:FilterZones(Zones, Clear)

Builds a set of groups in zones.

SET_GROUP:FindGroup(GroupName)

Finds a Group based on the Group Name.

SET_GROUP:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_GROUP:FindNearestGroupFromPointVec2(Coordinate)

Iterate the SET_GROUP while identifying the nearest object from a Core.Point#COORDINATE.

SET_GROUP:ForEachGroup(IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each GROUP object, providing the GROUP and optional parameters.

SET_GROUP:ForEachGroupAlive(IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each alive GROUP object, providing the GROUP and optional parameters.

SET_GROUP:ForEachGroupAnyInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each alive GROUP that has any unit in the Core.Zone, providing the GROUP and optional parameters to the called function.

SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Core.Zone, providing the GROUP and optional parameters to the called function.

SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Core.Zone, providing the GROUP and optional parameters to the called function.

SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Core.Zone, providing the GROUP and optional parameters to the called function.

SET_GROUP:ForSomeGroup(IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for some GROUP objects, providing the GROUP and optional parameters.

SET_GROUP:ForSomeGroupAlive(IteratorFunction, ...)

Iterate the SET_GROUP and call an iterator function for some alive GROUP objects, providing the GROUP and optional parameters.

SET_GROUP:GetAliveSet()

Get a new set table that only contains alive groups.

SET_GROUP:GetClosestGroup(Coordinate, Coalitions)

Get the closest group of the set with respect to a given reference coordinate.

SET_GROUP:GetUnitTypeNames()

Returns a report of of unit types.

SET_GROUP:IsIncludeObject(MGroup)

SET_GROUP:New()

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_GROUP:NoneInZone(Zone)

Iterate the SET_GROUP and return true if no Wrapper.Group#GROUP of the #SET_GROUP is in Core.Zone This could also be achieved with not SET_GROUP:AnyPartlyInZone(Zone), but it's easier for the mission designer to add a dedicated method

SET_GROUP:RemoveGroupsByName(RemoveGroupNames)

Remove GROUP(s) from SET_GROUP.

SET_GROUP:SetCargoBayWeightLimit()

Iterate the SET_GROUP and set for each unit the default cargo bay weight limit.

SET_GROUP.ZoneTimer

SET_GROUP.ZoneTimerInterval

SET_GROUP:_ContinousZoneFilter()

[Internal] Private function for use of continous zone filter

SET_GROUP:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive groups set.

Fields and Methods inherited from SET_BASE Description

SET_GROUP:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_GROUP:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_GROUP:AddSet(SetToAdd)

Add a SET to this set.

SET_GROUP.CallScheduler

SET_GROUP:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_GROUP:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_GROUP:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_GROUP.Database

SET_GROUP.Filter

Filters

SET_GROUP:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_GROUP:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_GROUP:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_GROUP:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_GROUP:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_GROUP:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_GROUP:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_GROUP:FilterStop()

Stops the filtering for the defined collection.

SET_GROUP:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_GROUP:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_GROUP:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_GROUP:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_GROUP:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_GROUP:GetAliveSet()

Get a new set table that only contains alive objects.

SET_GROUP:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_GROUP:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_GROUP:GetObjectNames()

Gets a string with all the object names.

SET_GROUP:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_GROUP:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_GROUP:GetSet()

Gets the Set.

SET_GROUP:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_GROUP:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_GROUP:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_GROUP:GetSetObjects()

Returns a table of the Objects in the Set.

SET_GROUP:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_GROUP:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_GROUP:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_GROUP.Index

Table of indices.

SET_GROUP:IsInSet(Object)

Decides whether an object is in the SET

SET_GROUP:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_GROUP:IsIncludeObject(Object)

Decides whether to include the Object.

SET_GROUP:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_GROUP.List

Unused table.

SET_GROUP:New(Database)

Creates an empty set.

SET_GROUP:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_GROUP:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_GROUP:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_GROUP.Set

Table of objects.

SET_GROUP:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_GROUP:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_GROUP.SomeIteratorLimit

SET_GROUP:SortByName()

Sort the set by name.

SET_GROUP:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_GROUP:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_GROUP:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_GROUP:_FilterStart()

Starts the filtering for the defined collection.

SET_GROUP:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_GROUP:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_GROUP:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_GROUP:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_GROUP.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_GROUP.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_GROUP.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_GROUP.ClassName

The name of the class.

SET_GROUP:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_GROUP:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_GROUP:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_GROUP:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_GROUP:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_GROUP:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_GROUP:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_GROUP:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_GROUP:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_GROUP:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_GROUP:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_GROUP:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_GROUP:E(Arguments)

Log an exception which will be traced always.

SET_GROUP:EventDispatcher()

Returns the event dispatcher

SET_GROUP:EventRemoveAll()

Remove all subscribed events

SET_GROUP:F(Arguments)

Trace a function call.

SET_GROUP:F2(Arguments)

Trace a function call level 2.

SET_GROUP:F3(Arguments)

Trace a function call level 3.

SET_GROUP:GetClassID()

Get the ClassID of the class instance.

SET_GROUP:GetClassName()

Get the ClassName of the class instance.

SET_GROUP:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_GROUP:GetEventPriority()

Get the object's configured event priority.

SET_GROUP:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_GROUP:GetProperties()

Get all of the properties of an object in a table.

SET_GROUP:GetProperty(Key)

Get one property of an object by the key.

SET_GROUP:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_GROUP:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_GROUP:I(Arguments)

Log an information which will be traced always.

SET_GROUP:Inherit(Child, Parent)

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

SET_GROUP:IsInstanceOf(ClassName)

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

SET_GROUP:IsTrace()

Check whether tracing is enabled for the object.

SET_GROUP:New()

BASE constructor.

SET_GROUP:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_GROUP:OnEventBDA(EventData)

BDA.

SET_GROUP:OnEventBaseCaptured(EventData)

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

SET_GROUP:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_GROUP:OnEventCrash(EventData)

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

SET_GROUP:OnEventDead(EventData)

Occurs when an object is dead.

SET_GROUP:OnEventDetailedFailure(EventData)

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

SET_GROUP:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_GROUP:OnEventDynamicCargoLoaded(EventData)

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

SET_GROUP:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_GROUP:OnEventDynamicCargoUnloaded(EventData)

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

SET_GROUP:OnEventEjection(EventData)

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

SET_GROUP:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_GROUP:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_GROUP:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_GROUP:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_GROUP:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_GROUP:OnEventKill(EventData)

Occurs on the death of a unit.

SET_GROUP:OnEventLand(EventData)

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

SET_GROUP:OnEventLandingAfterEjection(EventData)

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

SET_GROUP:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_GROUP:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_GROUP:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_GROUP:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_GROUP:OnEventMissionEnd(EventData)

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

SET_GROUP:OnEventMissionStart(EventData)

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

SET_GROUP:OnEventNewDynamicCargo(EventData)

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

SET_GROUP:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_GROUP:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_GROUP:OnEventPlayerEnterAircraft(EventData)

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

SET_GROUP:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_GROUP:OnEventPlayerLeaveUnit(EventData)

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

SET_GROUP:OnEventRefueling(EventData)

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

SET_GROUP:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_GROUP:OnEventScore(EventData)

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

SET_GROUP:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_GROUP:OnEventShootingStart(EventData)

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

SET_GROUP:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_GROUP:OnEventTakeoff(EventData)

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

SET_GROUP:OnEventTriggerZone(EventData)

Trigger zone.

SET_GROUP:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_GROUP:OnEventWeaponAdd(EventData)

Weapon add.

SET_GROUP.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_GROUP:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_GROUP.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_GROUP:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_GROUP:SetProperty(Key, Value)

Set one property of an object.

SET_GROUP:SetState(Object, Key, Value)

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

SET_GROUP.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_GROUP:T(Arguments)

Trace a function logic level 1.

SET_GROUP:T2(Arguments)

Trace a function logic level 2.

SET_GROUP:T3(Arguments)

Trace a function logic level 3.

SET_GROUP:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_GROUP:TraceClass(Class)

Set tracing for all methods of a class.

SET_GROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_GROUP:TraceLevel(Level)

Set the highest trace level.

SET_GROUP:TraceOff()

Set trace off.

SET_GROUP:TraceOn()

Set trace on.

SET_GROUP:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_GROUP:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_GROUP._

SET_GROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_GROUP:_Serialize(Arguments)

(Internal) Serialize arguments

SET_GROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_GROUP.__

SET_GROUP:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_OPSGROUP Description

SET_OPSGROUP:Activate(Delay)

Activate late activated groups in the set.

SET_OPSGROUP:Add(ObjectName, Object)

Adds a GROUP or OPSGROUP object in the Core.Set#SET_OPSGROUP, using a given ObjectName as the index.

SET_OPSGROUP:AddGroup(group)

Add a GROUP or OPSGROUP object to the set.

SET_OPSGROUP:AddGroupsByName(AddGroupNames)

Add GROUP(s) or OPSGROUP(s) to the set.

SET_OPSGROUP:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_OPSGROUP:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_OPSGROUP:CountAlive()

Iterate the SET_OPSGROUP and count how many GROUPs and UNITs are alive.

SET_OPSGROUP:FilterActive(Active)

Includes only active groups when the activity filter is enabled.

SET_OPSGROUP:FilterCategories(Categories, Clear)

Builds a set of groups out of categories.

SET_OPSGROUP:FilterCategoryAircraft()

Builds a set of groups out of aicraft category (planes and helicopters).

SET_OPSGROUP:FilterCategoryAirplane()

Builds a set of groups out of airplane category.

SET_OPSGROUP:FilterCategoryGround()

Builds a set of groups out of ground category.

SET_OPSGROUP:FilterCategoryHelicopter()

Builds a set of groups out of helicopter category.

SET_OPSGROUP:FilterCategoryShip()

Builds a set of groups out of ship category.

SET_OPSGROUP:FilterCountries(Countries, Clear)

Builds a set of groups of defined countries.

SET_OPSGROUP:FilterPrefixes(Prefixes, Clear)

Builds a set of groups that contain the given string in their group name.

SET_OPSGROUP:FilterStart()

Starts the filtering.

SET_OPSGROUP:FilterStop()

Stops the filtering.

SET_OPSGROUP:FindArmyGroup(GroupName)

Finds a ARMYGROUP based on the group name.

SET_OPSGROUP:FindFlightGroup(GroupName)

Finds a FLIGHTGROUP based on the group name.

SET_OPSGROUP:FindGroup(GroupName)

Finds an OPSGROUP based on the group name.

SET_OPSGROUP:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_OPSGROUP:FindNavyGroup(GroupName)

Finds a NAVYGROUP based on the group name.

SET_OPSGROUP:ForEachGroup(IteratorFunction, ...)

Iterate the set and call an iterator function for each OPSGROUP object.

SET_OPSGROUP:GetAliveSet()

Gets a new set that only contains alive groups.

SET_OPSGROUP:IsIncludeObject(MGroup)

Check include object.

SET_OPSGROUP:New()

Creates a new SET_OPSGROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_OPSGROUP:RemoveGroupsByName(RemoveGroupNames)

Remove GROUP(s) or OPSGROUP(s) from the set.

SET_OPSGROUP:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_OPSGROUP:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive groups set.

Fields and Methods inherited from SET_BASE Description

SET_OPSGROUP:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_OPSGROUP:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_OPSGROUP:AddSet(SetToAdd)

Add a SET to this set.

SET_OPSGROUP.CallScheduler

SET_OPSGROUP:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_OPSGROUP:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_OPSGROUP:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_OPSGROUP.Database

SET_OPSGROUP.Filter

Filters

SET_OPSGROUP:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_OPSGROUP:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_OPSGROUP:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_OPSGROUP:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_OPSGROUP:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_OPSGROUP:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_OPSGROUP:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_OPSGROUP:FilterStop()

Stops the filtering for the defined collection.

SET_OPSGROUP:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_OPSGROUP:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_OPSGROUP:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_OPSGROUP:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_OPSGROUP:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_OPSGROUP:GetAliveSet()

Get a new set table that only contains alive objects.

SET_OPSGROUP:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_OPSGROUP:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_OPSGROUP:GetObjectNames()

Gets a string with all the object names.

SET_OPSGROUP:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_OPSGROUP:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_OPSGROUP:GetSet()

Gets the Set.

SET_OPSGROUP:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_OPSGROUP:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_OPSGROUP:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_OPSGROUP:GetSetObjects()

Returns a table of the Objects in the Set.

SET_OPSGROUP:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_OPSGROUP:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_OPSGROUP:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_OPSGROUP.Index

Table of indices.

SET_OPSGROUP:IsInSet(Object)

Decides whether an object is in the SET

SET_OPSGROUP:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_OPSGROUP:IsIncludeObject(Object)

Decides whether to include the Object.

SET_OPSGROUP:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_OPSGROUP.List

Unused table.

SET_OPSGROUP:New(Database)

Creates an empty set.

SET_OPSGROUP:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_OPSGROUP:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_OPSGROUP:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_OPSGROUP.Set

Table of objects.

SET_OPSGROUP:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_OPSGROUP:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_OPSGROUP.SomeIteratorLimit

SET_OPSGROUP:SortByName()

Sort the set by name.

SET_OPSGROUP:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_OPSGROUP:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_OPSGROUP:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_OPSGROUP:_FilterStart()

Starts the filtering for the defined collection.

SET_OPSGROUP:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_OPSGROUP:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_OPSGROUP:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_OPSGROUP:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_OPSGROUP.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_OPSGROUP.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_OPSGROUP.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_OPSGROUP.ClassName

The name of the class.

SET_OPSGROUP:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_OPSGROUP:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_OPSGROUP:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_OPSGROUP:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_OPSGROUP:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_OPSGROUP:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_OPSGROUP:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_OPSGROUP:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_OPSGROUP:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_OPSGROUP:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_OPSGROUP:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_OPSGROUP:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_OPSGROUP:E(Arguments)

Log an exception which will be traced always.

SET_OPSGROUP:EventDispatcher()

Returns the event dispatcher

SET_OPSGROUP:EventRemoveAll()

Remove all subscribed events

SET_OPSGROUP:F(Arguments)

Trace a function call.

SET_OPSGROUP:F2(Arguments)

Trace a function call level 2.

SET_OPSGROUP:F3(Arguments)

Trace a function call level 3.

SET_OPSGROUP:GetClassID()

Get the ClassID of the class instance.

SET_OPSGROUP:GetClassName()

Get the ClassName of the class instance.

SET_OPSGROUP:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_OPSGROUP:GetEventPriority()

Get the object's configured event priority.

SET_OPSGROUP:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_OPSGROUP:GetProperties()

Get all of the properties of an object in a table.

SET_OPSGROUP:GetProperty(Key)

Get one property of an object by the key.

SET_OPSGROUP:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_OPSGROUP:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_OPSGROUP:I(Arguments)

Log an information which will be traced always.

SET_OPSGROUP:Inherit(Child, Parent)

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

SET_OPSGROUP:IsInstanceOf(ClassName)

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

SET_OPSGROUP:IsTrace()

Check whether tracing is enabled for the object.

SET_OPSGROUP:New()

BASE constructor.

SET_OPSGROUP:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_OPSGROUP:OnEventBDA(EventData)

BDA.

SET_OPSGROUP:OnEventBaseCaptured(EventData)

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

SET_OPSGROUP:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_OPSGROUP:OnEventCrash(EventData)

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

SET_OPSGROUP:OnEventDead(EventData)

Occurs when an object is dead.

SET_OPSGROUP:OnEventDetailedFailure(EventData)

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

SET_OPSGROUP:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_OPSGROUP:OnEventDynamicCargoLoaded(EventData)

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

SET_OPSGROUP:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_OPSGROUP:OnEventDynamicCargoUnloaded(EventData)

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

SET_OPSGROUP:OnEventEjection(EventData)

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

SET_OPSGROUP:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_OPSGROUP:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_OPSGROUP:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_OPSGROUP:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_OPSGROUP:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_OPSGROUP:OnEventKill(EventData)

Occurs on the death of a unit.

SET_OPSGROUP:OnEventLand(EventData)

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

SET_OPSGROUP:OnEventLandingAfterEjection(EventData)

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

SET_OPSGROUP:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_OPSGROUP:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_OPSGROUP:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_OPSGROUP:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_OPSGROUP:OnEventMissionEnd(EventData)

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

SET_OPSGROUP:OnEventMissionStart(EventData)

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

SET_OPSGROUP:OnEventNewDynamicCargo(EventData)

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

SET_OPSGROUP:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_OPSGROUP:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_OPSGROUP:OnEventPlayerEnterAircraft(EventData)

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

SET_OPSGROUP:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_OPSGROUP:OnEventPlayerLeaveUnit(EventData)

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

SET_OPSGROUP:OnEventRefueling(EventData)

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

SET_OPSGROUP:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_OPSGROUP:OnEventScore(EventData)

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

SET_OPSGROUP:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_OPSGROUP:OnEventShootingStart(EventData)

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

SET_OPSGROUP:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_OPSGROUP:OnEventTakeoff(EventData)

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

SET_OPSGROUP:OnEventTriggerZone(EventData)

Trigger zone.

SET_OPSGROUP:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_OPSGROUP:OnEventWeaponAdd(EventData)

Weapon add.

SET_OPSGROUP.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_OPSGROUP:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_OPSGROUP.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_OPSGROUP:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_OPSGROUP:SetProperty(Key, Value)

Set one property of an object.

SET_OPSGROUP:SetState(Object, Key, Value)

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

SET_OPSGROUP.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_OPSGROUP:T(Arguments)

Trace a function logic level 1.

SET_OPSGROUP:T2(Arguments)

Trace a function logic level 2.

SET_OPSGROUP:T3(Arguments)

Trace a function logic level 3.

SET_OPSGROUP:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_OPSGROUP:TraceClass(Class)

Set tracing for all methods of a class.

SET_OPSGROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_OPSGROUP:TraceLevel(Level)

Set the highest trace level.

SET_OPSGROUP:TraceOff()

Set trace off.

SET_OPSGROUP:TraceOn()

Set trace on.

SET_OPSGROUP:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_OPSGROUP:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_OPSGROUP._

SET_OPSGROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_OPSGROUP:_Serialize(Arguments)

(Internal) Serialize arguments

SET_OPSGROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_OPSGROUP.__

SET_OPSGROUP:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_OPSZONE Description

SET_OPSZONE:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_OPSZONE:AddZone(Zone)

Add an OPSZONE to set.

SET_OPSZONE:FilterClear()

Clear all filters.

SET_OPSZONE:FilterOnce()

Filter the set once

SET_OPSZONE:FilterPrefixes(Prefixes, Clear)

Builds a set of OPSZONEs that contain the given string in their name.

SET_OPSZONE:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_OPSZONE:FilterStart()

Starts the filtering.

SET_OPSZONE:FilterStop()

Stops the filtering for the defined collection.

SET_OPSZONE:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_OPSZONE:FindZone(ZoneName)

Finds a Zone based on its name.

SET_OPSZONE:ForEachZone(IteratorFunction, ...)

Iterate the SET_OPSZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters.

SET_OPSZONE:GetClosestZone(Coordinate, Coalitions)

Get the closest OPSZONE from a given reference coordinate.

SET_OPSZONE:GetRandomZone(margin)

Get a random zone from the set.

SET_OPSZONE:IsCoordinateInZone(Coordinate)

Validate if a coordinate is in one of the zones in the set.

SET_OPSZONE:IsIncludeObject(MZone)

Private function that checks if an object is contained in the set or filtered.

SET_OPSZONE:New()

Creates a new SET_OPSZONE object, building a set of zones.

SET_OPSZONE:OnEventDeleteZoneGoal(EventData)

Handles the DeleteZoneGoal event and removes the deleted OPSZONE from the set, unless the zone has NoDestroy set.

SET_OPSZONE:OnEventNewZoneGoal(EventData)

Handles the NewZoneGoal event for the Set.

SET_OPSZONE:RemoveZonesByName(RemoveZoneNames)

Remove ZONEs from SET_OPSZONE.

SET_OPSZONE:SetZoneProbability(ZoneName, Probability)

Set a zone probability.

SET_OPSZONE:Start()

Start all opszones of the set.

Fields and Methods inherited from SET_BASE Description

SET_OPSZONE:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_OPSZONE:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_OPSZONE:AddSet(SetToAdd)

Add a SET to this set.

SET_OPSZONE.CallScheduler

SET_OPSZONE:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_OPSZONE:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_OPSZONE:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_OPSZONE.Database

SET_OPSZONE.Filter

Filters

SET_OPSZONE:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_OPSZONE:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_OPSZONE:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_OPSZONE:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_OPSZONE:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_OPSZONE:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_OPSZONE:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_OPSZONE:FilterStop()

Stops the filtering for the defined collection.

SET_OPSZONE:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_OPSZONE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_OPSZONE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_OPSZONE:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_OPSZONE:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_OPSZONE:GetAliveSet()

Get a new set table that only contains alive objects.

SET_OPSZONE:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_OPSZONE:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_OPSZONE:GetObjectNames()

Gets a string with all the object names.

SET_OPSZONE:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_OPSZONE:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_OPSZONE:GetSet()

Gets the Set.

SET_OPSZONE:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_OPSZONE:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_OPSZONE:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_OPSZONE:GetSetObjects()

Returns a table of the Objects in the Set.

SET_OPSZONE:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_OPSZONE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_OPSZONE:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_OPSZONE.Index

Table of indices.

SET_OPSZONE:IsInSet(Object)

Decides whether an object is in the SET

SET_OPSZONE:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_OPSZONE:IsIncludeObject(Object)

Decides whether to include the Object.

SET_OPSZONE:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_OPSZONE.List

Unused table.

SET_OPSZONE:New(Database)

Creates an empty set.

SET_OPSZONE:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_OPSZONE:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_OPSZONE:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_OPSZONE.Set

Table of objects.

SET_OPSZONE:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_OPSZONE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_OPSZONE.SomeIteratorLimit

SET_OPSZONE:SortByName()

Sort the set by name.

SET_OPSZONE:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_OPSZONE:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_OPSZONE:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_OPSZONE:_FilterStart()

Starts the filtering for the defined collection.

SET_OPSZONE:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_OPSZONE:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_OPSZONE:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_OPSZONE:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_OPSZONE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_OPSZONE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_OPSZONE.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_OPSZONE.ClassName

The name of the class.

SET_OPSZONE:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_OPSZONE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_OPSZONE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_OPSZONE:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_OPSZONE:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_OPSZONE:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_OPSZONE:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_OPSZONE:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_OPSZONE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_OPSZONE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_OPSZONE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_OPSZONE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_OPSZONE:E(Arguments)

Log an exception which will be traced always.

SET_OPSZONE:EventDispatcher()

Returns the event dispatcher

SET_OPSZONE:EventRemoveAll()

Remove all subscribed events

SET_OPSZONE:F(Arguments)

Trace a function call.

SET_OPSZONE:F2(Arguments)

Trace a function call level 2.

SET_OPSZONE:F3(Arguments)

Trace a function call level 3.

SET_OPSZONE:GetClassID()

Get the ClassID of the class instance.

SET_OPSZONE:GetClassName()

Get the ClassName of the class instance.

SET_OPSZONE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_OPSZONE:GetEventPriority()

Get the object's configured event priority.

SET_OPSZONE:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_OPSZONE:GetProperties()

Get all of the properties of an object in a table.

SET_OPSZONE:GetProperty(Key)

Get one property of an object by the key.

SET_OPSZONE:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_OPSZONE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_OPSZONE:I(Arguments)

Log an information which will be traced always.

SET_OPSZONE:Inherit(Child, Parent)

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

SET_OPSZONE:IsInstanceOf(ClassName)

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

SET_OPSZONE:IsTrace()

Check whether tracing is enabled for the object.

SET_OPSZONE:New()

BASE constructor.

SET_OPSZONE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_OPSZONE:OnEventBDA(EventData)

BDA.

SET_OPSZONE:OnEventBaseCaptured(EventData)

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

SET_OPSZONE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_OPSZONE:OnEventCrash(EventData)

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

SET_OPSZONE:OnEventDead(EventData)

Occurs when an object is dead.

SET_OPSZONE:OnEventDetailedFailure(EventData)

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

SET_OPSZONE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_OPSZONE:OnEventDynamicCargoLoaded(EventData)

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

SET_OPSZONE:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_OPSZONE:OnEventDynamicCargoUnloaded(EventData)

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

SET_OPSZONE:OnEventEjection(EventData)

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

SET_OPSZONE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_OPSZONE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_OPSZONE:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_OPSZONE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_OPSZONE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_OPSZONE:OnEventKill(EventData)

Occurs on the death of a unit.

SET_OPSZONE:OnEventLand(EventData)

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

SET_OPSZONE:OnEventLandingAfterEjection(EventData)

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

SET_OPSZONE:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_OPSZONE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_OPSZONE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_OPSZONE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_OPSZONE:OnEventMissionEnd(EventData)

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

SET_OPSZONE:OnEventMissionStart(EventData)

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

SET_OPSZONE:OnEventNewDynamicCargo(EventData)

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

SET_OPSZONE:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_OPSZONE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_OPSZONE:OnEventPlayerEnterAircraft(EventData)

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

SET_OPSZONE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_OPSZONE:OnEventPlayerLeaveUnit(EventData)

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

SET_OPSZONE:OnEventRefueling(EventData)

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

SET_OPSZONE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_OPSZONE:OnEventScore(EventData)

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

SET_OPSZONE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_OPSZONE:OnEventShootingStart(EventData)

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

SET_OPSZONE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_OPSZONE:OnEventTakeoff(EventData)

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

SET_OPSZONE:OnEventTriggerZone(EventData)

Trigger zone.

SET_OPSZONE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_OPSZONE:OnEventWeaponAdd(EventData)

Weapon add.

SET_OPSZONE.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_OPSZONE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_OPSZONE.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_OPSZONE:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_OPSZONE:SetProperty(Key, Value)

Set one property of an object.

SET_OPSZONE:SetState(Object, Key, Value)

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

SET_OPSZONE.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_OPSZONE:T(Arguments)

Trace a function logic level 1.

SET_OPSZONE:T2(Arguments)

Trace a function logic level 2.

SET_OPSZONE:T3(Arguments)

Trace a function logic level 3.

SET_OPSZONE:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_OPSZONE:TraceClass(Class)

Set tracing for all methods of a class.

SET_OPSZONE:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_OPSZONE:TraceLevel(Level)

Set the highest trace level.

SET_OPSZONE:TraceOff()

Set trace off.

SET_OPSZONE:TraceOn()

Set trace on.

SET_OPSZONE:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_OPSZONE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_OPSZONE._

SET_OPSZONE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_OPSZONE:_Serialize(Arguments)

(Internal) Serialize arguments

SET_OPSZONE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_OPSZONE.__

SET_OPSZONE:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_PLAYER Description

SET_PLAYER:AddClientsByName(AddClientNames)

Add CLIENT(s) to SET_PLAYER.

SET_PLAYER:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_PLAYER:FilterCategories(Categories)

Builds a set of clients out of categories joined by players.

SET_PLAYER:FilterCountries(Countries)

Builds a set of clients of defined countries.

SET_PLAYER:FilterPrefixes(Prefixes)

Builds a set of PLAYERs that contain the given string in their unit/pilot name.

SET_PLAYER:FilterStart()

Starts the filtering.

SET_PLAYER:FilterTypes(Types)

Builds a set of clients of defined client types joined by players.

SET_PLAYER:FilterZones(Zones)

Builds a set of players in zones.

SET_PLAYER:FindClient(PlayerName)

Finds a Client based on the Player Name.

SET_PLAYER:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_PLAYER:ForEachPlayer(IteratorFunction, ...)

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT, providing the CLIENT and optional parameters.

SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Core.Zone, providing the CLIENT and optional parameters to the called function.

SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Core.Zone, providing the CLIENT and optional parameters to the called function.

SET_PLAYER:IsIncludeObject(MClient)

SET_PLAYER:New()

Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_PLAYER:RemoveClientsByName(RemoveClientNames)

Remove CLIENT(s) from SET_PLAYER.

Fields and Methods inherited from SET_BASE Description

SET_PLAYER:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_PLAYER:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_PLAYER:AddSet(SetToAdd)

Add a SET to this set.

SET_PLAYER.CallScheduler

SET_PLAYER:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_PLAYER:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_PLAYER:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_PLAYER.Database

SET_PLAYER.Filter

Filters

SET_PLAYER:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_PLAYER:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_PLAYER:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_PLAYER:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_PLAYER:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_PLAYER:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_PLAYER:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_PLAYER:FilterStop()

Stops the filtering for the defined collection.

SET_PLAYER:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_PLAYER:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_PLAYER:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_PLAYER:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_PLAYER:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_PLAYER:GetAliveSet()

Get a new set table that only contains alive objects.

SET_PLAYER:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_PLAYER:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_PLAYER:GetObjectNames()

Gets a string with all the object names.

SET_PLAYER:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_PLAYER:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_PLAYER:GetSet()

Gets the Set.

SET_PLAYER:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_PLAYER:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_PLAYER:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_PLAYER:GetSetObjects()

Returns a table of the Objects in the Set.

SET_PLAYER:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_PLAYER:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_PLAYER:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_PLAYER.Index

Table of indices.

SET_PLAYER:IsInSet(Object)

Decides whether an object is in the SET

SET_PLAYER:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_PLAYER:IsIncludeObject(Object)

Decides whether to include the Object.

SET_PLAYER:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_PLAYER.List

Unused table.

SET_PLAYER:New(Database)

Creates an empty set.

SET_PLAYER:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_PLAYER:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_PLAYER:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_PLAYER.Set

Table of objects.

SET_PLAYER:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_PLAYER:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_PLAYER.SomeIteratorLimit

SET_PLAYER:SortByName()

Sort the set by name.

SET_PLAYER:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_PLAYER:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_PLAYER:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_PLAYER:_FilterStart()

Starts the filtering for the defined collection.

SET_PLAYER:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_PLAYER:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_PLAYER:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_PLAYER:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_PLAYER.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_PLAYER.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_PLAYER.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_PLAYER.ClassName

The name of the class.

SET_PLAYER:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_PLAYER:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_PLAYER:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_PLAYER:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_PLAYER:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_PLAYER:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_PLAYER:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_PLAYER:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_PLAYER:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_PLAYER:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_PLAYER:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_PLAYER:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_PLAYER:E(Arguments)

Log an exception which will be traced always.

SET_PLAYER:EventDispatcher()

Returns the event dispatcher

SET_PLAYER:EventRemoveAll()

Remove all subscribed events

SET_PLAYER:F(Arguments)

Trace a function call.

SET_PLAYER:F2(Arguments)

Trace a function call level 2.

SET_PLAYER:F3(Arguments)

Trace a function call level 3.

SET_PLAYER:GetClassID()

Get the ClassID of the class instance.

SET_PLAYER:GetClassName()

Get the ClassName of the class instance.

SET_PLAYER:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_PLAYER:GetEventPriority()

Get the object's configured event priority.

SET_PLAYER:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_PLAYER:GetProperties()

Get all of the properties of an object in a table.

SET_PLAYER:GetProperty(Key)

Get one property of an object by the key.

SET_PLAYER:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_PLAYER:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_PLAYER:I(Arguments)

Log an information which will be traced always.

SET_PLAYER:Inherit(Child, Parent)

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

SET_PLAYER:IsInstanceOf(ClassName)

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

SET_PLAYER:IsTrace()

Check whether tracing is enabled for the object.

SET_PLAYER:New()

BASE constructor.

SET_PLAYER:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_PLAYER:OnEventBDA(EventData)

BDA.

SET_PLAYER:OnEventBaseCaptured(EventData)

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

SET_PLAYER:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_PLAYER:OnEventCrash(EventData)

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

SET_PLAYER:OnEventDead(EventData)

Occurs when an object is dead.

SET_PLAYER:OnEventDetailedFailure(EventData)

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

SET_PLAYER:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_PLAYER:OnEventDynamicCargoLoaded(EventData)

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

SET_PLAYER:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_PLAYER:OnEventDynamicCargoUnloaded(EventData)

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

SET_PLAYER:OnEventEjection(EventData)

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

SET_PLAYER:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_PLAYER:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_PLAYER:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_PLAYER:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_PLAYER:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_PLAYER:OnEventKill(EventData)

Occurs on the death of a unit.

SET_PLAYER:OnEventLand(EventData)

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

SET_PLAYER:OnEventLandingAfterEjection(EventData)

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

SET_PLAYER:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_PLAYER:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_PLAYER:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_PLAYER:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_PLAYER:OnEventMissionEnd(EventData)

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

SET_PLAYER:OnEventMissionStart(EventData)

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

SET_PLAYER:OnEventNewDynamicCargo(EventData)

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

SET_PLAYER:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_PLAYER:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_PLAYER:OnEventPlayerEnterAircraft(EventData)

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

SET_PLAYER:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_PLAYER:OnEventPlayerLeaveUnit(EventData)

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

SET_PLAYER:OnEventRefueling(EventData)

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

SET_PLAYER:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_PLAYER:OnEventScore(EventData)

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

SET_PLAYER:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_PLAYER:OnEventShootingStart(EventData)

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

SET_PLAYER:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_PLAYER:OnEventTakeoff(EventData)

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

SET_PLAYER:OnEventTriggerZone(EventData)

Trigger zone.

SET_PLAYER:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_PLAYER:OnEventWeaponAdd(EventData)

Weapon add.

SET_PLAYER.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_PLAYER:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_PLAYER.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_PLAYER:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_PLAYER:SetProperty(Key, Value)

Set one property of an object.

SET_PLAYER:SetState(Object, Key, Value)

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

SET_PLAYER.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_PLAYER:T(Arguments)

Trace a function logic level 1.

SET_PLAYER:T2(Arguments)

Trace a function logic level 2.

SET_PLAYER:T3(Arguments)

Trace a function logic level 3.

SET_PLAYER:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_PLAYER:TraceClass(Class)

Set tracing for all methods of a class.

SET_PLAYER:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_PLAYER:TraceLevel(Level)

Set the highest trace level.

SET_PLAYER:TraceOff()

Set trace off.

SET_PLAYER:TraceOn()

Set trace on.

SET_PLAYER:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_PLAYER:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_PLAYER._

SET_PLAYER:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_PLAYER:_Serialize(Arguments)

(Internal) Serialize arguments

SET_PLAYER:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_PLAYER.__

SET_PLAYER:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_SCENERY Description

SET_SCENERY:AddScenery(AddScenery)

Add SCENERY(s) to SET_SCENERY.

SET_SCENERY:AddSceneryByName(AddSceneryNames)

Add SCENERY(s) to SET_SCENERY.

SET_SCENERY:CountAlive()

Iterate the SET_SCENERY and count how many SCENERYSs are alive.

SET_SCENERY:FilterOnce()

Applies the current criteria to the scenery already collected in this set.

SET_SCENERY:FilterPrefixes(Prefixes, Clear)

Builds a set of SCENERYs that contain the given string in their name.

SET_SCENERY:FilterRoles(Role, Clear)

Builds a set of SCENERYs that contain an exact match of the "ROLE" property.

SET_SCENERY:FilterZones(Zones, Clear)

Builds a set of scenery objects in zones.

SET_SCENERY:FindScenery(SceneryName)

Finds a Scenery in the SET, based on the Scenery Name.

SET_SCENERY:ForEachScenery(IteratorFunction, ...)

Iterate the SET_SCENERY and call an iterator function for each alive SCENERY, providing the SCENERY and optional parameters.

SET_SCENERY:GetAliveSet()

Get a table of alive objects.

SET_SCENERY:GetCoordinate()

Get the center coordinate of the SET_SCENERY.

SET_SCENERY:GetLife()

Count overall current lifepoints of the SET objects.

SET_SCENERY:GetLife0()

Count overall initial (Life0) lifepoints of the SET objects.

SET_SCENERY:GetRelativeLife()

Calculate current relative lifepoints of the SET objects, i.e.

SET_SCENERY:IsIncludeObject(MScenery)

[Internal] Determine if an object is to be included in the SET

SET_SCENERY:New(ZoneSet)

Creates a new SET_SCENERY object.

SET_SCENERY:NewFromZone(Zone, HasKey)

Creates a new SET_SCENERY object.

SET_SCENERY:RemoveSceneryByName(RemoveSceneryNames)

Remove SCENERY(s) from SET_SCENERY.

Fields and Methods inherited from SET_BASE Description

SET_SCENERY:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_SCENERY:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_SCENERY:AddSet(SetToAdd)

Add a SET to this set.

SET_SCENERY.CallScheduler

SET_SCENERY:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_SCENERY:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_SCENERY:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_SCENERY.Database

SET_SCENERY.Filter

Filters

SET_SCENERY:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_SCENERY:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_SCENERY:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_SCENERY:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_SCENERY:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_SCENERY:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_SCENERY:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_SCENERY:FilterStop()

Stops the filtering for the defined collection.

SET_SCENERY:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_SCENERY:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_SCENERY:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_SCENERY:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_SCENERY:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_SCENERY:GetAliveSet()

Get a new set table that only contains alive objects.

SET_SCENERY:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_SCENERY:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_SCENERY:GetObjectNames()

Gets a string with all the object names.

SET_SCENERY:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_SCENERY:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_SCENERY:GetSet()

Gets the Set.

SET_SCENERY:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_SCENERY:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_SCENERY:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_SCENERY:GetSetObjects()

Returns a table of the Objects in the Set.

SET_SCENERY:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_SCENERY:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_SCENERY:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_SCENERY.Index

Table of indices.

SET_SCENERY:IsInSet(Object)

Decides whether an object is in the SET

SET_SCENERY:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_SCENERY:IsIncludeObject(Object)

Decides whether to include the Object.

SET_SCENERY:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_SCENERY.List

Unused table.

SET_SCENERY:New(Database)

Creates an empty set.

SET_SCENERY:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_SCENERY:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_SCENERY:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_SCENERY.Set

Table of objects.

SET_SCENERY:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_SCENERY:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_SCENERY.SomeIteratorLimit

SET_SCENERY:SortByName()

Sort the set by name.

SET_SCENERY:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_SCENERY:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_SCENERY:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_SCENERY:_FilterStart()

Starts the filtering for the defined collection.

SET_SCENERY:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_SCENERY:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_SCENERY:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_SCENERY:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_SCENERY.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_SCENERY.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_SCENERY.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_SCENERY.ClassName

The name of the class.

SET_SCENERY:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_SCENERY:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_SCENERY:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_SCENERY:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_SCENERY:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_SCENERY:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_SCENERY:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_SCENERY:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_SCENERY:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_SCENERY:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_SCENERY:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_SCENERY:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_SCENERY:E(Arguments)

Log an exception which will be traced always.

SET_SCENERY:EventDispatcher()

Returns the event dispatcher

SET_SCENERY:EventRemoveAll()

Remove all subscribed events

SET_SCENERY:F(Arguments)

Trace a function call.

SET_SCENERY:F2(Arguments)

Trace a function call level 2.

SET_SCENERY:F3(Arguments)

Trace a function call level 3.

SET_SCENERY:GetClassID()

Get the ClassID of the class instance.

SET_SCENERY:GetClassName()

Get the ClassName of the class instance.

SET_SCENERY:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_SCENERY:GetEventPriority()

Get the object's configured event priority.

SET_SCENERY:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_SCENERY:GetProperties()

Get all of the properties of an object in a table.

SET_SCENERY:GetProperty(Key)

Get one property of an object by the key.

SET_SCENERY:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_SCENERY:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_SCENERY:I(Arguments)

Log an information which will be traced always.

SET_SCENERY:Inherit(Child, Parent)

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

SET_SCENERY:IsInstanceOf(ClassName)

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

SET_SCENERY:IsTrace()

Check whether tracing is enabled for the object.

SET_SCENERY:New()

BASE constructor.

SET_SCENERY:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_SCENERY:OnEventBDA(EventData)

BDA.

SET_SCENERY:OnEventBaseCaptured(EventData)

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

SET_SCENERY:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_SCENERY:OnEventCrash(EventData)

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

SET_SCENERY:OnEventDead(EventData)

Occurs when an object is dead.

SET_SCENERY:OnEventDetailedFailure(EventData)

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

SET_SCENERY:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_SCENERY:OnEventDynamicCargoLoaded(EventData)

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

SET_SCENERY:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_SCENERY:OnEventDynamicCargoUnloaded(EventData)

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

SET_SCENERY:OnEventEjection(EventData)

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

SET_SCENERY:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_SCENERY:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_SCENERY:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_SCENERY:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_SCENERY:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_SCENERY:OnEventKill(EventData)

Occurs on the death of a unit.

SET_SCENERY:OnEventLand(EventData)

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

SET_SCENERY:OnEventLandingAfterEjection(EventData)

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

SET_SCENERY:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_SCENERY:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_SCENERY:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_SCENERY:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_SCENERY:OnEventMissionEnd(EventData)

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

SET_SCENERY:OnEventMissionStart(EventData)

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

SET_SCENERY:OnEventNewDynamicCargo(EventData)

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

SET_SCENERY:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_SCENERY:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_SCENERY:OnEventPlayerEnterAircraft(EventData)

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

SET_SCENERY:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_SCENERY:OnEventPlayerLeaveUnit(EventData)

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

SET_SCENERY:OnEventRefueling(EventData)

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

SET_SCENERY:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_SCENERY:OnEventScore(EventData)

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

SET_SCENERY:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_SCENERY:OnEventShootingStart(EventData)

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

SET_SCENERY:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_SCENERY:OnEventTakeoff(EventData)

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

SET_SCENERY:OnEventTriggerZone(EventData)

Trigger zone.

SET_SCENERY:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_SCENERY:OnEventWeaponAdd(EventData)

Weapon add.

SET_SCENERY.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_SCENERY:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_SCENERY.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_SCENERY:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_SCENERY:SetProperty(Key, Value)

Set one property of an object.

SET_SCENERY:SetState(Object, Key, Value)

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

SET_SCENERY.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_SCENERY:T(Arguments)

Trace a function logic level 1.

SET_SCENERY:T2(Arguments)

Trace a function logic level 2.

SET_SCENERY:T3(Arguments)

Trace a function logic level 3.

SET_SCENERY:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_SCENERY:TraceClass(Class)

Set tracing for all methods of a class.

SET_SCENERY:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_SCENERY:TraceLevel(Level)

Set the highest trace level.

SET_SCENERY:TraceOff()

Set trace off.

SET_SCENERY:TraceOn()

Set trace on.

SET_SCENERY:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_SCENERY:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_SCENERY._

SET_SCENERY:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_SCENERY:_Serialize(Arguments)

(Internal) Serialize arguments

SET_SCENERY:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_SCENERY.__

SET_SCENERY:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_STATIC Description

SET_STATIC:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_STATIC:AddStatic(AddStatic)

Add STATIC(s) to SET_STATIC.

SET_STATIC:AddStaticsByName(AddStaticNames)

Add STATIC(s) to SET_STATIC.

SET_STATIC:CalculateThreatLevelA2G()

Calculate the maximum A2G threat level of the SET_STATIC.

SET_STATIC:CountAlive()

Iterate the SET_STATIC and count how many STATICSs are alive.

SET_STATIC:FilterCategories(Categories, Clear)

Builds a set of statics out of categories.

SET_STATIC:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_STATIC:FilterCountries(Countries, Clear)

Builds a set of units of defined countries.

SET_STATIC:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_STATIC:FilterOnce()

Filter the set once

SET_STATIC:FilterPrefixes(Prefixes, Clear)

Builds a set of STATICs that contain the given string in their name.

SET_STATIC:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_STATIC:FilterStart()

Starts the filtering.

SET_STATIC:FilterStop()

Stops the filtering.

SET_STATIC:FilterTypes(Types, Clear)

Builds a set of units of defined unit types.

SET_STATIC:FilterZones(Zones, Clear)

Builds a set of statics in zones.

SET_STATIC:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_STATIC:FindStatic(StaticName)

Finds a Static based on the Static Name.

SET_STATIC:ForEachStatic(IteratorFunction, ...)

Iterate the SET_STATIC and call an iterator function for each alive STATIC, providing the STATIC and optional parameters.

SET_STATIC:ForEachStaticCompletelyInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_STATIC and call an iterator function for each alive STATIC presence completely in a Core.Zone, providing the STATIC and optional parameters to the called function.

SET_STATIC:ForEachStaticInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_STATIC and call an iterator function for each STATIC in a Core.Zone, providing the STATIC and optional parameters to the called function.

SET_STATIC:ForEachStaticNotInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_STATIC and call an iterator function for each alive STATIC presence not in a Core.Zone, providing the STATIC and optional parameters to the called function.

SET_STATIC:GetClosestStatic(Coordinate, Coalitions)

Get the closest static of the set with respect to a given reference coordinate.

SET_STATIC:GetCoordinate()

Get the center coordinate of the SET_STATIC.

SET_STATIC:GetFirst()

Get the first unit from the set.

SET_STATIC:GetHeading()

Get the average heading of the SET_STATIC.

SET_STATIC:GetStaticTypes()

Returns map of unit types.

SET_STATIC:GetStaticTypesText()

Returns a comma separated string of the unit types with a count in the Core.Set.

SET_STATIC:GetTypeNames(Delimiter)

Retrieve the type names of the Wrapper.Statics in the SET, delimited by an optional delimiter.

SET_STATIC:GetVelocity()

Get the maximum velocity of the SET_STATIC.

SET_STATIC:IsIncludeObject(MStatic)

SET_STATIC:IsNotInZone(Zone)

Check if no alive element of the SET_STATIC is in the Zone.

SET_STATIC:IsPartiallyInZone(Zone)

Check if at least one alive element of the SET_STATIC is in the Zone.

SET_STATIC:New()

Creates a new SET_STATIC object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_STATIC:RemoveStaticsByName(RemoveStaticNames)

Remove STATIC(s) from SET_STATIC.

Fields and Methods inherited from SET_BASE Description

SET_STATIC:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_STATIC:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_STATIC:AddSet(SetToAdd)

Add a SET to this set.

SET_STATIC.CallScheduler

SET_STATIC:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_STATIC:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_STATIC:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_STATIC.Database

SET_STATIC.Filter

Filters

SET_STATIC:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_STATIC:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_STATIC:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_STATIC:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_STATIC:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_STATIC:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_STATIC:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_STATIC:FilterStop()

Stops the filtering for the defined collection.

SET_STATIC:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_STATIC:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_STATIC:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_STATIC:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_STATIC:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_STATIC:GetAliveSet()

Get a new set table that only contains alive objects.

SET_STATIC:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_STATIC:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_STATIC:GetObjectNames()

Gets a string with all the object names.

SET_STATIC:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_STATIC:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_STATIC:GetSet()

Gets the Set.

SET_STATIC:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_STATIC:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_STATIC:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_STATIC:GetSetObjects()

Returns a table of the Objects in the Set.

SET_STATIC:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_STATIC:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_STATIC:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_STATIC.Index

Table of indices.

SET_STATIC:IsInSet(Object)

Decides whether an object is in the SET

SET_STATIC:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_STATIC:IsIncludeObject(Object)

Decides whether to include the Object.

SET_STATIC:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_STATIC.List

Unused table.

SET_STATIC:New(Database)

Creates an empty set.

SET_STATIC:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_STATIC:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_STATIC:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_STATIC.Set

Table of objects.

SET_STATIC:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_STATIC:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_STATIC.SomeIteratorLimit

SET_STATIC:SortByName()

Sort the set by name.

SET_STATIC:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_STATIC:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_STATIC:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_STATIC:_FilterStart()

Starts the filtering for the defined collection.

SET_STATIC:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_STATIC:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_STATIC:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_STATIC:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_STATIC.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_STATIC.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_STATIC.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_STATIC.ClassName

The name of the class.

SET_STATIC:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_STATIC:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_STATIC:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_STATIC:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_STATIC:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_STATIC:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_STATIC:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_STATIC:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_STATIC:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_STATIC:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_STATIC:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_STATIC:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_STATIC:E(Arguments)

Log an exception which will be traced always.

SET_STATIC:EventDispatcher()

Returns the event dispatcher

SET_STATIC:EventRemoveAll()

Remove all subscribed events

SET_STATIC:F(Arguments)

Trace a function call.

SET_STATIC:F2(Arguments)

Trace a function call level 2.

SET_STATIC:F3(Arguments)

Trace a function call level 3.

SET_STATIC:GetClassID()

Get the ClassID of the class instance.

SET_STATIC:GetClassName()

Get the ClassName of the class instance.

SET_STATIC:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_STATIC:GetEventPriority()

Get the object's configured event priority.

SET_STATIC:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_STATIC:GetProperties()

Get all of the properties of an object in a table.

SET_STATIC:GetProperty(Key)

Get one property of an object by the key.

SET_STATIC:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_STATIC:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_STATIC:I(Arguments)

Log an information which will be traced always.

SET_STATIC:Inherit(Child, Parent)

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

SET_STATIC:IsInstanceOf(ClassName)

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

SET_STATIC:IsTrace()

Check whether tracing is enabled for the object.

SET_STATIC:New()

BASE constructor.

SET_STATIC:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_STATIC:OnEventBDA(EventData)

BDA.

SET_STATIC:OnEventBaseCaptured(EventData)

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

SET_STATIC:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_STATIC:OnEventCrash(EventData)

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

SET_STATIC:OnEventDead(EventData)

Occurs when an object is dead.

SET_STATIC:OnEventDetailedFailure(EventData)

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

SET_STATIC:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_STATIC:OnEventDynamicCargoLoaded(EventData)

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

SET_STATIC:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_STATIC:OnEventDynamicCargoUnloaded(EventData)

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

SET_STATIC:OnEventEjection(EventData)

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

SET_STATIC:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_STATIC:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_STATIC:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_STATIC:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_STATIC:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_STATIC:OnEventKill(EventData)

Occurs on the death of a unit.

SET_STATIC:OnEventLand(EventData)

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

SET_STATIC:OnEventLandingAfterEjection(EventData)

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

SET_STATIC:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_STATIC:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_STATIC:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_STATIC:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_STATIC:OnEventMissionEnd(EventData)

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

SET_STATIC:OnEventMissionStart(EventData)

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

SET_STATIC:OnEventNewDynamicCargo(EventData)

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

SET_STATIC:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_STATIC:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_STATIC:OnEventPlayerEnterAircraft(EventData)

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

SET_STATIC:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_STATIC:OnEventPlayerLeaveUnit(EventData)

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

SET_STATIC:OnEventRefueling(EventData)

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

SET_STATIC:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_STATIC:OnEventScore(EventData)

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

SET_STATIC:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_STATIC:OnEventShootingStart(EventData)

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

SET_STATIC:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_STATIC:OnEventTakeoff(EventData)

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

SET_STATIC:OnEventTriggerZone(EventData)

Trigger zone.

SET_STATIC:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_STATIC:OnEventWeaponAdd(EventData)

Weapon add.

SET_STATIC.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_STATIC:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_STATIC.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_STATIC:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_STATIC:SetProperty(Key, Value)

Set one property of an object.

SET_STATIC:SetState(Object, Key, Value)

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

SET_STATIC.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_STATIC:T(Arguments)

Trace a function logic level 1.

SET_STATIC:T2(Arguments)

Trace a function logic level 2.

SET_STATIC:T3(Arguments)

Trace a function logic level 3.

SET_STATIC:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_STATIC:TraceClass(Class)

Set tracing for all methods of a class.

SET_STATIC:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_STATIC:TraceLevel(Level)

Set the highest trace level.

SET_STATIC:TraceOff()

Set trace off.

SET_STATIC:TraceOn()

Set trace on.

SET_STATIC:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_STATIC:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_STATIC._

SET_STATIC:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_STATIC:_Serialize(Arguments)

(Internal) Serialize arguments

SET_STATIC:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_STATIC.__

SET_STATIC:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_UNIT Description

SET_UNIT:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_UNIT:AddUnit(Unit)

Add UNIT(s) to SET_UNIT.

SET_UNIT:AddUnitsByName(AddUnitNames)

Add UNIT(s) to SET_UNIT.

SET_UNIT:CalculateThreatLevelA2G()

Calculate the maximum A2G threat level of the SET_UNIT.

SET_UNIT:CountAlive()

Count Alive Units

SET_UNIT:FilterActive(Active)

Includes only active units when the activity filter is enabled.

SET_UNIT:FilterAlive()

Builds a set of units which exist and are alive.

SET_UNIT:FilterCategories(Categories, Clear)

Builds a set of units out of categories.

SET_UNIT:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_UNIT:FilterCountries(Countries, Clear)

Builds a set of units of defined countries.

SET_UNIT:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_UNIT:FilterGroupPrefixes(Prefixes)

Builds a set of units which belong to groups with certain group names.

SET_UNIT:FilterHasRadar(RadarTypes, Clear)

Builds a set of units having a radar of give types.

SET_UNIT:FilterHasSEAD()

Builds a set of SEADable units.

SET_UNIT:FilterOnce()

Filter the set once

SET_UNIT:FilterPrefixes(Prefixes, Clear)

Builds a set of UNITs that contain a given string in their unit name.

SET_UNIT:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_UNIT:FilterStart()

Starts the filtering.

SET_UNIT:FilterStop()

Stops the filtering.

SET_UNIT:FilterTypes(Types, Clear)

Builds a set of units of defined unit types.

SET_UNIT:FilterZoneTimer(Seconds)

Set filter timer interval for FilterZones if using active filtering with FilterStart().

SET_UNIT:FilterZones(Zones, Clear)

Builds a set of units in zones.

SET_UNIT:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_UNIT:FindUnit(UnitName)

Finds a Unit based on the Unit Name.

SET_UNIT:ForEachUnit(IteratorFunction, ...)

Iterate the SET_UNIT and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Core.Zone, providing the UNIT and optional parameters to the called function.

SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...)

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Core.Zone, providing the UNIT and optional parameters to the called function.

SET_UNIT:ForEachUnitPerThreatLevel(FromThreatLevel, ToThreatLevel, IteratorFunction, ...)

Iterate the SET_UNIT sorted *per Threat Level and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

SET_UNIT:GetAliveSet()

Gets the alive set.

SET_UNIT:GetCoordinate()

Get the center coordinate of the SET_UNIT.

SET_UNIT:GetFirst()

Get the first unit from the set.

SET_UNIT:GetHeading()

Get the common heading of the moving alive units in the SET_UNIT.

SET_UNIT:GetSetPerThreatLevel(FromThreatLevel, ToThreatLevel)

Get the SET of the SET_UNIT sorted per Threat Level.

SET_UNIT:GetTypeNames(Delimiter)

Retrieve the type names of the Wrapper.Units in the SET, delimited by an optional delimiter.

SET_UNIT:GetUnitThreatLevels()

Returns map of unit threat levels.

SET_UNIT:GetUnitTypes()

Returns map of unit types.

SET_UNIT:GetUnitTypesText()

Returns a comma separated string of the unit types with a count in the Core.Set.

SET_UNIT:GetVelocity()

Get the maximum velocity of the alive units in the SET_UNIT.

SET_UNIT:HasAirUnits()

Returns if the Core.Set has air targets.

SET_UNIT:HasFriendlyUnits(FriendlyCoalition)

Returns if the Core.Set has friendly ground units.

SET_UNIT:HasGroundUnits()

Returns if the Core.Set has ground targets.

SET_UNIT:HasRadar(RadarType)

Returns if the Core.Set has targets having a radar (of a given type).

SET_UNIT:HasSEAD()

Returns if the Core.Set has targets that can be SEADed.

SET_UNIT:IsIncludeObject(MUnit)

SET_UNIT:IsNotInZone(Zone)

Check if no element of the SET_UNIT is in the Zone.

SET_UNIT:IsPartiallyInZone(ZoneTest)

Check if minimal one element of the SET_UNIT is in the Zone.

SET_UNIT:New()

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

SET_UNIT:RemoveUnitsByName(RemoveUnitNames)

Remove UNIT(s) from SET_UNIT.

SET_UNIT:SetCargoBayWeightLimit()

Iterate the SET_UNIT and set for each unit the default cargo bay weight limit.

SET_UNIT.ZoneTimer

SET_UNIT.ZoneTimerInterval

SET_UNIT:_ContinousZoneFilter()

[Internal] Private function for use of continous zone filter

Fields and Methods inherited from SET_BASE Description

SET_UNIT:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_UNIT:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_UNIT:AddSet(SetToAdd)

Add a SET to this set.

SET_UNIT.CallScheduler

SET_UNIT:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_UNIT:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_UNIT:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_UNIT.Database

SET_UNIT.Filter

Filters

SET_UNIT:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_UNIT:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_UNIT:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_UNIT:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_UNIT:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_UNIT:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_UNIT:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_UNIT:FilterStop()

Stops the filtering for the defined collection.

SET_UNIT:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_UNIT:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_UNIT:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_UNIT:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_UNIT:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_UNIT:GetAliveSet()

Get a new set table that only contains alive objects.

SET_UNIT:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_UNIT:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_UNIT:GetObjectNames()

Gets a string with all the object names.

SET_UNIT:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_UNIT:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_UNIT:GetSet()

Gets the Set.

SET_UNIT:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_UNIT:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_UNIT:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_UNIT:GetSetObjects()

Returns a table of the Objects in the Set.

SET_UNIT:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_UNIT:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_UNIT:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_UNIT.Index

Table of indices.

SET_UNIT:IsInSet(Object)

Decides whether an object is in the SET

SET_UNIT:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_UNIT:IsIncludeObject(Object)

Decides whether to include the Object.

SET_UNIT:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_UNIT.List

Unused table.

SET_UNIT:New(Database)

Creates an empty set.

SET_UNIT:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_UNIT:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_UNIT:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_UNIT.Set

Table of objects.

SET_UNIT:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_UNIT:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_UNIT.SomeIteratorLimit

SET_UNIT:SortByName()

Sort the set by name.

SET_UNIT:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_UNIT:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_UNIT:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_UNIT:_FilterStart()

Starts the filtering for the defined collection.

SET_UNIT:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_UNIT:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_UNIT:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_UNIT:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_UNIT.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_UNIT.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_UNIT.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_UNIT.ClassName

The name of the class.

SET_UNIT:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_UNIT:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_UNIT:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_UNIT:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_UNIT:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_UNIT:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_UNIT:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_UNIT:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_UNIT:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_UNIT:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_UNIT:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_UNIT:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_UNIT:E(Arguments)

Log an exception which will be traced always.

SET_UNIT:EventDispatcher()

Returns the event dispatcher

SET_UNIT:EventRemoveAll()

Remove all subscribed events

SET_UNIT:F(Arguments)

Trace a function call.

SET_UNIT:F2(Arguments)

Trace a function call level 2.

SET_UNIT:F3(Arguments)

Trace a function call level 3.

SET_UNIT:GetClassID()

Get the ClassID of the class instance.

SET_UNIT:GetClassName()

Get the ClassName of the class instance.

SET_UNIT:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_UNIT:GetEventPriority()

Get the object's configured event priority.

SET_UNIT:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_UNIT:GetProperties()

Get all of the properties of an object in a table.

SET_UNIT:GetProperty(Key)

Get one property of an object by the key.

SET_UNIT:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_UNIT:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_UNIT:I(Arguments)

Log an information which will be traced always.

SET_UNIT:Inherit(Child, Parent)

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

SET_UNIT:IsInstanceOf(ClassName)

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

SET_UNIT:IsTrace()

Check whether tracing is enabled for the object.

SET_UNIT:New()

BASE constructor.

SET_UNIT:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_UNIT:OnEventBDA(EventData)

BDA.

SET_UNIT:OnEventBaseCaptured(EventData)

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

SET_UNIT:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_UNIT:OnEventCrash(EventData)

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

SET_UNIT:OnEventDead(EventData)

Occurs when an object is dead.

SET_UNIT:OnEventDetailedFailure(EventData)

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

SET_UNIT:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_UNIT:OnEventDynamicCargoLoaded(EventData)

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

SET_UNIT:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_UNIT:OnEventDynamicCargoUnloaded(EventData)

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

SET_UNIT:OnEventEjection(EventData)

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

SET_UNIT:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_UNIT:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_UNIT:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_UNIT:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_UNIT:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_UNIT:OnEventKill(EventData)

Occurs on the death of a unit.

SET_UNIT:OnEventLand(EventData)

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

SET_UNIT:OnEventLandingAfterEjection(EventData)

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

SET_UNIT:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_UNIT:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_UNIT:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_UNIT:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_UNIT:OnEventMissionEnd(EventData)

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

SET_UNIT:OnEventMissionStart(EventData)

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

SET_UNIT:OnEventNewDynamicCargo(EventData)

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

SET_UNIT:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_UNIT:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_UNIT:OnEventPlayerEnterAircraft(EventData)

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

SET_UNIT:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_UNIT:OnEventPlayerLeaveUnit(EventData)

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

SET_UNIT:OnEventRefueling(EventData)

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

SET_UNIT:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_UNIT:OnEventScore(EventData)

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

SET_UNIT:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_UNIT:OnEventShootingStart(EventData)

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

SET_UNIT:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_UNIT:OnEventTakeoff(EventData)

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

SET_UNIT:OnEventTriggerZone(EventData)

Trigger zone.

SET_UNIT:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_UNIT:OnEventWeaponAdd(EventData)

Weapon add.

SET_UNIT.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_UNIT:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_UNIT.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_UNIT:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_UNIT:SetProperty(Key, Value)

Set one property of an object.

SET_UNIT:SetState(Object, Key, Value)

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

SET_UNIT.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_UNIT:T(Arguments)

Trace a function logic level 1.

SET_UNIT:T2(Arguments)

Trace a function logic level 2.

SET_UNIT:T3(Arguments)

Trace a function logic level 3.

SET_UNIT:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_UNIT:TraceClass(Class)

Set tracing for all methods of a class.

SET_UNIT:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_UNIT:TraceLevel(Level)

Set the highest trace level.

SET_UNIT:TraceOff()

Set trace off.

SET_UNIT:TraceOn()

Set trace on.

SET_UNIT:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_UNIT:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_UNIT._

SET_UNIT:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_UNIT:_Serialize(Arguments)

(Internal) Serialize arguments

SET_UNIT:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_UNIT.__

SET_UNIT:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_ZONE Description

SET_ZONE:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_ZONE:AddZone(Zone)

Add ZONEs to SET_ZONE.

SET_ZONE:AddZonesByName(AddZoneNames)

Add ZONEs by a search name to SET_ZONE.

SET_ZONE.Checktime

SET_ZONE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly)

Draw all zones in the set on the F10 map.

SET_ZONE:FilterOnce()

Filter the set once

SET_ZONE:FilterPrefixes(Prefixes, Clear)

Builds a set of ZONEs that contain the given string in their name.

SET_ZONE:FilterSetRegex(NoRegex, ReplaceDash)

Set Regex Options for FilterPrefix function.

SET_ZONE:FilterStart()

Starts the filtering.

SET_ZONE:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_ZONE:FindZone(ZoneName)

Finds a Zone based on the Zone Name.

SET_ZONE:ForEachZone(IteratorFunction, ...)

Iterate the SET_ZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters.

SET_ZONE:GetAverageCoordinate()

Get the average aggregated coordinate of this set of zones.

SET_ZONE:GetClosestZone(Coordinate)

Get the closest zone to a given coordinate.

SET_ZONE:GetRandomZone(margin)

Get a random zone from the set.

SET_ZONE:IsCoordinateInZone(Coordinate)

Validate if a coordinate is in one of the zones in the set.

SET_ZONE:IsIncludeObject(MZone)

Private function.

SET_ZONE:New()

Creates a new SET_ZONE object, building a set of zones.

SET_ZONE:OnAfterEnteredZone(From, Event, To, Controllable, Zone)

On After "EnteredZone" event.

SET_ZONE:OnAfterLeftZone(From, Event, To, Controllable, Zone)

On After "LeftZone" event.

SET_ZONE:OnEventDeleteZone(EventData)

Handles the DeleteZone event and removes the deleted zone from the set, unless the zone has NoDestroy set.

SET_ZONE:OnEventNewZone(EventData)

Handles the OnEventNewZone event for the Set.

SET_ZONE:RemoveZonesByName(RemoveZoneNames)

Remove ZONEs from SET_ZONE.

SET_ZONE:SetCheckTime(seconds)

Set the check time for SET_ZONE:Trigger()

SET_ZONE:SetPartlyInside(state)

Toggle “partly-inside” handling for every zone in the set when those zones are used with :Trigger().

SET_ZONE:SetZoneProbability(ZoneName, ZoneProbability)

Sets the zone's probability of being accepted on a draw by GetRandomZone().

SET_ZONE:Trigger(Objects)

Start watching if the Object or Objects move into or out of our set of zones.

SET_ZONE.TriggerInZone

SET_ZONE:TriggerStop()

Triggers the FSM event "TriggerStop".

SET_ZONE:_IsTriggerObjectInZone(obj, zone)

(Internal) Check if a trigger object is in a zone.

SET_ZONE:_TriggerCheck(fromstart)

(Internal) Check the assigned objects for being in/out of the zone

SET_ZONE:__TriggerStop(delay)

Triggers the FSM event "TriggerStop" after a delay.

SET_ZONE.checkobjects

SET_ZONE.objectset

SET_ZONE:onafterTriggerRunCheck(From, Event, to, To)

(Internal) Check the assigned objects for being in/out of the zone

Fields and Methods inherited from SET_BASE Description

SET_ZONE:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_ZONE:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_ZONE:AddSet(SetToAdd)

Add a SET to this set.

SET_ZONE.CallScheduler

SET_ZONE:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_ZONE:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_ZONE:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_ZONE.Database

SET_ZONE.Filter

Filters

SET_ZONE:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_ZONE:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_ZONE:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_ZONE:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_ZONE:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_ZONE:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_ZONE:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_ZONE:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_ZONE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_ZONE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_ZONE:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_ZONE:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_ZONE:GetAliveSet()

Get a new set table that only contains alive objects.

SET_ZONE:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_ZONE:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_ZONE:GetObjectNames()

Gets a string with all the object names.

SET_ZONE:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_ZONE:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_ZONE:GetSet()

Gets the Set.

SET_ZONE:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_ZONE:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_ZONE:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_ZONE:GetSetObjects()

Returns a table of the Objects in the Set.

SET_ZONE:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_ZONE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_ZONE:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_ZONE.Index

Table of indices.

SET_ZONE:IsInSet(Object)

Decides whether an object is in the SET

SET_ZONE:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_ZONE:IsIncludeObject(Object)

Decides whether to include the Object.

SET_ZONE:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_ZONE.List

Unused table.

SET_ZONE:New(Database)

Creates an empty set.

SET_ZONE:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_ZONE:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_ZONE:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_ZONE.Set

Table of objects.

SET_ZONE:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_ZONE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_ZONE.SomeIteratorLimit

SET_ZONE:SortByName()

Sort the set by name.

SET_ZONE:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_ZONE:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_ZONE:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_ZONE:_FilterStart()

Starts the filtering for the defined collection.

SET_ZONE:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_ZONE:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_ZONE:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_ZONE:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_ZONE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_ZONE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_ZONE.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_ZONE.ClassName

The name of the class.

SET_ZONE:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_ZONE:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_ZONE:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_ZONE:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_ZONE:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_ZONE:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_ZONE:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_ZONE:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_ZONE:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_ZONE:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_ZONE:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_ZONE:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_ZONE:E(Arguments)

Log an exception which will be traced always.

SET_ZONE:EventDispatcher()

Returns the event dispatcher

SET_ZONE:EventRemoveAll()

Remove all subscribed events

SET_ZONE:F(Arguments)

Trace a function call.

SET_ZONE:F2(Arguments)

Trace a function call level 2.

SET_ZONE:F3(Arguments)

Trace a function call level 3.

SET_ZONE:GetClassID()

Get the ClassID of the class instance.

SET_ZONE:GetClassName()

Get the ClassName of the class instance.

SET_ZONE:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_ZONE:GetEventPriority()

Get the object's configured event priority.

SET_ZONE:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_ZONE:GetProperties()

Get all of the properties of an object in a table.

SET_ZONE:GetProperty(Key)

Get one property of an object by the key.

SET_ZONE:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_ZONE:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_ZONE:I(Arguments)

Log an information which will be traced always.

SET_ZONE:Inherit(Child, Parent)

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

SET_ZONE:IsInstanceOf(ClassName)

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

SET_ZONE:IsTrace()

Check whether tracing is enabled for the object.

SET_ZONE:New()

BASE constructor.

SET_ZONE:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_ZONE:OnEventBDA(EventData)

BDA.

SET_ZONE:OnEventBaseCaptured(EventData)

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

SET_ZONE:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_ZONE:OnEventCrash(EventData)

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

SET_ZONE:OnEventDead(EventData)

Occurs when an object is dead.

SET_ZONE:OnEventDetailedFailure(EventData)

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

SET_ZONE:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_ZONE:OnEventDynamicCargoLoaded(EventData)

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

SET_ZONE:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_ZONE:OnEventDynamicCargoUnloaded(EventData)

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

SET_ZONE:OnEventEjection(EventData)

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

SET_ZONE:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_ZONE:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_ZONE:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_ZONE:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_ZONE:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_ZONE:OnEventKill(EventData)

Occurs on the death of a unit.

SET_ZONE:OnEventLand(EventData)

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

SET_ZONE:OnEventLandingAfterEjection(EventData)

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

SET_ZONE:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_ZONE:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_ZONE:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_ZONE:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_ZONE:OnEventMissionEnd(EventData)

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

SET_ZONE:OnEventMissionStart(EventData)

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

SET_ZONE:OnEventNewDynamicCargo(EventData)

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

SET_ZONE:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_ZONE:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_ZONE:OnEventPlayerEnterAircraft(EventData)

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

SET_ZONE:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_ZONE:OnEventPlayerLeaveUnit(EventData)

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

SET_ZONE:OnEventRefueling(EventData)

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

SET_ZONE:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_ZONE:OnEventScore(EventData)

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

SET_ZONE:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_ZONE:OnEventShootingStart(EventData)

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

SET_ZONE:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_ZONE:OnEventTakeoff(EventData)

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

SET_ZONE:OnEventTriggerZone(EventData)

Trigger zone.

SET_ZONE:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_ZONE:OnEventWeaponAdd(EventData)

Weapon add.

SET_ZONE.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_ZONE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_ZONE.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_ZONE:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_ZONE:SetProperty(Key, Value)

Set one property of an object.

SET_ZONE:SetState(Object, Key, Value)

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

SET_ZONE.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_ZONE:T(Arguments)

Trace a function logic level 1.

SET_ZONE:T2(Arguments)

Trace a function logic level 2.

SET_ZONE:T3(Arguments)

Trace a function logic level 3.

SET_ZONE:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_ZONE:TraceClass(Class)

Set tracing for all methods of a class.

SET_ZONE:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_ZONE:TraceLevel(Level)

Set the highest trace level.

SET_ZONE:TraceOff()

Set trace off.

SET_ZONE:TraceOn()

Set trace on.

SET_ZONE:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_ZONE:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_ZONE._

SET_ZONE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_ZONE:_Serialize(Arguments)

(Internal) Serialize arguments

SET_ZONE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_ZONE.__

SET_ZONE:onEvent(event)

The main event handling function...

Fields and Methods inherited from SET_ZONE_GOAL Description

SET_ZONE_GOAL:AddInDatabase(Event)

Handles the Database to check on an event (birth) that the Object was added in the Database.

SET_ZONE_GOAL:AddZone(Zone)

Add ZONEs to SET_ZONE_GOAL.

SET_ZONE_GOAL:FilterPrefixes(Prefixes, Clear)

Builds a set of ZONE_GOALs that contain the given string in their name.

SET_ZONE_GOAL:FilterStart()

Starts the filtering.

SET_ZONE_GOAL:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE_GOAL:FindInDatabase(Event)

Handles the Database to check on any event that Object exists in the Database.

SET_ZONE_GOAL:FindZone(ZoneName)

Finds a Zone based on the Zone Name.

SET_ZONE_GOAL:ForEachZone(IteratorFunction, ...)

Iterate the SET_ZONE_GOAL and call an iterator function for each ZONE, providing the ZONE and optional parameters.

SET_ZONE_GOAL:GetRandomZone(margin)

Get a random zone from the set.

SET_ZONE_GOAL:IsCoordinateInZone(Coordinate)

Validate if a coordinate is in one of the zones in the set.

SET_ZONE_GOAL:IsIncludeObject(MZone)

SET_ZONE_GOAL:New()

Creates a new SET_ZONE_GOAL object, building a set of zones.

SET_ZONE_GOAL:OnEventDeleteZoneGoal(EventData)

Handles the DeleteZoneGoal event and removes the deleted zone from the set, unless the zone has NoDestroy set.

SET_ZONE_GOAL:OnEventNewZoneGoal(EventData)

Handles the NewZoneGoal event for the Set.

SET_ZONE_GOAL:RemoveZonesByName(RemoveZoneNames)

Remove ZONEs from SET_ZONE_GOAL.

SET_ZONE_GOAL:SetZoneProbability(ZoneName, ZoneProbability)

Sets the zone goal's probability of being accepted on a draw by GetRandomZone().

Fields and Methods inherited from SET_BASE Description

SET_ZONE_GOAL:Add(ObjectName, Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

SET_ZONE_GOAL:AddObject(Object)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

SET_ZONE_GOAL:AddSet(SetToAdd)

Add a SET to this set.

SET_ZONE_GOAL.CallScheduler

SET_ZONE_GOAL:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_ZONE_GOAL:CompareSets(SetA, SetB)

Merge the objects of SetB, which pass the filters of SetA, into SetA.

SET_ZONE_GOAL:Count()

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

SET_ZONE_GOAL.Database

SET_ZONE_GOAL.Filter

Filters

SET_ZONE_GOAL:FilterClear()

Clears all filter criteria and stops the periodic zone filter if it is running.

SET_ZONE_GOAL:FilterCoalitions(Coalitions, Clear)

Builds a set of objects of same coalitions.

SET_ZONE_GOAL:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_ZONE_GOAL:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_ZONE_GOAL:FilterFunction(ConditionFunction, ...)

Adds a custom filter condition.

SET_ZONE_GOAL:FilterOnce()

Applies the current filter criteria to the set's source table once.

SET_ZONE_GOAL:FilterSetRegex(NoRegex, ReplaceDash)

Configures the search options for FilterPrefixes() and other name filters that use these options.

SET_ZONE_GOAL:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE_GOAL:FindNearestObjectFromPointVec2(Coordinate)

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

SET_ZONE_GOAL:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

SET_ZONE_GOAL:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for each entry passing the optional condition.

SET_ZONE_GOAL:ForSome(IteratorFunction, arg, Set, Function, FunctionArguments)

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

SET_ZONE_GOAL:Get(ObjectName)

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_ZONE_GOAL:GetAliveSet()

Get a new set table that only contains alive objects.

SET_ZONE_GOAL:GetFirst()

Gets the first object from the Core.Set#SET_BASE and derived classes.

SET_ZONE_GOAL:GetLast()

Gets the last object from the Core.Set#SET_BASE and derived classes.

SET_ZONE_GOAL:GetObjectNames()

Gets a string with all the object names.

SET_ZONE_GOAL:GetRandom()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_ZONE_GOAL:GetRandomSurely()

Gets a random object from the Core.Set#SET_BASE and derived classes.

SET_ZONE_GOAL:GetSet()

Gets the Set.

SET_ZONE_GOAL:GetSetComplement(SetB)

Gets a new set containing the entries of SetB whose stored names are absent from this set.

SET_ZONE_GOAL:GetSetIntersection(SetB)

Gets a new set containing the entries whose stored names occur in both sets.

SET_ZONE_GOAL:GetSetNames()

Gets a list of the Names of the Objects in the Set.

SET_ZONE_GOAL:GetSetObjects()

Returns a table of the Objects in the Set.

SET_ZONE_GOAL:GetSetUnion(SetB)

Gets a new set containing the union of the two sets by stored name.

SET_ZONE_GOAL:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_ZONE_GOAL:GetThreatLevelMax()

Get max threat level of all objects in the SET.

SET_ZONE_GOAL.Index

Table of indices.

SET_ZONE_GOAL:IsInSet(Object)

Decides whether an object is in the SET

SET_ZONE_GOAL:IsInZone(Zone, Any)

Checks whether all or optionally any objects is inside a given zone.

SET_ZONE_GOAL:IsIncludeObject(Object)

Decides whether to include the Object.

SET_ZONE_GOAL:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_ZONE_GOAL.List

Unused table.

SET_ZONE_GOAL:New(Database)

Creates an empty set.

SET_ZONE_GOAL:OnAfterAdded(From, Event, To, ObjectName, Object)

Added Handler OnAfter for SET_BASE

SET_ZONE_GOAL:OnAfterRemoved(From, Event, To, ObjectName, Object)

Removed Handler OnAfter for SET_BASE

SET_ZONE_GOAL:Remove(ObjectName, NoTriggerEvent)

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

SET_ZONE_GOAL.Set

Table of objects.

SET_ZONE_GOAL:SetDatabase(BaseSet)

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

SET_ZONE_GOAL:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_ZONE_GOAL.SomeIteratorLimit

SET_ZONE_GOAL:SortByName()

Sort the set by name.

SET_ZONE_GOAL:_EvalFilterFunctions(Object)

[Internal] Tests the object against all custom filter conditions.

SET_ZONE_GOAL:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_ZONE_GOAL:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_ZONE_GOAL:_FilterStart()

Starts the filtering for the defined collection.

SET_ZONE_GOAL:_Find(ObjectName)

Finds an Core.Base#BASE object based on the object Name.

SET_ZONE_GOAL:_GetBoundingBoxCenterVec3(AliveOnly)

[Internal] Get the center of the bounding box of the objects in the set.

SET_ZONE_GOAL:_NewSetOfSameClass(OtherSet)

[Internal] Creates a new empty set of the same class as this set, e.g.

SET_ZONE_GOAL:_SearchPattern(Name, Pattern, NoRegex, ReplaceDash)

[Internal] Finds a name match using the set's pattern options.

SET_ZONE_GOAL.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

SET_ZONE_GOAL.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Fields and Methods inherited from BASE Description

SET_ZONE_GOAL.ClassID

The ID number of the object. Each object created with BASE.New() gets the next number.

SET_ZONE_GOAL.ClassName

The name of the class.

SET_ZONE_GOAL:ClearState(Object, StateName)

Clear a state value that was set for an object.

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

Creation of a Birth Event.

SET_ZONE_GOAL:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_ZONE_GOAL:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_ZONE_GOAL:CreateEventDynamicCargoLoaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

SET_ZONE_GOAL:CreateEventDynamicCargoRemoved(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

SET_ZONE_GOAL:CreateEventDynamicCargoUnloaded(DynamicCargo)

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

SET_ZONE_GOAL:CreateEventGroupChangeOption(EventTime, Initiator)

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

SET_ZONE_GOAL:CreateEventNewDynamicCargo(DynamicCargo)

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

SET_ZONE_GOAL:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_ZONE_GOAL:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_ZONE_GOAL:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_ZONE_GOAL:CreateEventUnitLost(EventTime, Initiator)

Creation of a Unit Lost Event.

SET_ZONE_GOAL:E(Arguments)

Log an exception which will be traced always.

SET_ZONE_GOAL:EventDispatcher()

Returns the event dispatcher

SET_ZONE_GOAL:EventRemoveAll()

Remove all subscribed events

SET_ZONE_GOAL:F(Arguments)

Trace a function call.

SET_ZONE_GOAL:F2(Arguments)

Trace a function call level 2.

SET_ZONE_GOAL:F3(Arguments)

Trace a function call level 3.

SET_ZONE_GOAL:GetClassID()

Get the ClassID of the class instance.

SET_ZONE_GOAL:GetClassName()

Get the ClassName of the class instance.

SET_ZONE_GOAL:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_ZONE_GOAL:GetEventPriority()

Get the object's configured event priority.

SET_ZONE_GOAL:GetParent(Child, FromClass)

Get the parent object from the inheritance chain.

SET_ZONE_GOAL:GetProperties()

Get all of the properties of an object in a table.

SET_ZONE_GOAL:GetProperty(Key)

Get one property of an object by the key.

SET_ZONE_GOAL:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_ZONE_GOAL:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_ZONE_GOAL:I(Arguments)

Log an information which will be traced always.

SET_ZONE_GOAL:Inherit(Child, Parent)

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

SET_ZONE_GOAL:IsInstanceOf(ClassName)

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

SET_ZONE_GOAL:IsTrace()

Check whether tracing is enabled for the object.

SET_ZONE_GOAL:New()

BASE constructor.

SET_ZONE_GOAL:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_ZONE_GOAL:OnEventBDA(EventData)

BDA.

SET_ZONE_GOAL:OnEventBaseCaptured(EventData)

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

SET_ZONE_GOAL:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_ZONE_GOAL:OnEventCrash(EventData)

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

SET_ZONE_GOAL:OnEventDead(EventData)

Occurs when an object is dead.

SET_ZONE_GOAL:OnEventDetailedFailure(EventData)

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

SET_ZONE_GOAL:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_ZONE_GOAL:OnEventDynamicCargoLoaded(EventData)

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

SET_ZONE_GOAL:OnEventDynamicCargoRemoved(EventData)

Occurs when a dynamic cargo crate is removed.

SET_ZONE_GOAL:OnEventDynamicCargoUnloaded(EventData)

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

SET_ZONE_GOAL:OnEventEjection(EventData)

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

SET_ZONE_GOAL:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_ZONE_GOAL:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_ZONE_GOAL:OnEventGroupChangeOption(EventData)

Occurs when an option is changed for an AI group.

SET_ZONE_GOAL:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_ZONE_GOAL:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_ZONE_GOAL:OnEventKill(EventData)

Occurs on the death of a unit.

SET_ZONE_GOAL:OnEventLand(EventData)

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

SET_ZONE_GOAL:OnEventLandingAfterEjection(EventData)

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

SET_ZONE_GOAL:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_ZONE_GOAL:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_ZONE_GOAL:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_ZONE_GOAL:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_ZONE_GOAL:OnEventMissionEnd(EventData)

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

SET_ZONE_GOAL:OnEventMissionStart(EventData)

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

SET_ZONE_GOAL:OnEventNewDynamicCargo(EventData)

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

SET_ZONE_GOAL:OnEventParatrooperLanding(EventData)

Paratrooper landing.

SET_ZONE_GOAL:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_ZONE_GOAL:OnEventPlayerEnterAircraft(EventData)

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

SET_ZONE_GOAL:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_ZONE_GOAL:OnEventPlayerLeaveUnit(EventData)

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

SET_ZONE_GOAL:OnEventRefueling(EventData)

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

SET_ZONE_GOAL:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_ZONE_GOAL:OnEventScore(EventData)

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

SET_ZONE_GOAL:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_ZONE_GOAL:OnEventShootingStart(EventData)

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

SET_ZONE_GOAL:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_ZONE_GOAL:OnEventTakeoff(EventData)

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

SET_ZONE_GOAL:OnEventTriggerZone(EventData)

Trigger zone.

SET_ZONE_GOAL:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SET_ZONE_GOAL:OnEventWeaponAdd(EventData)

Weapon add.

SET_ZONE_GOAL.Properties

Properties stored with BASE.SetProperty().

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

Schedule a function call once after a delay.

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

Schedule a repeated function call.

SET_ZONE_GOAL:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_ZONE_GOAL.Scheduler

The scheduler object used by BASE.ScheduleOnce() and BASE.ScheduleRepeat(). Created on first use.

SET_ZONE_GOAL:SetEventPriority(EventPriority)

Set the object's event priority for subsequent subscriptions.

SET_ZONE_GOAL:SetProperty(Key, Value)

Set one property of an object.

SET_ZONE_GOAL:SetState(Object, Key, Value)

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

SET_ZONE_GOAL.States

States stored with BASE.SetState(), indexed by the class name and ID of the given object.

SET_ZONE_GOAL:T(Arguments)

Trace a function logic level 1.

SET_ZONE_GOAL:T2(Arguments)

Trace a function logic level 2.

SET_ZONE_GOAL:T3(Arguments)

Trace a function logic level 3.

SET_ZONE_GOAL:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_ZONE_GOAL:TraceClass(Class)

Set tracing for all methods of a class.

SET_ZONE_GOAL:TraceClassMethod(Class, Method)

Set tracing for a specific method of a class.

SET_ZONE_GOAL:TraceLevel(Level)

Set the highest trace level.

SET_ZONE_GOAL:TraceOff()

Set trace off.

SET_ZONE_GOAL:TraceOn()

Set trace on.

SET_ZONE_GOAL:TraceOnOff(TraceOnOff)

Switch F and T tracing on or off.

SET_ZONE_GOAL:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_ZONE_GOAL._

SET_ZONE_GOAL:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_ZONE_GOAL:_Serialize(Arguments)

(Internal) Serialize arguments

SET_ZONE_GOAL:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_ZONE_GOAL.__

SET_ZONE_GOAL:onEvent(event)

The main event handling function...

Field(s)

Function(s)

Add an AIRBASE object to SET_AIRBASE.

Defined in:

SET_AIRBASE

Parameter:

Airbase that should be added to the set.

Return value:

self

Add AIRBASEs to SET_AIRBASE.

Defined in:

SET_AIRBASE

Parameter:

#string AddAirbaseNames

A single name or an array of AIRBASE names.

Return value:

self

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_AIRBASE

Parameter:

Event data.

Return values:

#string:

The name of the AIRBASE.

The AIRBASE object.

Builds a set of airbases out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_AIRBASE

Parameters:

#string Categories

Can take the following values: "airdrome", "helipad", "ship".

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Starts the filtering.

Defined in:

SET_AIRBASE

Return value:

self

Stops the filtering.

Defined in:

SET_AIRBASE

Return value:

self

Builds a set of airbase objects in zones.

Defined in:

SET_AIRBASE

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Finds a Airbase based on the Airbase Name.

Defined in:

SET_AIRBASE

Parameter:

#string AirbaseName

Return value:

The found Airbase.

Finds an Airbase in range of a coordinate.

Defined in:

SET_AIRBASE

Parameters:

#number Range

Return value:

The found Airbase.

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_AIRBASE

Parameter:

Event data.

Return values:

#string:

The name of the AIRBASE.

The AIRBASE object.

Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#COORDINATE.

Defined in:

SET_AIRBASE

Parameter:

A Core.Point#COORDINATE object from where to evaluate the closest Wrapper.Airbase#AIRBASE.

Return value:

Iterate the SET_AIRBASE and call an iterator function for each AIRBASE, providing the AIRBASE and optional parameters.

Defined in:

SET_AIRBASE

Parameters:

#function IteratorFunction

The function that will be called when there is an alive AIRBASE in the SET_AIRBASE. The function needs to accept a AIRBASE parameter.

...

Return value:

self

Finds a random Airbase in the set.

Defined in:

SET_AIRBASE

Return value:

The found Airbase.

Defined in:

SET_AIRBASE

Parameter:

Return value:

self

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

Defined in:

SET_AIRBASE

Return value:

self

Usage:

-- Define a new SET_AIRBASE Object. The DatabaseSet will contain a reference to all Airbases.
DatabaseSet = SET_AIRBASE:New()

Base capturing event.

Defined in:

SET_AIRBASE

Parameter:

Core.Event#EVENT EventData

Dead event.

Defined in:

SET_AIRBASE

Parameter:

Core.Event#EVENT EventData

Remove AIRBASEs from SET_AIRBASE.

Defined in:

SET_AIRBASE

Parameter:

Wrapper.Airbase#AIRBASE RemoveAirbaseNames

A single name or an array of AIRBASE names.

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

SET_BASE class.

Field(s)

SET_BASE.Database

Now base the new Set on the BaseSet

#table SET_BASE.Index

Table of indices.

#table SET_BASE.List

Unused table.

#table SET_BASE.Set

Table of objects.

#boolean SET_BASE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

#boolean SET_BASE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

SET_BASE

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

SET_BASE

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

SET_BASE

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

SET_BASE

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

SET_BASE

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

SET_BASE

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

SET_BASE

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_BASE

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

SET_BASE

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

SET_BASE

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

SET_BASE

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

SET_BASE

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

SET_BASE

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

SET_BASE

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

SET_BASE

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

SET_BASE

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

SET_BASE

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

SET_BASE

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

SET_BASE

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

SET_BASE

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

SET_BASE

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

SET_BASE

Return value:

Gets a string with all the object names.

Defined in:

SET_BASE

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

SET_BASE

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

SET_BASE

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

SET_BASE

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

SET_BASE

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

SET_BASE

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

SET_BASE

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

SET_BASE

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

SET_BASE

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

SET_BASE

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

SET_BASE

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

SET_BASE

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

SET_BASE

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

SET_BASE

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

SET_BASE

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

SET_BASE

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

SET_BASE

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

SET_BASE

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

SET_BASE

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

SET_BASE

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

SET_BASE

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

SET_BASE

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

SET_BASE

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

SET_BASE

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

SET_BASE

Parameter:

Starts the filtering for the defined collection.

Defined in:

SET_BASE

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

SET_BASE

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

SET_BASE

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

SET_BASE

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

SET_BASE

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

SET_BASE.Database

Now base the new Set on the BaseSet

#table SET_BASE.Index

Table of indices.

#table SET_BASE.List

Unused table.

#table SET_BASE.Set

Table of objects.

#boolean SET_BASE.filterNoRegex

Whether name filters perform a plain-text search. Defaults to false.

#boolean SET_BASE.filterReplaceDash

Whether to escape hyphens in Lua patterns. Defaults to true.

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Filters

Field(s)

#table SET_BASE.Filter.Coalition

Coalitions

#table SET_BASE.Filter.Prefix

Prefixes.

Function(s)

Field(s)

Function(s)

Field(s)

#boolean SET_CLIENT.HandleCASlotsEnabled

Remember the CA slot handling, so that FilterStart() subscribes again after FilterStop().

Function(s)

Add CLIENT(s) to SET_CLIENT.

Defined in:

SET_CLIENT

Parameter:

#string AddClientNames

A single name or an array of CLIENT names.

Return value:

self

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_CLIENT

Parameter:

Return values:

#string:

The name of the CLIENT

#table:

The CLIENT

Iterate the SET_CLIENT and count alive units.

Defined in:

SET_CLIENT

Return value:

#number:

count

Includes only clients that are active and alive when the activity filter is enabled.

Defined in:

SET_CLIENT

Parameter:

#boolean Active

(Optional) Enable the activity filter. Defaults to true. Passing false disables this criterion.

Return value:

self

Usage:

local ClientSet = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive():FilterOnce()
-- Reapply the coalition filter with inactive clients included.
ClientSet:FilterActive(false):FilterOnce()

Builds a set of units which exist and are alive.

Defined in:

SET_CLIENT

Return value:

self

Builds a set of clients of certain callsigns.

Defined in:

SET_CLIENT

Parameters:

#string Callsigns

Can be a single string e.g. "Ford", or a table of strings e.g. {"Uzi","Enfield","Chevy"}. Refers to the callsigns as they can be set in the mission editor.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of clients out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_CLIENT

Parameters:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_CLIENT

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Builds a set of clients of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_CLIENT

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_CLIENT

Parameters:

#function ConditionFunction

Receives the CLIENT followed by the optional arguments. Any return value other than false or nil passes.

...

Condition function arguments if any.

Return value:

self

Usage:

         -- Image you want to exclude a specific CLIENT from a SET:
         local groundset = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive(true):FilterFunction(
         -- The function needs to take a UNIT object as first - and in this case, only - argument.
         function(client)
             local isinclude = true
             if client:GetPlayerName() == "Exclude Me" then isinclude = false end
             return isinclude
         end
        ):FilterOnce()
         BASE:I(groundset:Flush())

Builds a set of clients which belong to groups with certain group names.

Defined in:

SET_CLIENT

Parameter:

#string Prefixes

The (partial) group names to look for. Can be anywhere in the group name. Can be a single string or a table of strings.

Return value:

self

Filter the set once

Defined in:

SET_CLIENT

Return value:

self

Filters clients by matches in the current player's name using the options set by FilterSetRegex().

Defined in:

SET_CLIENT

Parameters:

#string Playernames

A single search string or a table of search strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Filters clients by matches in the unit name.

Use FilterPlayernames() to match the current player's name.

Defined in:

SET_CLIENT

Parameters:

#string Prefixes

A single search string or a table of search strings. Matches can occur anywhere in the unit name.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_CLIENT

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_CLIENT

Return value:

self

Stops the filtering.

Defined in:

SET_CLIENT

Return value:

self

Builds a set of clients of defined client types.

Possible current types are those types known within DCS world.

Defined in:

SET_CLIENT

Parameters:

#string Types

Can take those type strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set filter timer interval for FilterZones if using active filtering with FilterStart().

Defined in:

SET_CLIENT

Parameter:

#number Seconds

(Optional) Seconds between check intervals, defaults to 30. Caution - do not be too agressive with timing! Groups are usually not moving fast enough to warrant a check of below 10 seconds.

Return value:

self

Builds a set of clients in zones.

Defined in:

SET_CLIENT

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Finds a Client based on the Client Name.

Defined in:

SET_CLIENT

Parameter:

#string ClientName

Return value:

The found Client.

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_CLIENT

Parameter:

Return values:

#string:

The name of the CLIENT

#table:

The CLIENT

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT, providing the CLIENT and optional parameters.

Defined in:

SET_CLIENT

Parameters:

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

...

Return value:

self

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Core.Zone, providing the CLIENT and optional parameters to the called function.

Defined in:

SET_CLIENT

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

...

Return value:

self

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Core.Zone, providing the CLIENT and optional parameters to the called function.

Defined in:

SET_CLIENT

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

...

Return value:

self

Gets the alive set.

Defined in:

SET_CLIENT

Return value:

#table:

Table of SET objects

Make the SET handle CA slots only (GROUND units used by any player).

Needs active filtering with FilterStart()

Defined in:

SET_CLIENT

Return value:

self

Defined in:

SET_CLIENT

Parameter:

Return value:

self

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_CLIENT

Return value:

Usage:

-- Define a new SET_CLIENT Object. This DBObject will contain a reference to all Clients.
DBObject = SET_CLIENT:New()

Remove CLIENT(s) from SET_CLIENT.

Defined in:

SET_CLIENT

Parameter:

#table RemoveClientNames

A single client name or CLIENT object, or an array of client names or CLIENT objects.

Return value:

self

[Internal] Private function for use of continous zone filter

Defined in:

SET_CLIENT

Return value:

self

Handle CA slots addition

Defined in:

SET_CLIENT

Parameter:

Return value:

self

Handle CA slots removal

Defined in:

SET_CLIENT

Parameter:

Return value:

self

Field(s)

#boolean SET_CLIENT.HandleCASlotsEnabled

Remember the CA slot handling, so that FilterStart() subscribes again after FilterStop().

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

#boolean SET_CLIENT.HandleCASlotsEnabled

Remember the CA slot handling, so that FilterStart() subscribes again after FilterStop().

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

#table SET_DYNAMICCARGO.Index

Table of indices.

#table SET_DYNAMICCARGO.List

Unused table.

#table SET_DYNAMICCARGO.Set

Table of objects.

Core.Timer#TIMER SET_DYNAMICCARGO.ZoneTimer

Timer for active filtering of zones.

Function(s)

Builds a set of dynamic cargo of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_DYNAMICCARGO

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

This filter is N/A for SET_DYNAMICCARGO

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of DYNAMICCARGOs that are owned at the moment by this player name.

Defined in:

SET_DYNAMICCARGO

Parameter:

#string PlayerName

Return value:

This filter is N/A for SET_DYNAMICCARGO

Defined in:

SET_DYNAMICCARGO

Return value:

[User] Add a custom condition function.

Defined in:

SET_DYNAMICCARGO

Parameters:

#function ConditionFunction

Receives the DYNAMICCARGO followed by the optional arguments. Any return value other than false or nil passes.

...

Condition function arguments if any.

Return value:

Usage:

         -- Image you want to exclude a specific DYNAMICCARGO from a SET:
         local cargoset = SET_DYNAMICCARGO:New():FilterCoalitions("blue"):FilterFunction(
         -- The function needs to take a DYNAMICCARGO object as first - and in this case, only - argument.
         function(dynamiccargo)
             local isinclude = true
             if dynamiccargo:GetName() == "Exclude Me" then isinclude = false end
             return isinclude
         end
        ):FilterOnce()
         BASE:I(cargoset:Flush())

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.

is on board of a Chinook).

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.NEW (i.e.

new and never loaded into a Chinook).

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.

was on board of a Chinook previously and is now unloaded).

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of DYNAMICCARGOs that contain the given string in their name.

Attention! LUA Regex applies!

Defined in:

SET_DYNAMICCARGO

Parameters:

#string Patterns

The string pattern(s) that need to be contained in the dynamic cargo name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

Filter the set once

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of DYNAMICCARGOs that contain the given string in their name.

Attention! Bad naming convention as this does not filter only prefixes but all names that contain the string. LUA Regex applies.

Defined in:

SET_DYNAMICCARGO

Parameters:

#string Prefixes

The string pattern(s) that need to be contained in the dynamic cargo name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

Set Regex Options for FilterPrefix function.

Defined in:

SET_DYNAMICCARGO

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

Starts the filtering.

Defined in:

SET_DYNAMICCARGO

Return value:

Stops the filtering.

Defined in:

SET_DYNAMICCARGO

Return value:

Builds a set of dynamic cargo of defined dynamic cargo type names.

Defined in:

SET_DYNAMICCARGO

Parameters:

#string Types

Can take those type name strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

Set filter timer interval for FilterZones if using active filtering with FilterStart().

Defined in:

SET_DYNAMICCARGO

Parameter:

#number Seconds

(Optional) Seconds between check intervals, defaults to 30. Caution - do not be too agressive with timing! Objects are usually not moving fast enough to warrant a check of below 10 seconds.

Return value:

Builds a set of dynamic cargo in zones.

Defined in:

SET_DYNAMICCARGO

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETDYNAMICCARGO event or vise versa!

Defined in:

SET_DYNAMICCARGO

Parameter:

Return values:

#string:

The name of the DYNAMICCARGO

The DYNAMICCARGO object or nil if it is not in the database.

Gets the clients found for the current cargo owners.

Defined in:

SET_DYNAMICCARGO

Return value:

#map<#string,Wrapper.Client#CLIENT>:

A map from player name to client. Only owners with a matching client are included.

Gets the distinct player names of the current cargo owners.

Defined in:

SET_DYNAMICCARGO

Return value:

#map<#string,#string>:

A map from each player name to itself.

Gets the storage objects associated with the cargo.

Defined in:

SET_DYNAMICCARGO

Return value:

#map<#string,Wrapper.Storage#STORAGE>:

A map from cargo name to storage object.

Defined in:

SET_DYNAMICCARGO

Parameter:

Return value:

Creates a new SET_DYNAMICCARGO object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_DYNAMICCARGO

Return value:

Usage:

-- Define a new SET_DYNAMICCARGO Object. This DBObject will contain a reference to all alive Statics.
DBObject = SET_DYNAMICCARGO:New()

[Internal] Private function for use of continous zone filter

Defined in:

SET_DYNAMICCARGO

Return value:

Handles the events for the Set.

Defined in:

SET_DYNAMICCARGO

Parameter:

Handles the remove event for dynamic cargo set.

Defined in:

SET_DYNAMICCARGO

Parameter:

Field(s)

#table SET_DYNAMICCARGO.Index

Table of indices.

#table SET_DYNAMICCARGO.List

Unused table.

#table SET_DYNAMICCARGO.Set

Table of objects.

Core.Timer#TIMER SET_DYNAMICCARGO.ZoneTimer

Timer for active filtering of zones.

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

#table SET_DYNAMICCARGO.Index

Table of indices.

#table SET_DYNAMICCARGO.List

Unused table.

#table SET_DYNAMICCARGO.Set

Table of objects.

Core.Timer#TIMER SET_DYNAMICCARGO.ZoneTimer

Timer for active filtering of zones.

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Activate late activated groups.

Defined in:

SET_GROUP

Parameter:

#number Delay

Delay in seconds.

Return value:

self

Add a GROUP to SET_GROUP.

Note that for each unit in the group that is set, a default cargo bay limit is initialized.

Defined in:

SET_GROUP

Parameters:

The group which should be added to the set.

#boolean DontSetCargoBayLimit

If true, do not attempt to auto-add the cargo bay limit per unit in this group.

Return value:

Add GROUP(s) to SET_GROUP.

Defined in:

SET_GROUP

Parameter:

#string AddGroupNames

A single name or an array of GROUP names.

Return value:

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_GROUP

Parameter:

Return values:

#string:

The name of the GROUP

#table:

The GROUP

Iterate the SET_GROUP and return true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE, false otherwise

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

if MySetGroup:AllCompletelyInZone(MyZone) then
  MESSAGE:New("All the SET's GROUP are in zone !", 10):ToAll()
else
  MESSAGE:New("Some or all SET's GROUP are outside zone !", 10):ToAll()
end

Iterate the SET_GROUP and return true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#ZONE

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#ZONE, false otherwise.

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

if MySetGroup:AnyCompletelyInZone(MyZone) then
  MESSAGE:New("At least one GROUP is completely in zone !", 10):ToAll()
else
  MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
end

Iterate the SET_GROUP and return true if at least one #UNIT of one Wrapper.Group#GROUP of the #SET_GROUP is in Core.Zone

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if at least one of the Wrapper.Group#GROUP is partly or completely inside the Core.Zone#ZONE, false otherwise.

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

if MySetGroup:AnyPartlyInZone(MyZone) then
  MESSAGE:New("At least one GROUP has at least one UNIT in zone !", 10):ToAll()
else
  MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
end

Iterate the SET_GROUP and return true if at least one Wrapper.Group#GROUP of the #SET_GROUP is partly in Core.Zone.

Will return false if a Wrapper.Group#GROUP is fully in the Core.Zone

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if at least one of the Wrapper.Group#GROUP is partly or completely inside the Core.Zone#ZONE, false otherwise.

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

if MySetGroup:AnyPartlyInZone(MyZone) then
  MESSAGE:New("At least one GROUP is partially in the zone, but none are fully in it !", 10):ToAll()
else
  MESSAGE:New("No GROUP are in zone, or one (or more) GROUP is completely in it !", 10):ToAll()
end

Iterate the SET_GROUP and count how many GROUPs and UNITs are alive.

Defined in:

SET_GROUP

Return values:

#number:

The number of GROUPs alive.

#number:

The number of UNITs alive.

Iterate the SET_GROUP and count how many GROUPs are completely in the Zone That could easily be done with SET_GROUP:ForEachGroupCompletelyInZone(), but this function provides an easy to use shortcut...

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#number:

the number of GROUPs completely in the Zone

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

MESSAGE:New("There are " .. MySetGroup:CountInZone(MyZone) .. " GROUPs in the Zone !", 10):ToAll()

Iterate the SET_GROUP and count how many UNITs are completely in the Zone

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#number:

the number of GROUPs completely in the Zone

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

MESSAGE:New("There are " .. MySetGroup:CountUnitInZone(MyZone) .. " UNITs in the Zone !", 10):ToAll()

Includes only active groups when the activity filter is enabled.

Defined in:

SET_GROUP

Parameter:

#boolean Active

(Optional) Enable the activity filter. Defaults to true. Passing false disables this criterion.

Return value:

self

Usage:

local GroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterActive():FilterOnce()
-- Reapply the coalition filter with inactive groups included.
GroupSet:FilterActive(false):FilterOnce()

Build a set of groups that are alive.

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_GROUP

Parameters:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Builds a set of groups out of airplane category.

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups out of ground category.

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups out of helicopter category.

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups out of ship category.

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups out of structure category.

Defined in:

SET_GROUP

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_GROUP

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Builds a set of groups of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_GROUP

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_GROUP

Parameters:

#function ConditionFunction

Receives the GROUP followed by the optional arguments. Any return value other than false or nil passes.

...

Condition function arguments if any.

Return value:

self

Usage:

         -- Image you want to exclude a specific GROUP from a SET:
         local groundset = SET_GROUP:New():FilterCoalitions("blue"):FilterCategoryGround():FilterFunction(
         -- The function needs to take a GROUP object as first - and in this case, only - argument.
         function(grp)
             local isinclude = true
             if grp:GetName() == "Exclude Me" then isinclude = false end
             return isinclude
         end
        ):FilterOnce()
         BASE:I(groundset:Flush())

Filter the set once

Defined in:

SET_GROUP

Return value:

self

Builds a set of groups that contain the given string in their group name.

Attention! Bad naming convention as this does not filter only prefixes but all groups that contain the string.

Defined in:

SET_GROUP

Parameters:

#string Prefixes

The string pattern(s) that needs to be contained in the group name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_GROUP

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_GROUP

Return value:

self

Stops the filtering.

Defined in:

SET_GROUP

Return value:

self

Set filter timer interval for FilterZones if using active filtering with FilterStart().

Defined in:

SET_GROUP

Parameter:

#number Seconds

(Optional) Seconds between check intervals, defaults to 30. Caution - do not be too agressive with timing! Groups are usually not moving fast enough to warrant a check of below 10 seconds.

Return value:

self

Builds a set of groups in zones.

Defined in:

SET_GROUP

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Finds a Group based on the Group Name.

Defined in:

SET_GROUP

Parameter:

#string GroupName

Return value:

The found Group.

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_GROUP

Parameter:

Return values:

#string:

The name of the GROUP

#table:

The GROUP

Iterate the SET_GROUP while identifying the nearest object from a Core.Point#COORDINATE.

Defined in:

SET_GROUP

Parameter:

A Core.Point#COORDINATE object from where to evaluate the closest object in the set.

Return value:

The closest group.

Iterate the SET_GROUP and call an iterator function for each GROUP object, providing the GROUP and optional parameters.

Defined in:

SET_GROUP

Parameters:

#function IteratorFunction

The function that will be called for all GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for each alive GROUP object, providing the GROUP and optional parameters.

Defined in:

SET_GROUP

Parameters:

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for each alive GROUP that has any unit in the Core.Zone, providing the GROUP and optional parameters to the called function.

Defined in:

SET_GROUP

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Core.Zone, providing the GROUP and optional parameters to the called function.

Defined in:

SET_GROUP

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Core.Zone, providing the GROUP and optional parameters to the called function.

Defined in:

SET_GROUP

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Core.Zone, providing the GROUP and optional parameters to the called function.

Defined in:

SET_GROUP

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for some GROUP objects, providing the GROUP and optional parameters.

Defined in:

SET_GROUP

Parameters:

#function IteratorFunction

The function that will be called for some GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Iterate the SET_GROUP and call an iterator function for some alive GROUP objects, providing the GROUP and optional parameters.

Defined in:

SET_GROUP

Parameters:

#function IteratorFunction

The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

...

Return value:

self

Get a new set table that only contains alive groups.

Defined in:

SET_GROUP

Return value:

#table:

Set of alive groups.

Get the closest group of the set with respect to a given reference coordinate.

Optionally, only groups of given coalitions are considered in the search.

Defined in:

SET_GROUP

Parameters:

Reference Coordinate from which the closest group is determined.

#table Coalitions

(Optional) Table of coalition #number entries to filter for.

Return values:

The closest group (if any).

#number:

Distance in meters to the closest group.

Returns a report of of unit types.

Defined in:

SET_GROUP

Return value:

A report of the unit types found. The key is the UnitTypeName and the value is the amount of unit types found.

Defined in:

SET_GROUP

Parameter:

The group that is checked for inclusion.

Return value:

self

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_GROUP

Return value:

Usage:

-- Define a new SET_GROUP Object. This DBObject will contain a reference to all alive GROUPS.
DBObject = SET_GROUP:New()

Iterate the SET_GROUP and return true if no Wrapper.Group#GROUP of the #SET_GROUP is in Core.Zone This could also be achieved with not SET_GROUP:AnyPartlyInZone(Zone), but it's easier for the mission designer to add a dedicated method

Defined in:

SET_GROUP

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if no Wrapper.Group#GROUP is inside the Core.Zone#ZONE in any way, false otherwise.

Usage:

local MyZone = ZONE:New("Zone1")
local MySetGroup = SET_GROUP:New()
MySetGroup:AddGroupsByName({"Group1", "Group2"})

if MySetGroup:NoneInZone(MyZone) then
  MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
else
  MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
end

Remove GROUP(s) from SET_GROUP.

Defined in:

SET_GROUP

Parameter:

Wrapper.Group#GROUP RemoveGroupNames

A single name or an array of GROUP names.

Return value:

Iterate the SET_GROUP and set for each unit the default cargo bay weight limit.

Because within a group, the type of carriers can differ, each cargo bay weight limit is set on Wrapper.Unit level.

Defined in:

SET_GROUP

Usage:

-- Set the default cargo bay weight limits of the carrier units.
local MySetGroup = SET_GROUP:New()
MySetGroup:SetCargoBayWeightLimit()

[Internal] Private function for use of continous zone filter

Defined in:

SET_GROUP

Return value:

self

Handles the OnDead or OnCrash event for alive groups set.

Note: The GROUP object in the SET_GROUP collection will only be removed if the last unit is destroyed of the GROUP.

Defined in:

SET_GROUP

Parameter:

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Activate late activated groups in the set.

Defined in:

SET_OPSGROUP

Parameter:

#number Delay

Delay in seconds.

Return value:

Adds a GROUP or OPSGROUP object in the Core.Set#SET_OPSGROUP, using a given ObjectName as the index.

A GROUP is converted to an OPSGROUP.

Defined in:

SET_OPSGROUP

Parameters:

#string ObjectName

The name of the object.

The GROUP or OPSGROUP object.

Return value:

Add a GROUP or OPSGROUP object to the set.

NOTE that an OPSGROUP is automatically created from the GROUP if it does not exist already.

Defined in:

SET_OPSGROUP

Parameter:

The GROUP which should be added to the set. Can also be given as an #OPSGROUP object.

Return value:

Add GROUP(s) or OPSGROUP(s) to the set.

Defined in:

SET_OPSGROUP

Parameter:

#string AddGroupNames

A single name or an array of GROUP names.

Return value:

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_OPSGROUP

Parameter:

Event data.

Return values:

#string:

The name of the GROUP.

The GROUP object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

SET_OPSGROUP

Parameter:

Ops group

Return value:

The added BASE Object.

Iterate the SET_OPSGROUP and count how many GROUPs and UNITs are alive.

Defined in:

SET_OPSGROUP

Return values:

#number:

The number of GROUPs alive.

#number:

The number of UNITs alive.

Includes only active groups when the activity filter is enabled.

Defined in:

SET_OPSGROUP

Parameter:

#boolean Active

(Optional) Enable the activity filter. Defaults to true. Passing false disables this criterion.

Return value:

Usage:

local GroupSet = SET_OPSGROUP:New():FilterCoalitions("blue"):FilterActive():FilterOnce()
-- Reapply the coalition filter with inactive groups included.
GroupSet:FilterActive(false):FilterOnce()

Builds a set of groups out of categories.

Possible current categories are:

  • "plane" for fixed wing groups
  • "helicopter" for rotary wing groups
  • "ground" for ground groups
  • "ship" for naval groups

Defined in:

SET_OPSGROUP

Parameters:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship" or combinations as a table, for example {"plane", "helicopter"}.

#boolean Clear

If true, clear any previously defined filters.

Return value:

Builds a set of groups out of aicraft category (planes and helicopters).

Defined in:

SET_OPSGROUP

Return value:

Builds a set of groups out of airplane category.

Defined in:

SET_OPSGROUP

Return value:

Builds a set of groups out of ground category.

Defined in:

SET_OPSGROUP

Return value:

Builds a set of groups out of helicopter category.

Defined in:

SET_OPSGROUP

Return value:

Builds a set of groups out of ship category.

Defined in:

SET_OPSGROUP

Return value:

Builds a set of groups of defined countries.

Defined in:

SET_OPSGROUP

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

If true, clear any previously defined filters.

Return value:

Builds a set of groups that contain the given string in their group name.

Attention! Bad naming convention as this does not filter only prefixes but all groups that contain the string.

Defined in:

SET_OPSGROUP

Parameters:

#string Prefixes

The string pattern(s) that needs to be contained in the group name. Can also be passed as a #table of strings.

#boolean Clear

If true, clear any previously defined filters.

Return value:

Starts the filtering.

Defined in:

SET_OPSGROUP

Return value:

Stops the filtering.

Defined in:

SET_OPSGROUP

Return value:

Finds a ARMYGROUP based on the group name.

Defined in:

SET_OPSGROUP

Parameter:

#string GroupName

Name of the group.

Return value:

The found ARMYGROUP or #nil if the group is not in the set.

Finds a FLIGHTGROUP based on the group name.

Defined in:

SET_OPSGROUP

Parameter:

#string GroupName

Name of the group.

Return value:

The found FLIGHTGROUP or #nil if the group is not in the set.

Finds an OPSGROUP based on the group name.

Defined in:

SET_OPSGROUP

Parameter:

#string GroupName

Name of the group.

Return value:

The found OPSGROUP (FLIGHTGROUP, ARMYGROUP or NAVYGROUP) or #nil if the group is not in the set.

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_OPSGROUP

Parameter:

Event data table.

Return values:

#string:

The name of the GROUP.

The GROUP object.

Finds a NAVYGROUP based on the group name.

Defined in:

SET_OPSGROUP

Parameter:

#string GroupName

Name of the group.

Return value:

The found NAVYGROUP or #nil if the group is not in the set.

Iterate the set and call an iterator function for each OPSGROUP object.

Defined in:

SET_OPSGROUP

Parameters:

#function IteratorFunction

The function that will be called for all OPSGROUPs in the set. NOTE that the function must have the OPSGROUP as first parameter!

...

(Optional) arguments passed to the IteratorFunction.

Return value:

Gets a new set that only contains alive groups.

Defined in:

SET_OPSGROUP

Return value:

Check include object.

Defined in:

SET_OPSGROUP

Parameter:

The group that is checked for inclusion.

Return value:

Creates a new SET_OPSGROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_OPSGROUP

Return value:

Remove GROUP(s) or OPSGROUP(s) from the set.

Defined in:

SET_OPSGROUP

Parameter:

Wrapper.Group#GROUP RemoveGroupNames

A single name or an array of GROUP names.

Return value:

Handles the OnBirth event for the Set.

Defined in:

SET_OPSGROUP

Parameter:

Event data.

Handles the OnDead or OnCrash event for alive groups set.

Note: The GROUP object in the SET_OPSGROUP collection will only be removed if the last unit is destroyed of the GROUP.

Defined in:

SET_OPSGROUP

Parameter:

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_OPSZONE

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Add an OPSZONE to set.

Defined in:

SET_OPSZONE

Parameter:

The OPSZONE object.

Return value:

self

Clear all filters.

You still need to apply FilterOnce() to have an effect on the set.

Defined in:

SET_OPSZONE

Return value:

self

Filter the set once

Defined in:

SET_OPSZONE

Return value:

self

Builds a set of OPSZONEs that contain the given string in their name.

ATTENTION! Bad naming convention as this does not filter only prefixes but all zones that contain the string.

Defined in:

SET_OPSZONE

Parameters:

#string Prefixes

The string pattern(s) that needs to be contained in the zone name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_OPSZONE

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_OPSZONE

Return value:

self

Stops the filtering for the defined collection.

Defined in:

SET_OPSZONE

Return value:

self

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_OPSZONE

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Finds a Zone based on its name.

Defined in:

SET_OPSZONE

Parameter:

#string ZoneName

Return value:

The found Zone.

Iterate the SET_OPSZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters.

Defined in:

SET_OPSZONE

Parameters:

#function IteratorFunction

The function that will be called when there is an alive ZONE in the SET_OPSZONE. The function needs to accept a AIRBASE parameter.

...

Return value:

self

Get the closest OPSZONE from a given reference coordinate.

Only started zones are considered.

Defined in:

SET_OPSZONE

Parameters:

The reference coordinate from which the closest zone is determined.

#table Coalitions

Only consider the given coalition(s), e.g. {coaliton.side.RED} to find the closest red zone.

Return values:

The closest OPSZONE (if any).

#number:

Distance to ref coordinate in meters.

Get a random zone from the set.

Defined in:

SET_OPSZONE

Parameter:

#number margin

(Optional) Number of tries to find a zone. Default 100.

Return values:

The random Zone.

#nil:

if no zone in the collection or no zone was selected within margin tries.

Validate if a coordinate is in one of the zones in the set.

Returns the ZONE object where the coordiante is located. If zones overlap, the first zone that validates the test is returned.

Defined in:

SET_OPSZONE

Parameter:

The coordinate to be searched.

Return values:

The zone that validates the coordinate location.

#nil:

No zone has been found.

Private function that checks if an object is contained in the set or filtered.

Defined in:

SET_OPSZONE

Parameter:

The OPSZONE object.

Return value:

self

Creates a new SET_OPSZONE object, building a set of zones.

Defined in:

SET_OPSZONE

Return value:

self

Handles the DeleteZoneGoal event and removes the deleted OPSZONE from the set, unless the zone has NoDestroy set.

Only the OPSZONE object of the set is removed. Other zone goals with the same name are ignored.

Defined in:

SET_OPSZONE

Parameter:

Handles the NewZoneGoal event for the Set.

Only OPSZONE objects are added. Other zone goals, for example a ZONE_CAPTURE_COALITION with the same name, are ignored. If several OPSZONEs have the same name, the set takes the instance the DATABASE holds, which is the first one.

Defined in:

SET_OPSZONE

Parameter:

Remove ZONEs from SET_OPSZONE.

Defined in:

SET_OPSZONE

Parameter:

#table RemoveZoneNames

A single name or an array of OPSZONE names.

Return value:

self

Set a zone probability.

The probability is set for the zone of the OPSZONE.

Defined in:

SET_OPSZONE

Parameters:

#string ZoneName

The name of the zone.

#number Probability

The probability between 0 and 1. 0 = 0% and 1 = 100% probability.

Return value:

self

Start all opszones of the set.

Defined in:

SET_OPSZONE

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

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

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Add CLIENT(s) to SET_PLAYER.

Defined in:

SET_PLAYER

Parameter:

#string AddClientNames

A single name or an array of CLIENT names.

Return value:

self

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_PLAYER

Parameter:

Return values:

#string:

The name of the CLIENT

#table:

The CLIENT

Builds a set of clients out of categories joined by players.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_PLAYER

Parameter:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

Return value:

self

Builds a set of clients of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_PLAYER

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

Builds a set of PLAYERs that contain the given string in their unit/pilot name.

Attention! Bad naming convention as this does not filter only prefixes but all player clients that contain the string.

Defined in:

SET_PLAYER

Parameter:

#string Prefixes

The string pattern(s) that needs to be contained in the unit/pilot name. Can also be passed as a #table of strings.

Return value:

self

Starts the filtering.

Defined in:

SET_PLAYER

Return value:

self

Builds a set of clients of defined client types joined by players.

Possible current types are those types known within DCS world.

Defined in:

SET_PLAYER

Parameter:

#string Types

Can take those type strings known within DCS world.

Return value:

self

Builds a set of players in zones.

Defined in:

SET_PLAYER

Parameter:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

Return value:

self

Finds a Client based on the Player Name.

Defined in:

SET_PLAYER

Parameter:

#string PlayerName

Return value:

The found Client.

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_PLAYER

Parameter:

Return values:

#string:

The name of the CLIENT

#table:

The CLIENT

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT, providing the CLIENT and optional parameters.

Defined in:

SET_PLAYER

Parameters:

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

...

Return value:

self

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Core.Zone, providing the CLIENT and optional parameters to the called function.

Defined in:

SET_PLAYER

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

...

Return value:

self

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Core.Zone, providing the CLIENT and optional parameters to the called function.

Defined in:

SET_PLAYER

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

...

Return value:

self

Defined in:

SET_PLAYER

Parameter:

Return value:

self

Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_PLAYER

Return value:

Usage:

-- Define a new SET_PLAYER Object. This DBObject will contain a reference to all Clients.
DBObject = SET_PLAYER:New()

Remove CLIENT(s) from SET_PLAYER.

Defined in:

SET_PLAYER

Parameter:

Wrapper.Client#CLIENT RemoveClientNames

A single name or an array of CLIENT names.

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

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

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

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Add SCENERY(s) to SET_SCENERY.

Defined in:

SET_SCENERY

Parameter:

A single SCENERY object.

Return value:

self

Add SCENERY(s) to SET_SCENERY.

Defined in:

SET_SCENERY

Parameter:

#string AddSceneryNames

A single name or an array of SCENERY zone names.

Return value:

self

Iterate the SET_SCENERY and count how many SCENERYSs are alive.

Defined in:

SET_SCENERY

Return value:

#number:

The number of SCENERYSs alive.

Applies the current criteria to the scenery already collected in this set.

Removes entries that do not match. Use New(ZoneSet) or NewFromZone(Zone) to find scenery.

Defined in:

SET_SCENERY

Return value:

self

Builds a set of SCENERYs that contain the given string in their name.

Attention! Bad naming convention as this does not filter only prefixes but all scenery that contain the string.

Defined in:

SET_SCENERY

Parameters:

#string Prefixes

The string pattern(s) that need to be contained in the scenery name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of SCENERYs that contain an exact match of the "ROLE" property.

Defined in:

SET_SCENERY

Parameters:

#string Role

The string pattern(s) that needs to exactly match the scenery "ROLE" property from the ME quad-zone properties. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of scenery objects in zones.

Defined in:

SET_SCENERY

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Finds a Scenery in the SET, based on the Scenery Name.

Defined in:

SET_SCENERY

Parameter:

#string SceneryName

Return value:

The found Scenery.

Iterate the SET_SCENERY and call an iterator function for each alive SCENERY, providing the SCENERY and optional parameters.

Defined in:

SET_SCENERY

Parameters:

#function IteratorFunction

The function that will be called when there is an alive SCENERY in the SET_SCENERY. The function needs to accept a SCENERY parameter.

...

Return value:

self

Get a table of alive objects.

Defined in:

SET_SCENERY

Return values:

#table:

Table of alive objects

SET of alive objects

Get the center coordinate of the SET_SCENERY.

Defined in:

SET_SCENERY

Return value:

A new coordinate at the center of the bounding box of all objects in the set, or nil if the set is empty.

Count overall current lifepoints of the SET objects.

Defined in:

SET_SCENERY

Return value:

#number:

LifePoints

Count overall initial (Life0) lifepoints of the SET objects.

Defined in:

SET_SCENERY

Return value:

#number:

LIfe0Points

Calculate current relative lifepoints of the SET objects, i.e.

Life divided by Life0 as percentage value, eg 75 meaning 75% alive. CAVEAT: Some objects change their life value or "hitpoints" after the first hit. Hence we will adjust the Life0 value to 120% of the last life value if life exceeds life0 ata any point. Thus we will get a smooth percentage decrease, if you use this e.g. as success criteria for a bombing task.

Defined in:

SET_SCENERY

Return value:

#number:

LifePoints, 0 if the set is empty or has no initial life points.

[Internal] Determine if an object is to be included in the SET

Defined in:

SET_SCENERY

Parameter:

Return value:

self

Creates a new SET_SCENERY object.

Scenery is not auto-registered in the Moose database, there are too many objects on each map. Hence we need to find them first. For this we are using a SET_ZONE.

Defined in:

SET_SCENERY

Parameter:

#SET_ZONE ZoneSet

SET_ZONE of ZONE objects as created by right-clicks on the map in the mission editor, choosing "assign as...". Rename the zones for grouping purposes, e.g. all sections of a bridge as "Bridge-1" to "Bridge-3".

Return value:

Usage:

-- Define a new SET_SCENERY Object. This Object will contain a reference to all added Scenery Objects.
   ZoneSet = SET_ZONE:New():FilterPrefixes("Bridge"):FilterOnce()
   mysceneryset = SET_SCENERY:New(ZoneSet)

Creates a new SET_SCENERY object.

Scenery is not auto-registered in the Moose database, there are too many objects on each map. Hence we need to find them first. For this we scan the zone.

Defined in:

SET_SCENERY

Parameters:

The zone to be scanned. Can be a ZONE_RADIUS (round) or a ZONE_POLYGON (e.g. Quad-Point)

#boolean HasKey

If true, the zone has a property name "SKey" which "Value" part will be searched in the Scenery type name.

Return value:

Remove SCENERY(s) from SET_SCENERY.

Defined in:

SET_SCENERY

Parameter:

Wrapper.Scenery#SCENERY RemoveSceneryNames

A single name or an array of SCENERY zone names.

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and succumbs to Davy Jones' Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not multiplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_STATIC

Parameter:

Return values:

#string:

The name of the STATIC

#table:

The STATIC

Add STATIC(s) to SET_STATIC.

Defined in:

SET_STATIC

Parameter:

A single STATIC.

Return value:

self

Add STATIC(s) to SET_STATIC.

Defined in:

SET_STATIC

Parameter:

#string AddStaticNames

A single name or an array of STATIC names.

Return value:

self

Calculate the maximum A2G threat level of the SET_STATIC.

Defined in:

SET_STATIC

Return value:

#number:

The maximum threatlevel

Iterate the SET_STATIC and count how many STATICSs are alive.

Defined in:

SET_STATIC

Return value:

#number:

The number of UNITs alive.

Builds a set of statics out of categories.

Possible current categories are plane, helicopter, ground, ship, structure.

Defined in:

SET_STATIC

Parameters:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship", "structure".

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_STATIC

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Builds a set of units of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_STATIC

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_STATIC

Parameters:

#function ConditionFunction

Receives the STATIC followed by the optional arguments. Any return value other than false or nil passes.

...

Condition function arguments if any.

Return value:

self

Usage:

local statics = SET_STATIC:New():FilterCoalitions("blue")
statics:FilterFunction(function(static)
  return static:GetName() ~= "Exclude Me"
end):FilterOnce()

Filter the set once

Defined in:

SET_STATIC

Return value:

self

Builds a set of STATICs that contain the given string in their name.

Attention! Bad naming convention as this does not filter only prefixes but all statics that contain the string.

Defined in:

SET_STATIC

Parameters:

#string Prefixes

The string pattern(s) that need to be contained in the static name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_STATIC

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_STATIC

Return value:

self

Stops the filtering.

Defined in:

SET_STATIC

Return value:

self

Builds a set of units of defined unit types.

Possible current types are those types known within DCS world.

Defined in:

SET_STATIC

Parameters:

#string Types

Can take those type strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of statics in zones.

Defined in:

SET_STATIC

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_STATIC

Parameter:

Return values:

#string:

The name of the STATIC

#table:

The STATIC

Finds a Static based on the Static Name.

Defined in:

SET_STATIC

Parameter:

#string StaticName

Return value:

The found Static.

Iterate the SET_STATIC and call an iterator function for each alive STATIC, providing the STATIC and optional parameters.

Defined in:

SET_STATIC

Parameters:

#function IteratorFunction

The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

...

Return value:

self

Iterate the SET_STATIC and call an iterator function for each alive STATIC presence completely in a Core.Zone, providing the STATIC and optional parameters to the called function.

Defined in:

SET_STATIC

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

...

Return value:

self

Iterate the SET_STATIC and call an iterator function for each STATIC in a Core.Zone, providing the STATIC and optional parameters to the called function.

For compatibility, a call without zone, i.e. with the iterator function as first argument, iterates over all statics like before and logs an error.

Defined in:

SET_STATIC

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is a STATIC in the zone. The function needs to accept a STATIC parameter.

...

Return value:

self

Iterate the SET_STATIC and call an iterator function for each alive STATIC presence not in a Core.Zone, providing the STATIC and optional parameters to the called function.

Defined in:

SET_STATIC

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

...

Return value:

self

Get the closest static of the set with respect to a given reference coordinate.

Optionally, only statics of given coalitions are considered in the search.

Defined in:

SET_STATIC

Parameters:

Reference Coordinate from which the closest static is determined.

Coalitions

Return values:

The closest static (if any).

#number:

Distance in meters to the closest static.

Get the center coordinate of the SET_STATIC.

Defined in:

SET_STATIC

Return value:

The center of the bounding box of all alive statics with velocity 0, or nil if no static is alive.

Get the first unit from the set.

Defined in:

SET_STATIC

Return value:

The STATIC object.

Get the average heading of the SET_STATIC.

Defined in:

SET_STATIC

Return value:

#number:

Heading Heading in degrees and speed in mps in case of moving units.

Returns map of unit types.

Defined in:

SET_STATIC

Return value:

#map<#string,#number>:

A map of the unit types found. The key is the StaticTypeName and the value is the amount of unit types found.

Returns a comma separated string of the unit types with a count in the Core.Set.

Defined in:

SET_STATIC

Return value:

#string:

The unit types string

Retrieve the type names of the Wrapper.Statics in the SET, delimited by an optional delimiter.

Defined in:

SET_STATIC

Parameter:

#string Delimiter

(Optional) The delimiter, which is default a comma.

Return value:

#string:

The types of the Wrapper.Statics delimited.

Get the maximum velocity of the SET_STATIC.

Defined in:

SET_STATIC

Return value:

#number:

The speed in mps in case of moving units.

Defined in:

SET_STATIC

Parameter:

Return value:

self

Check if no alive element of the SET_STATIC is in the Zone.

Defined in:

SET_STATIC

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if no alive static is in the zone.

Check if at least one alive element of the SET_STATIC is in the Zone.

Defined in:

SET_STATIC

Parameter:

The Zone to be tested for.

Return value:

#boolean:

true if at least one alive static is in the zone.

Creates a new SET_STATIC object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_STATIC

Return value:

Usage:

-- Define a new SET_STATIC Object. This DBObject will contain a reference to all alive Statics.
DBObject = SET_STATIC:New()

Remove STATIC(s) from SET_STATIC.

Defined in:

SET_STATIC

Parameter:

Wrapper.Static#STATIC RemoveStaticNames

A single name or an array of STATIC names.

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and succumbs to Davy Jones' Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not multiplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_UNIT

Parameter:

Return values:

#string:

The name of the UNIT

#table:

The UNIT

Add UNIT(s) to SET_UNIT.

Defined in:

SET_UNIT

Parameter:

A single UNIT.

Return value:

self

Add UNIT(s) to SET_UNIT.

Defined in:

SET_UNIT

Parameter:

#string AddUnitNames

A single name or an array of UNIT names.

Return value:

self

Calculate the maximum A2G threat level of the SET_UNIT.

Defined in:

SET_UNIT

Return value:

#number:

The maximum threat level

Count Alive Units

Defined in:

SET_UNIT

Return value:

self

Includes only active units when the activity filter is enabled.

Defined in:

SET_UNIT

Parameter:

#boolean Active

(Optional) Enable the activity filter. Defaults to true. Passing false disables this criterion.

Return value:

self

Usage:

local UnitSet = SET_UNIT:New():FilterCoalitions("blue"):FilterActive():FilterOnce()
-- Reapply the coalition filter with inactive units included.
UnitSet:FilterActive(false):FilterOnce()

Builds a set of units which exist and are alive.

Defined in:

SET_UNIT

Return value:

self

Builds a set of units out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_UNIT

Parameters:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_UNIT

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Builds a set of units of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_UNIT

Parameters:

#string Countries

Can take those country strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_UNIT

Parameters:

#function ConditionFunction

Receives the UNIT followed by the optional arguments. Any return value other than false or nil passes.

...

Condition function arguments if any.

Return value:

self

Usage:

         -- Image you want to exclude a specific UNIT from a SET:
         local groundset = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterFunction(
         -- The function needs to take a UNIT object as first - and in this case, only - argument.
         function(unit)
             local isinclude = true
             if unit:GetName() == "Exclude Me" then isinclude = false end
             return isinclude
         end
        ):FilterOnce()
         BASE:I(groundset:Flush())

Builds a set of units which belong to groups with certain group names.

Defined in:

SET_UNIT

Parameter:

#string Prefixes

The (partial) group names to look for. Can be a single string or a table of strings.

Return value:

self

Builds a set of units having a radar of give types.

All the units having a radar of a given type will be included within the set.

Defined in:

SET_UNIT

Parameters:

#table RadarTypes

The radar types.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Builds a set of SEADable units.

Defined in:

SET_UNIT

Return value:

self

Filter the set once

Defined in:

SET_UNIT

Return value:

self

Builds a set of UNITs that contain a given string in their unit name.

Attention! Bad naming convention as this does not filter only prefixes but all units that contain the string.

Defined in:

SET_UNIT

Parameters:

#string Prefixes

The string pattern(s) that needs to be contained in the unit name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_UNIT

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_UNIT

Return value:

self

Stops the filtering.

Defined in:

SET_UNIT

Return value:

self

Builds a set of units of defined unit types.

Possible current types are those types known within DCS world.

Defined in:

SET_UNIT

Parameters:

#string Types

Can take those type strings known within DCS world.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set filter timer interval for FilterZones if using active filtering with FilterStart().

Defined in:

SET_UNIT

Parameter:

#number Seconds

(Optional) Seconds between check intervals, defaults to 30. Caution - do not be too agressive with timing! Groups are usually not moving fast enough to warrant a check of below 10 seconds.

Return value:

self

Builds a set of units in zones.

Defined in:

SET_UNIT

Parameters:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_UNIT

Parameter:

Return values:

#string:

The name of the UNIT

#table:

The UNIT

Finds a Unit based on the Unit Name.

Defined in:

SET_UNIT

Parameter:

#string UnitName

Return value:

The found Unit.

Iterate the SET_UNIT and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

Defined in:

SET_UNIT

Parameters:

#function IteratorFunction

The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

...

Return value:

self

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Core.Zone, providing the UNIT and optional parameters to the called function.

Defined in:

SET_UNIT

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

...

Return value:

self

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Core.Zone, providing the UNIT and optional parameters to the called function.

Defined in:

SET_UNIT

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

#function IteratorFunction

The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

...

Return value:

self

Iterate the SET_UNIT sorted *per Threat Level and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

Defined in:

SET_UNIT

Parameters:

#number FromThreatLevel

The TreatLevel to start the evaluation From (this must be a value between 0 and 10).

#number ToThreatLevel

The TreatLevel to stop the evaluation To (this must be a value between 0 and 10).

#function IteratorFunction

The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

...

Return value:

self

Usage:


    UnitSet:ForEachUnitPerThreatLevel(10, 0,
      -- @param Wrapper.Unit#UNIT UnitObject The UNIT object in the UnitSet, that will be passed to the local function for evaluation.
      function(UnitObject)
        .. logic ..
      end
   )

Gets the alive set.

Defined in:

SET_UNIT

Return values:

#table:

Table of alive UNIT objects

AliveSet

Get the center coordinate of the SET_UNIT.

Defined in:

SET_UNIT

Return value:

The center coordinate of all the units in the set, including heading in degrees and speed in mps in case of moving units.

Get the first unit from the set.

Defined in:

SET_UNIT

Return value:

The UNIT object.

Get the common heading of the moving alive units in the SET_UNIT.

Defined in:

SET_UNIT

Return value:

#number:

Heading in degrees of the first moving unit, or nil if no unit is moving or the headings of the moving units differ by more than 5 degrees.

Get the SET of the SET_UNIT sorted per Threat Level.

Defined in:

SET_UNIT

Parameters:

#number FromThreatLevel

The TreatLevel to start the evaluation From (this must be a value between 0 and 10).

#number ToThreatLevel

The TreatLevel to stop the evaluation To (this must be a value between 0 and 10).

Return value:

#table:

Array of UNIT objects ordered by threat level. Empty if the set is empty.

Retrieve the type names of the Wrapper.Units in the SET, delimited by an optional delimiter.

Defined in:

SET_UNIT

Parameter:

#string Delimiter

(Optional) The delimiter, which is default a comma.

Return value:

#string:

The types of the Wrapper.Units delimited.

Returns map of unit threat levels.

Defined in:

SET_UNIT

Return value:

#table:

Returns map of unit types.

Defined in:

SET_UNIT

Return value:

#map<#string,#number>:

A map of the unit types found. The key is the UnitTypeName and the value is the amount of unit types found.

Returns a comma separated string of the unit types with a count in the Core.Set.

Defined in:

SET_UNIT

Return value:

#string:

The unit types string

Get the maximum velocity of the alive units in the SET_UNIT.

Defined in:

SET_UNIT

Return value:

#number:

The speed in mps. Zero if no unit is alive or moving.

Returns if the Core.Set has air targets.

Defined in:

SET_UNIT

Return value:

#number:

The amount of air targets in the Set.

Returns if the Core.Set has friendly ground units.

Defined in:

SET_UNIT

Parameter:

FriendlyCoalition

Return value:

#number:

The amount of ground targets in the Set.

Returns if the Core.Set has ground targets.

Defined in:

SET_UNIT

Return value:

#number:

The amount of ground targets in the Set.

Returns if the Core.Set has targets having a radar (of a given type).

Defined in:

SET_UNIT

Parameter:

DCS#Unit.RadarType RadarType

Return value:

#number:

The amount of radars in the Set with the given type

Returns if the Core.Set has targets that can be SEADed.

Defined in:

SET_UNIT

Return value:

#number:

The amount of SEADable units in the Set

Defined in:

SET_UNIT

Parameter:

Return value:

self

Check if no element of the SET_UNIT is in the Zone.

Defined in:

SET_UNIT

Parameter:

The Zone to be tested for.

Return value:

#boolean:

Check if minimal one element of the SET_UNIT is in the Zone.

Defined in:

SET_UNIT

Parameter:

Core.Zone#ZONE ZoneTest

The Zone to be tested for.

Return value:

#boolean:

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

SET_UNIT

Return value:

Usage:

-- Define a new SET_UNIT Object. This DBObject will contain a reference to all alive Units.
DBObject = SET_UNIT:New()

Remove UNIT(s) from SET_UNIT.

Defined in:

SET_UNIT

Parameter:

#table RemoveUnitNames

A single name or an array of UNIT names.

Return value:

Iterate the SET_UNIT and set for each unit the default cargo bay weight limit.

Defined in:

SET_UNIT

Usage:

-- Set the default cargo bay weight limits of the carrier units.
local MySetUnit = SET_UNIT:New()
MySetUnit:SetCargoBayWeightLimit()

[Internal] Private function for use of continous zone filter

Defined in:

SET_UNIT

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and succumbs to Davy Jones' Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not multiplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_ZONE

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Add ZONEs to SET_ZONE.

Defined in:

SET_ZONE

Parameter:

A ZONE_BASE object.

Return value:

self

Add ZONEs by a search name to SET_ZONE.

Defined in:

SET_ZONE

Parameter:

#string AddZoneNames

A single name or an array of ZONE_BASE names.

Return value:

self

Draw all zones in the set on the F10 map.

Defined in:

SET_ZONE

Parameters:

#number Coalition

(Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.

#table Color

RGB color table {r, g, b}, e.g. {1,0,0} for red.

#number Alpha

(Optional) Transparency [0,1]. Default 1.

#table FillColor

(Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as Color value.

#number FillAlpha

(Optional) Transparency [0,1]. Default 0.15.

#number LineType

(Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.

#boolean ReadOnly

(Optional) Mark is readonly and cannot be removed by users. Default false.

Return value:

self

Filter the set once

Defined in:

SET_ZONE

Return value:

self

Builds a set of ZONEs that contain the given string in their name.

ATTENTION! Bad naming convention as this does not filter only prefixes but all zones that contain the string.

Defined in:

SET_ZONE

Parameters:

#string Prefixes

The string pattern(s) that need to be contained in the zone name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

self

Set Regex Options for FilterPrefix function.

Defined in:

SET_ZONE

Parameters:

#boolean NoRegex

If true, switch off Regex pattern matching for FilterPrefixes.

#boolean ReplaceDash

If false, switch off dash "-" replacement in strings for FilterPrefixes.

Return value:

self

Starts the filtering.

Defined in:

SET_ZONE

Return value:

self

Stops the filtering for the defined collection.

Defined in:

SET_ZONE

Return value:

self

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_ZONE

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Finds a Zone based on the Zone Name.

Defined in:

SET_ZONE

Parameter:

#string ZoneName

Return value:

The found Zone.

Iterate the SET_ZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters.

Defined in:

SET_ZONE

Parameters:

#function IteratorFunction

The function that will be called when there is an alive ZONE in the SET_ZONE. The function needs to accept a AIRBASE parameter.

...

Return value:

self

Get the average aggregated coordinate of this set of zones.

Defined in:

SET_ZONE

Return value:

Get the closest zone to a given coordinate.

Defined in:

SET_ZONE

Parameter:

The reference coordinate from which the closest zone is determined.

Return values:

The closest zone (if any).

#number:

Distance to ref coordinate in meters.

Get a random zone from the set.

Defined in:

SET_ZONE

Parameter:

#number margin

(Optional) Number of tries to find a zone. Default 100.

Return values:

The random Zone.

#nil:

if no zone in the collection or no zone was selected within margin tries.

Validate if a coordinate is in one of the zones in the set.

Returns the ZONE object where the coordinate is located. If zones overlap, the first zone that validates the test is returned.

Defined in:

SET_ZONE

Parameter:

The coordinate to be searched.

Return value:

The zone (if any) that validates the coordinate location.

Private function.

Defined in:

SET_ZONE

Parameter:

Return value:

self

Creates a new SET_ZONE object, building a set of zones.

Defined in:

SET_ZONE

Return value:

self

Usage:

-- Define a new SET_ZONE Object. The DatabaseSet will contain a reference to all Zones.
DatabaseSet = SET_ZONE:New()

On After "EnteredZone" event.

An observed object has entered the zone.

Defined in:

SET_ZONE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The controllable entering the zone.

The zone entered.

On After "LeftZone" event.

An observed object has left the zone.

Defined in:

SET_ZONE

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The controllable leaving the zone.

The zone left.

Handles the DeleteZone event and removes the deleted zone from the set, unless the zone has NoDestroy set.

The zone is taken from the event, because the DATABASE has already removed it when this handler runs. Only the zone of the set is removed, not another instance with the same name.

Defined in:

SET_ZONE

Parameter:

Handles the OnEventNewZone event for the Set.

If the DATABASE already holds a zone with the same name, the set uses that zone, like the DATABASE, which keeps the first zone of a name.

Defined in:

SET_ZONE

Parameter:

Remove ZONEs from SET_ZONE.

Defined in:

SET_ZONE

Parameter:

Core.Zone#ZONE_BASE RemoveZoneNames

A single name or an array of ZONE_BASE names.

Return value:

self

Set the check time for SET_ZONE:Trigger()

Defined in:

SET_ZONE

Parameter:

#number seconds

(Optional) Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.

Return value:

self

Toggle “partly-inside” handling for every zone in the set when those zones are used with :Trigger().

  • Call with no argument or true → enable for all.
  • Call with false → disable again (handy if it was enabled before).

Defined in:

SET_ZONE

Parameter:

state

Return value:

self

Sets the zone's probability of being accepted on a draw by GetRandomZone().

Defined in:

SET_ZONE

Parameters:

#string ZoneName

The name of the zone in this set.

#number ZoneProbability

(Optional) Probability from 0 to 1, where 1 is 100%. Defaults to 1.

Start watching if the Object or Objects move into or out of our set of zones.

Defined in:

SET_ZONE

Parameter:

Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET_UNIT, SET_GROUP, SET_CLIENT

Return value:

self

Usage:

         -- Create a SET_GROUP and a SET_ZONE for this:

         local groupset = SET_GROUP:New():FilterPrefixes("Aerial"):FilterStart()
         
         -- Trigger will check each zone of the SET_ZONE every 5 secs for objects entering or leaving from the groupset
         local zoneset = SET_ZONE:New():FilterPrefixes("Target Zone"):FilterOnce():Trigger(groupset)
         
         -- Draw zones on map so we see what's going on
         zoneset:ForEachZone(
           function(zone)
             zone:DrawZone(-1, {0,1,0}, Alpha, FillColor, FillAlpha, 4, ReadOnly)
           end 
        )
         
         -- This FSM function will be called for entering objects
         function zoneset:OnAfterEnteredZone(From,Event,To,Controllable,Zone)
           MESSAGE:New("Group "..Controllable:GetName() .. " entered zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
         end
         
         -- This FSM function will be called for leaving objects
         function zoneset:OnAfterLeftZone(From,Event,To,Controllable,Zone)
           MESSAGE:New("Group "..Controllable:GetName() .. " left zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
         end
         
         -- Stop watching after 1 hour
         zoneset:__TriggerStop(3600)
         -- Call :SetPartlyInside() on any zone (or SET_ZONE) if you want GROUPs to count as inside when any of their units enters even if they are far apart.
         -- Make sure to call :SetPartlyInside() before :Trigger()!.

Triggers the FSM event "TriggerStop".

Stops the SET_ZONE Trigger.

Defined in:

SET_ZONE

(Internal) Check if a trigger object is in a zone.

With PartlyInside set on the zone, a GROUP is inside as soon as any of its units is inside. Otherwise the coordinate of the object is checked.

Defined in:

SET_ZONE

Parameters:

The zone.

Return value:

#boolean:

If true, the object is in the zone.

(Internal) Check the assigned objects for being in/out of the zone

Defined in:

SET_ZONE

Parameter:

#boolean fromstart

If true, do the init of the objects

Return value:

self

Triggers the FSM event "TriggerStop" after a delay.

Defined in:

SET_ZONE

Parameter:

#number delay

Delay in seconds.

(Internal) Check the assigned objects for being in/out of the zone

Defined in:

SET_ZONE

Parameters:

#string From

#string Event

#string to

To

Return value:

self

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and succumbs to Davy Jones' Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not multiplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

Function(s)

Handles the Database to check on an event (birth) that the Object was added in the Database.

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

Defined in:

SET_ZONE_GOAL

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Add ZONEs to SET_ZONE_GOAL.

Defined in:

SET_ZONE_GOAL

Parameter:

A ZONE_BASE object.

Return value:

self

Builds a set of ZONE_GOALs that contain the given string in their name.

ATTENTION! Bad naming convention as this does not filter only prefixes but all zones that contain the string.

Defined in:

SET_ZONE_GOAL

Parameters:

#string Prefixes

The string pattern(s) that needs to be contained in the zone name. Can also be passed as a #table of strings.

#boolean Clear

(Optional) If true, clear any previously defined values of this filter.

Return value:

Starts the filtering.

Defined in:

SET_ZONE_GOAL

Return value:

Stops the filtering for the defined collection.

Defined in:

SET_ZONE_GOAL

Return value:

Handles the Database to check on any event that Object exists in the Database.

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

Defined in:

SET_ZONE_GOAL

Parameter:

Return values:

#string:

The name of the AIRBASE

#table:

The AIRBASE

Finds a Zone based on the Zone Name.

Defined in:

SET_ZONE_GOAL

Parameter:

#string ZoneName

Return value:

The found Zone.

Iterate the SET_ZONE_GOAL and call an iterator function for each ZONE, providing the ZONE and optional parameters.

Defined in:

SET_ZONE_GOAL

Parameters:

#function IteratorFunction

The function that will be called when there is an alive ZONE in the SET_ZONE_GOAL. The function needs to accept a AIRBASE parameter.

...

Return value:

Get a random zone from the set.

Defined in:

SET_ZONE_GOAL

Parameter:

#number margin

(Optional) Number of tries to find a zone. Default 100.

Return values:

The random Zone.

#nil:

if no zone in the collection or no zone was selected within margin tries.

Validate if a coordinate is in one of the zones in the set.

Returns the ZONE object where the coordiante is located. If zones overlap, the first zone that validates the test is returned.

Defined in:

SET_ZONE_GOAL

Parameter:

The coordinate to be searched.

Return values:

The zone that validates the coordinate location.

#nil:

No zone has been found.

Defined in:

SET_ZONE_GOAL

Parameter:

Return value:

Creates a new SET_ZONE_GOAL object, building a set of zones.

Defined in:

SET_ZONE_GOAL

Return value:

Usage:

-- Define a new SET_ZONE_GOAL Object. The DatabaseSet will contain a reference to all Zones.
DatabaseSet = SET_ZONE_GOAL:New()

Handles the DeleteZoneGoal event and removes the deleted zone from the set, unless the zone has NoDestroy set.

The zone is taken from the event, because the DATABASE has already removed it when this handler runs. Only the zone goal of the set is removed, not another instance with the same name.

Defined in:

SET_ZONE_GOAL

Parameter:

Handles the NewZoneGoal event for the Set.

If several zone goals have the same name, the set takes the instance the DATABASE holds, which is the first one. So a running set and a set started later contain the same object.

Defined in:

SET_ZONE_GOAL

Parameter:

Remove ZONEs from SET_ZONE_GOAL.

Defined in:

SET_ZONE_GOAL

Parameter:

Core.Zone#ZONE_BASE RemoveZoneNames

A single name or an array of ZONE_BASE names.

Return value:

self

Sets the zone goal's probability of being accepted on a draw by GetRandomZone().

Defined in:

SET_ZONE_GOAL

Parameters:

#string ZoneName

The name of the zone goal in this set.

#number ZoneProbability

(Optional) Probability from 0 to 1, where 1 is 100%. Defaults to 1.

Field(s)

Function(s)

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

self

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

self

Add a SET to this set.

Defined in:

Parameter:

Set to add.

Return value:

self

Clear the Objects in the Set.

Defined in:

Parameter:

#boolean TriggerEvent

If true, an event remove is triggered for each group that is removed from the set.

Return value:

self

Merge the objects of SetB, which pass the filters of SetA, into SetA.

Defined in:

Parameters:

First set. The objects are added to this set.

Set to be merged into first set.

Return value:

SetA, which now also contains the objects of SetB passing the filters of SetA.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clears all filter criteria and stops the periodic zone filter if it is running.

Keeps the current set members and event subscriptions. Call FilterOnce() to apply the cleared criteria to the source table.

Defined in:

Return value:

self

Builds a set of objects of same coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" and coalition.side.RED, coalition.side.BLUE,coalition.side.NEUTRAL

#boolean Clear

If true, clear any previously defined filters.

Return value:

self

Starts the filtering of the Crash events for the collection.

Defined in:

Return value:

self

Starts the filtering of the Dead events for the collection.

Defined in:

Return value:

self

Adds a custom filter condition.

An object must pass all registered conditions.

Defined in:

Parameters:

#function ConditionFunction

Receives the object followed by the optional arguments. Any return value other than false or nil passes.

...

Optional arguments passed after the object.

Return value:

self

Applies the current filter criteria to the set's source table once.

Adds matching source entries and removes nonmatching source entries from this set. Leaves manually added entries outside the source table alone.

Defined in:

Return value:

self

Configures the search options for FilterPrefixes() and other name filters that use these options.

Defined in:

Parameters:

#boolean NoRegex

(Optional) If true, search for literal text. If omitted, keep the current setting.

#boolean ReplaceDash

(Optional) Whether to escape hyphens in Lua patterns. Defaults to true on each call.

Return value:

self

Stops the filtering for the defined collection.

Defined in:

Return value:

self

Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#COORDINATE.

Defined in:

Parameter:

A Core.Point#COORDINATE object (but not a simple DCS#Vec2!) from where to evaluate the closest object in the set.

Return value:

The closest object.

Usage:

         myset:FindNearestObjectFromPointVec2(ZONE:New("Test Zone"):GetCoordinate())

Flushes the current SET_BASE contents in the log ...

(for debugging reasons).

Defined in:

Parameter:

Core.Base#BASE MasterObject

(Optional) The master object as a reference.

Return value:

#string:

A string with the names of the objects.

Calls an iterator synchronously for each entry passing the optional condition.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Calls an iterator synchronously for matching entries up to the evaluation limit set by SetSomeIteratorLimit().

If no limit is set, the default is the number of objects in this set.

Defined in:

Parameters:

#function IteratorFunction

Receives the object followed by the iterator arguments.

#table arg

(Optional) Iterator arguments passed after the object.

#table Set

(Optional) Table of objects to iterate. Defaults to self:GetSet().

#function Function

(Optional) Condition called with its arguments followed by the object. Only a true return value calls the iterator.

#table FunctionArguments

(Optional) Condition arguments passed before the object.

Return value:

self

Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

Get a new set table that only contains alive objects.

Defined in:

Return value:

#table:

Set table of alive objects.

Gets the first object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets the last object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

Gets a string with all the object names.

Defined in:

Return value:

#string:

A string with the names of the objects.

Gets a random object from the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

or nil if none found or the SET is empty!

Gets a random object from the Core.Set#SET_BASE and derived classes.

A bit slower than SET_BASE.GetRandom() but tries to ensure you get an object back if the SET is not empty.

Defined in:

Return value:

or nil if the SET is empty!

Gets the Set.

Defined in:

Return value:

self

Gets a new set containing the entries of SetB whose stored names are absent from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as set B with the objects that are in set B but not in this set A .

Gets a new set containing the entries whose stored names occur in both sets.

Each entry in the result uses the object from this set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of the same class as this set A with the objects that are included in set A and in set B .

Gets a list of the Names of the Objects in the Set.

Defined in:

Return value:

#table:

Table of names.

Returns a table of the Objects in the Set.

Defined in:

Return value:

#table:

Table of objects.

Gets a new set containing the union of the two sets by stored name.

When a name is present in both sets, the object from SetB takes precedence.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B . It has the class of both sets, if they have the same class, and is a SET_BASE otherwise.

Get the SET iterator "limit".

Defined in:

Return value:

#number:

Defines how many objects are evaluated of the set as part of the Some iterators.

Get max threat level of all objects in the SET.

Defined in:

Return value:

#number:

Max threat level found.

Decides whether an object is in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is in set and false otherwise.

Checks whether all or optionally any objects is inside a given zone.

Defined in:

Parameters:

The zone.

#boolean Any

If true, at least one object has to be inside the zone. If false or nil, all objects need to be in the zone.

Return value:

#boolean:

Returns true if objects are in the zone and false otherwise. An empty set returns false with Any and true without.

Decides whether to include the Object.

Defined in:

Parameter:

#table Object

Return value:

self

Decides whether an object is not in the SET

Defined in:

Parameter:

#table Object

Return value:

#boolean:

true if object is not in set and false otherwise.

Creates an empty set.

Defined in:

Parameter:

#table Database

(Optional) Source table keyed by object name. Supply a source table to use FilterOnce().

Return value:

The new set.

Usage:

local set = SET_BASE:New()

Added Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removed Handler OnAfter for SET_BASE

Defined in:

Parameters:

#string From

#string Event

#string To

#string ObjectName

The name of the object.

Object

The object.

Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

Defined in:

Parameters:

#string ObjectName

#boolean NoTriggerEvent

(Optional) When true, the :Remove() method will not trigger a Removed event.

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

Defined in:

Parameter:

#SET_BASE BaseSet

Return value:

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

(Optional) Defines how many objects are evaluated of the set as part of the Some iterators. The default is 1.

Return value:

self

Sort the set by name.

Defined in:

Return value:

self

[Internal] Tests the object against all custom filter conditions.

Defined in:

Parameter:

The object to test.

Return value:

#boolean:

true if every condition returned a value other than false or nil.

Handles the OnBirth event for the Set.

Defined in:

Parameter:

Handles the OnDead or OnCrash event for alive units set.

Defined in:

Parameter:

Starts the filtering for the defined collection.

Defined in:

Return value:

self

Finds an Core.Base#BASE object based on the object Name.

Defined in:

Parameter:

#string ObjectName

Return value:

The Object found.

[Internal] Get the center of the bounding box of the objects in the set.

Defined in:

Parameter:

#boolean AliveOnly

If true, only alive objects are used. Otherwise all objects with a position are used.

Return value:

Center of the bounding box or nil if no object has a position.

[Internal] Creates a new empty set of the same class as this set, e.g.

a SET_GROUP for a SET_GROUP. A SET_BASE is created, if the other set has a different class, or if the class is not available as global class table. The SET_BASE can hold objects of both sets, e.g. a SET_OPSGROUP:Add() rejects a STATIC.

Defined in:

Parameter:

(Optional) The other set, whose objects are added to the new set as well.

Return value:

The new empty set.

[Internal] Finds a name match using the set's pattern options.

Defined in:

Parameters:

#string Name

Text to search.

#string Pattern

Lua pattern or literal text to find.

#boolean NoRegex

(Optional) If true, search for literal text. Defaults to self.filterNoRegex.

#boolean ReplaceDash

(Optional) Escape hyphens when using Lua patterns. Defaults to self.filterReplaceDash.

Return value:

#number:

The starting index of the first match, or nil if there is no match.

Field(s)

Function(s)

Clear a state value that was set for an object.

Defined in:

Parameters:

Object

The object the state is about.

StateName

The key that 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.

DCS#Airbase place

(Optional) The airbase, FARP or ship where the object was born.

#number subplace

(Optional) The 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.

#number IniObjectCategory

(Optional) The object category of the initiator.

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.

#number IniObjectCategory

(Optional) The object category of the initiator.

Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_GROUP_CHANGE_OPTION event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Group Initiator

The initiating group of the event.

Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.

Defined in:

Parameter:

the dynamic cargo object

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Unit Lost Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#number:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the object's configured event priority.

Defined in:

Return value:

#number:

The configured priority. Defaults to 5.

Get the parent object from the inheritance chain.

To run a parent method on the current instance, call the function with self as its first argument.

local Parent = self:GetParent( self, MYCLASS )
Parent.ParentMethod( self )

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) Walk up the chain of Child to this class first and return its parent. Use this to call a parent method from a method of an intermediate class.

Return value:

The parent, or nil if there is none.

Get all of the properties of an object in a table.

Defined in:

Return value:

#table:

of values, indexed by keys.

Get one property of an object by the key.

Defined in:

Parameter:

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!

Return value:

Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.

Get a Value given a Key from the Object.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about.

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 no value is stored for the Key.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(Optional) The function to be called as EventFunction( self, EventData ) when the event occurs. If not given, the method named after the event is called, e.g. self:OnEventDead( EventData ).

Return value:

self

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

The Child class table is deep copied. The copy looks up missing fields and methods in Parent through its metatable. Parent is usually a new object of the parent class, e.g. BASE:Inherit( self, BASE:New() ).

Defined in:

Parameters:

#table Child

The Child class that inherits.

#BASE Parent

The Parent object that the Child inherits from.

Return value:

The new Child object.

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

The name of the class (#string, case insensitive) or the class itself to run the check against.

Return value:

#boolean:

True if the object is an instance of the class or of a class derived from it. False for an invalid parameter.

Check whether tracing is enabled for the object.

Defined in:

Return value:

#boolean:

true when the Lua debug library is available, tracing is on, and TraceAll, TraceClass, or TraceClassMethod selects the object.

BASE constructor.

Creates a new object as a deep copy of the table the method is called on and assigns the next ClassID. When the BASE class itself is copied, its class-level fields Debug (the Lua debug library) and Scheduler are left out. When the method is called on a derived class or instance, its own Debug and Scheduler fields are copied along with its other fields.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

The new object.

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a dynamic cargo crate is removed.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when an option is changed for an AI group.

The event identifies the initiating group, but does not provide the option ID or value.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and succumbs to Davy Jones' Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.

* NOTE * this is a workaround for DCS not creating these events as of Aug 2024.

Defined in:

Parameter:

The EventData structure.

Paratrooper landing.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not multiplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite weapon reload not counted). Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Schedule a function call once after a delay.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed, e.g. self:ScheduleOnce( 5, MYCLASS.Stop, self ).

Defined in:

Parameters:

#number Start

Delay in seconds before the function is called.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a repeated function call.

The schedule starts immediately. The function is called without the object as first argument. Pass the object explicitly if needed.

Defined in:

Parameters:

#number Start

Delay in seconds before the first call.

#number Repeat

Interval in seconds between the calls.

#number RandomizeFactor

Randomization factor between 0 and 1 to randomize the Repeat interval.

#number Stop

(Optional) Time limit in seconds from when the schedule starts. Omit it or use 0 for no time limit. The dispatcher checks the limit after each call, so a call that was already scheduled can run after the limit expires.

#function SchedulerFunction

The function to be called. It receives the optional arguments given after it.

...

(Optional) Arguments passed to the function.

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 object's event priority for subsequent subscriptions.

The Core.Event dispatcher processes priorities 1 through 10 (10 through 1 for events like Dead). Each subscription is stored under the priority in effect when it is registered.

Defined in:

Parameter:

#number EventPriority

Priority used when registering events.

Return value:

self

Set one property of an object.

Defined in:

Parameters:

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 that is stored. Note that the value can be a #string, but it can also be any other type!

Set a state or property of the Object given a Key and a Value.

The values are stored in the calling object, keyed by the class name and ID of the given Object. They are not removed when the given Object is destroyed or garbage collected. Use BASE.ClearState() to remove a value.

Defined in:

Parameters:

Object

The object the state is about. Its class name and ID are used as index.

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 be stored.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

(Optional) true or nil = trace all methods in MOOSE, false = switch it off.

Set tracing for all methods of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of a class.

Tracing must also be switched on with BASE.TraceOn().

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set the highest trace level.

F and T methods up to this level write to the log.

Defined in:

Parameter:

#number Level

(Optional) Trace level 1, 2, or 3. Defaults to 1.

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Switch F and T tracing on or off.

Tracing starts disabled in BASE. BASE.E() and BASE.I() log independently of this switch.

Defined in:

Parameter:

#boolean TraceOnOff

(Optional) Use false to disable tracing. Defaults to true.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event