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.

Group objects or data of the same type into a collection, which is either:

  • Manually managed using the :Add...() or :Remove...() methods. The initial SET can be filtered with the **SET_BASE.FilterOnce()** method.
  • Dynamically updated when new objects are created or objects are destroyed using the **SET_BASE.FilterStart()** method.

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.

Notes on FilterPrefixes():

This filter always looks for a partial match somewhere in the given field. LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results. Have a read through the following to understand the application of regular expressions: LUA regular expressions.
For example, setting a filter like so FilterPrefixes("Huey") is perfectly all right, whilst FilterPrefixes("UH-1H Al-Assad") might not be due to the minus signs. A quick fix here is to use a dot (.) in place of the special character, or escape it with a percentage sign (%), i.e. either FilterPrefixes("UH.1H Al.Assad") or FilterPrefixes("UH%-1H Al%-Assad") will give you the expected results.


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.

A SET provides iterators to iterate the SET, but will temporarily yield the ForEach iterator loop at defined "intervals" to the mail simulator loop. In this way, large loops can be done while not blocking the simulator main processing loop. The default "yield interval" is after 10 objects processed. The default "time interval" is after 0.001 seconds.

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.

Define the SET iterator "yield interval" and the "time interval"

Modify the iterator intervals with the Core.Set#SET_BASE.SetIteratorIntervals method. You can set the "yield interval", and the "time interval". (See above).

Global SET_CARGO

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

  • Coalitions
  • Types
  • Name or Prefix

SET_CARGO constructor

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

#SET_CARGO SET_CARGO

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

  • Coalitions
  • Types
  • Name or Prefix

SET_CARGO constructor

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

Add or Remove CARGOs from SET_CARGO

CARGOs can be added and removed using the Core.Set#SET_CARGO.AddCargosByName and Core.Set#SET_CARGO.RemoveCargosByName respectively. These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.

SET_CARGO filter criteria

You can set filter criteria to automatically maintain the SET_CARGO contents. Filter criteria are defined by:

  • SET_CARGO.FilterCoalitions: Builds the SET_CARGO with the cargos belonging to the coalition(s).
  • SET_CARGO.FilterPrefixes: Builds the SET_CARGO with the cargos containing the same string(s). 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
  • SET_CARGO.FilterTypes: Builds the SET_CARGO with the cargos belonging to the cargo type(s).
  • SET_CARGO.FilterCountries: Builds the SET_CARGO with the cargos belonging to the country(ies).

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

SET_CARGO iterators

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

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

  • SET_GROUP.FilterCoalitions: Builds the SET_GROUP with the groups belonging to the coalition(s).
  • SET_GROUP.FilterCategories: Builds the SET_GROUP with the groups belonging to the category(ies).
  • SET_GROUP.FilterCountries: Builds the SET_GROUP with the groups belonging to the country(ies).
  • SET_GROUP.FilterPrefixes: Builds the SET_GROUP with the groups containing the given string in the group 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
  • SET_GROUP.FilterActive: Builds the SET_GROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!

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

While this is a good example, there is a catch. Imagine you want to execute the code above, the the self would need to be from the object declared outside (above) the OnAfterDead method. So, the self would need to contain another object. Fortunately, this can be done, but you must use then the . notation for the method. See the modified example:

   -- Now we have a constructor of the class AI_CARGO_DISPATCHER, that receives the SetHelicopter as a parameter.
   -- Within that constructor, we want to set an enclosed event handler OnAfterDead for SetHelicopter.
   -- But within the OnAfterDead method, we want to refer to the self variable of the AI_CARGO_DISPATCHER.

   function AI_CARGO_DISPATCHER:New( SetCarrier, SetCargo, SetDeployZones )

     local self = BASE:Inherit( self, FSM:New() ) -- #AI_CARGO_DISPATCHER

     -- Put a Dead event handler on SetCarrier, to ensure that when a carrier is destroyed, that all internal parameters are reset.
     -- Note the "." notation, and the explicit declaration of SetHelicopter, which would be using the ":" notation the implicit self variable declaration.

     function SetHelicopter.OnAfterDead( SetHelicopter, From, Event, To, GroupObject )
       SetHelicopter:F( { GroupObject = GroupObject:GetName() } )
       self.PickupCargo[GroupObject] = nil  -- So here I clear the PickupCargo table entry of the self object AI_CARGO_DISPATCHER.
       self.CarrierHome[GroupObject] = nil
     end

   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:

  • SET_OPSGROUP.FilterCoalitions: Builds the SET_OPSGROUP with the groups belonging to the coalition(s).
  • SET_OPSGROUP.FilterCategories: Builds the SET_OPSGROUP with the groups belonging to the category(ies).
  • SET_OPSGROUP.FilterCountries: Builds the SET_OPSGROUP with the groups belonging to the country(ies).
  • SET_OPSGROUP.FilterPrefixes: Builds the SET_OPSGROUP with the groups containing the given string in the group 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
  • SET_OPSGROUP.FilterActive: Builds the SET_OPSGROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!

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

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

#SET_OPSZONE SET_OPSZONE

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

SET_OPSZONE constructor

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

Add or Remove ZONEs from SET_OPSZONE

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

SET_OPSZONE filter criteria

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

  • SET_OPSZONE.FilterPrefixes: Builds the SET_OPSZONE with the zones having a certain text pattern in their 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_OPSZONE, you can start filtering using:

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. The iterator methods will walk the SET_OPSZONE set, and call for each airbase within the set a function that you provide. 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:

  • SET_UNIT.ForEachUnit: Calls a function for each alive unit it finds within the SET_UNIT.
  • SET_UNIT.ForEachUnitInZone: Iterate the SET_UNIT and call an iterator function for each alive UNIT object presence completely in a Core.Zone, providing the UNIT object and optional parameters to the called function.
  • SET_UNIT.ForEachUnitNotInZone: Iterate the SET_UNIT and call an iterator function for each alive UNIT object presence not in a Core.Zone, providing the UNIT object and optional parameters to the called function.
  • #SET_UNIT: Iterate the SET_UNIT sorted *per Threat Level and call an iterator function for each alive UNIT, providing the UNIT and optional parameters

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

While this is a good example, there is a catch. Imagine you want to execute the code above, the the self would need to be from the object declared outside (above) the OnAfterDead method. So, the self would need to contain another object. Fortunately, this can be done, but you must use then the . notation for the method. See the modified example:

   -- Now we have a constructor of the class AI_CARGO_DISPATCHER, that receives the SetHelicopter as a parameter.
   -- Within that constructor, we want to set an enclosed event handler OnAfterDead for SetHelicopter.
   -- But within the OnAfterDead method, we want to refer to the self variable of the AI_CARGO_DISPATCHER.

   function ACLASS:New( SetCarrier, SetCargo, SetDeployZones )

     local self = BASE:Inherit( self, FSM:New() ) -- #AI_CARGO_DISPATCHER

     -- Put a Dead event handler on SetCarrier, to ensure that when a carrier is destroyed, that all internal parameters are reset.
     -- Note the "." notation, and the explicit declaration of SetHelicopter, which would be using the ":" notation the implicit self variable declaration.

     function SetHelicopter.OnAfterDead( SetHelicopter, From, Event, To, UnitObject )
       SetHelicopter:F( { UnitObject = UnitObject:GetName() } )
       self.array[UnitObject] = nil  -- So here I clear the array table entry of the self object ACLASS.
     end

   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:

  • SET_ZONE.FilterPrefixes: Builds the SET_ZONE with the zones having a certain text pattern in their 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_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

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

#SET_ZONE_GOAL SET_ZONE_GOAL

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

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

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

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:

  • SET_ZONE_GOAL.FilterPrefixes: Builds the SET_ZONE_GOAL with the zones having a certain text pattern in their 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_ZONE_GOAL, you can start filtering using:

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. The iterator methods will walk the SET_ZONE_GOAL 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_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)

Builds a set of airbases out of categories.

SET_AIRBASE:FilterCoalitions(Coalitions)

Builds a set of airbases of coalitions.

SET_AIRBASE:FilterStart()

Starts the filtering.

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(PointVec2)

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

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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_AIRBASE:FilterOnce()

Filters for the defined collection.

SET_AIRBASE:FilterStop()

Stops the filtering for the defined collection.

SET_AIRBASE:FindNearestObjectFromPointVec2(PointVec2)

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

SET_AIRBASE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_AIRBASE:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_AIRBASE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_AIRBASE.Index

Table of indices.

SET_AIRBASE:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_AIRBASE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_AIRBASE.SomeIteratorLimit

SET_AIRBASE:SortByName()

Sort the set by name.

SET_AIRBASE.TimeInterval

SET_AIRBASE.YieldInterval

SET_AIRBASE:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_AIRBASE.ClassID

The ID number of the class.

SET_AIRBASE.ClassName

The name of the class.

SET_AIRBASE.ClassNameAndID

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

SET_AIRBASE:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_AIRBASE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_AIRBASE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_AIRBASE.Scheduler

SET_AIRBASE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_AIRBASE:SetState(Object, Key, Value)

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

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 a class

SET_AIRBASE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_AIRBASE:TraceLevel(Level)

Set trace level

SET_AIRBASE:TraceOff()

Set trace off.

SET_AIRBASE:TraceOn()

Set trace on.

SET_AIRBASE:TraceOnOff(TraceOnOff)

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

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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_BASE:FilterOnce()

Filters for the defined collection.

SET_BASE:FilterStop()

Stops the filtering for the defined collection.

SET_BASE:FindNearestObjectFromPointVec2(PointVec2)

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

SET_BASE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_BASE:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_BASE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_BASE.Index

Table of indices.

SET_BASE:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_BASE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_BASE.SomeIteratorLimit

SET_BASE:SortByName()

Sort the set by name.

SET_BASE.TimeInterval

SET_BASE.YieldInterval

SET_BASE:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_BASE.ClassID

The ID number of the class.

SET_BASE.ClassName

The name of the class.

SET_BASE.ClassNameAndID

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

SET_BASE:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_BASE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_BASE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_BASE.Scheduler

SET_BASE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_BASE:SetState(Object, Key, Value)

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

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 a class

SET_BASE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_BASE:TraceLevel(Level)

Set trace level

SET_BASE:TraceOff()

Set trace off.

SET_BASE:TraceOn()

Set trace on.

SET_BASE:TraceOnOff(TraceOnOff)

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

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.Filters Description

SET_BASE.Filters.Coalition

Coalitions

SET_BASE.Filters.Functions

SET_BASE.Filters.Prefix

Prefixes.

Fields and Methods inherited from SET_CARGO Description

SET_CARGO:AddCargo(Cargo)

(R2.1) Add CARGO to SET_CARGO.

SET_CARGO:AddCargosByName(AddCargoNames)

(R2.1) Add CARGOs to SET_CARGO.

SET_CARGO:AddInDatabase(Event)

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

SET_CARGO:FilterCoalitions(Coalitions)

(R2.1) Builds a set of cargos of coalitions.

SET_CARGO:FilterCountries(Countries)

(R2.1) Builds a set of cargos of defined countries.

SET_CARGO:FilterPrefixes(Prefixes)

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

SET_CARGO:FilterStart()

(R2.1) Starts the filtering.

SET_CARGO:FilterStop()

Stops the filtering for the defined collection.

SET_CARGO:FilterTypes(Types)

(R2.1) Builds a set of cargos of defined cargo types.

SET_CARGO:FindCargo(CargoName)

(R2.1) Finds a Cargo based on the Cargo Name.

SET_CARGO:FindInDatabase(Event)

(R2.1) Handles the Database to check on any event that Object exists in the Database.

SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)

(R2.1) Iterate the SET_CARGO while identifying the nearest Cargo.Cargo#CARGO from a Core.Point#POINT_VEC2.

SET_CARGO:FirstCargoDeployed()

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Deployed.

SET_CARGO:FirstCargoLoaded()

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Loaded.

SET_CARGO:FirstCargoUnLoaded()

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded.

SET_CARGO:FirstCargoUnLoadedAndNotDeployed()

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded and not Deployed.

SET_CARGO:FirstCargoWithState(State)

SET_CARGO:FirstCargoWithStateAndNotDeployed(State)

SET_CARGO:ForEachCargo(IteratorFunction, ...)

(R2.1) Iterate the SET_CARGO and call an iterator function for each CARGO, providing the CARGO and optional parameters.

SET_CARGO:IsIncludeObject(MCargo)

(R2.1)

SET_CARGO:New()

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

SET_CARGO:OnEventDeleteCargo(EventData)

(R2.1) Handles the OnDead or OnCrash event for alive units set.

SET_CARGO:OnEventNewCargo(EventData)

(R2.1) Handles the OnEventNewCargo event for the Set.

SET_CARGO:RemoveCargosByName(RemoveCargoNames)

(R2.1) Remove CARGOs from SET_CARGO.

Fields and Methods inherited from SET_BASE Description

SET_CARGO:Add(ObjectName, Object)

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

SET_CARGO:AddObject(Object)

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

SET_CARGO:AddSet(SetToAdd)

Add a SET to this set.

SET_CARGO.CallScheduler

SET_CARGO:Clear(TriggerEvent)

Clear the Objects in the Set.

SET_CARGO:CompareSets(SetA, SetB)

Compare two sets.

SET_CARGO:Count()

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

SET_CARGO.Database

SET_CARGO.Filter

Filters

SET_CARGO:FilterClear()

Clear all filters.

SET_CARGO:FilterCrashes()

Starts the filtering of the Crash events for the collection.

SET_CARGO:FilterDeads()

Starts the filtering of the Dead events for the collection.

SET_CARGO:FilterFunction(ConditionFunction, ...)

[Internal] Add a functional filter

SET_CARGO:FilterOnce()

Filters for the defined collection.

SET_CARGO:FilterStop()

Stops the filtering for the defined collection.

SET_CARGO:FindNearestObjectFromPointVec2(PointVec2)

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

SET_CARGO:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

SET_CARGO:Get(ObjectName)

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

SET_CARGO:GetFirst()

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

SET_CARGO:GetLast()

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

SET_CARGO:GetObjectNames()

Gets a string with all the object names.

SET_CARGO:GetRandom()

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

SET_CARGO:GetRandomSurely()

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

SET_CARGO:GetSet()

Gets the Set.

SET_CARGO:GetSetComplement(SetB)

Get the complement of two sets.

SET_CARGO:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

SET_CARGO:GetSetNames()

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

SET_CARGO:GetSetObjects()

Returns a table of the Objects in the Set.

SET_CARGO:GetSetUnion(SetB)

Get the union of two sets.

SET_CARGO:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_CARGO.Index

Table of indices.

SET_CARGO:IsInSet(Object)

Decides whether an object is in the SET

SET_CARGO:IsIncludeObject(Object)

Decides whether to include the Object.

SET_CARGO:IsNotInSet(Object)

Decides whether an object is not in the SET

SET_CARGO.List

Unused table.

SET_CARGO:New(Database)

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

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

Added Handler OnAfter for SET_BASE

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

Removed Handler OnAfter for SET_BASE

SET_CARGO:Remove(ObjectName, NoTriggerEvent)

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

SET_CARGO.Set

Table of objects.

SET_CARGO:SetDatabase(BaseSet)

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

SET_CARGO:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_CARGO:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_CARGO.SomeIteratorLimit

SET_CARGO:SortByName()

Sort the set by name.

SET_CARGO.TimeInterval

SET_CARGO.YieldInterval

SET_CARGO:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

SET_CARGO:_EventOnBirth(Event)

Handles the OnBirth event for the Set.

SET_CARGO:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive units set.

SET_CARGO:_FilterStart()

Starts the filtering for the defined collection.

SET_CARGO:_Find(ObjectName)

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

Fields and Methods inherited from BASE Description

SET_CARGO.ClassID

The ID number of the class.

SET_CARGO.ClassName

The name of the class.

SET_CARGO.ClassNameAndID

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

SET_CARGO:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

SET_CARGO:CreateEventCrash(EventTime, Initiator, IniObjectCategory)

Creation of a Crash Event.

SET_CARGO:CreateEventDead(EventTime, Initiator, IniObjectCategory)

Creation of a Dead Event.

SET_CARGO:CreateEventPlayerEnterAircraft(PlayerUnit)

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

SET_CARGO:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SET_CARGO:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SET_CARGO:CreateEventUnitLost(EventTime, Initiator)

Creation of a Crash Event.

SET_CARGO:E(Arguments)

Log an exception which will be traced always.

SET_CARGO:EventDispatcher()

Returns the event dispatcher

SET_CARGO:EventRemoveAll()

Remove all subscribed events

SET_CARGO:F(Arguments)

Trace a function call.

SET_CARGO:F2(Arguments)

Trace a function call level 2.

SET_CARGO:F3(Arguments)

Trace a function call level 3.

SET_CARGO:GetClassID()

Get the ClassID of the class instance.

SET_CARGO:GetClassName()

Get the ClassName of the class instance.

SET_CARGO:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SET_CARGO:GetEventPriority()

Get the Class Core.Event processing Priority.

SET_CARGO:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

SET_CARGO:GetState(Object, Key)

Get a Value given a Key from the Object.

SET_CARGO:HandleEvent(EventID, EventFunction)

Subscribe to a DCS Event.

SET_CARGO:I(Arguments)

Log an information which will be traced always.

SET_CARGO:Inherit(Child, Parent)

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

SET_CARGO:IsInstanceOf(ClassName)

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

SET_CARGO:IsTrace()

Enquires if tracing is on (for the class).

SET_CARGO:New()

BASE constructor.

SET_CARGO:OnEvent(EventData)

Occurs when an Event for an object is triggered.

SET_CARGO:OnEventBDA(EventData)

BDA.

SET_CARGO:OnEventBaseCaptured(EventData)

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

SET_CARGO:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SET_CARGO:OnEventCrash(EventData)

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

SET_CARGO:OnEventDead(EventData)

Occurs when an object is dead.

SET_CARGO:OnEventDetailedFailure(EventData)

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

SET_CARGO:OnEventDiscardChairAfterEjection(EventData)

Discard chair after ejection.

SET_CARGO: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_CARGO:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SET_CARGO:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SET_CARGO:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SET_CARGO:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SET_CARGO:OnEventKill(EventData)

Occurs on the death of a unit.

SET_CARGO: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_CARGO:OnEventLandingAfterEjection(EventData)

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

SET_CARGO:OnEventLandingQualityMark(EventData)

Landing quality mark.

SET_CARGO:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SET_CARGO:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SET_CARGO:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SET_CARGO:OnEventMissionEnd(EventData)

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

SET_CARGO:OnEventMissionStart(EventData)

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

SET_CARGO:OnEventParatrooperLanding(EventData)

Weapon add.

SET_CARGO:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SET_CARGO:OnEventPlayerEnterAircraft(EventData)

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

SET_CARGO:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SET_CARGO:OnEventPlayerLeaveUnit(EventData)

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

SET_CARGO:OnEventRefueling(EventData)

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

SET_CARGO:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SET_CARGO:OnEventScore(EventData)

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

SET_CARGO:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SET_CARGO:OnEventShootingStart(EventData)

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

SET_CARGO:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SET_CARGO:OnEventTakeoff(EventData)

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

SET_CARGO:OnEventTriggerZone(EventData)

Trigger zone.

SET_CARGO:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

SET_CARGO:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_CARGO.Scheduler

SET_CARGO:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_CARGO:SetState(Object, Key, Value)

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

SET_CARGO:T(Arguments)

Trace a function logic level 1.

SET_CARGO:T2(Arguments)

Trace a function logic level 2.

SET_CARGO:T3(Arguments)

Trace a function logic level 3.

SET_CARGO:TraceAll(TraceAll)

Trace all methods in MOOSE

SET_CARGO:TraceClass(Class)

Set tracing for a class

SET_CARGO:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_CARGO:TraceLevel(Level)

Set trace level

SET_CARGO:TraceOff()

Set trace off.

SET_CARGO:TraceOn()

Set trace on.

SET_CARGO:TraceOnOff(TraceOnOff)

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

SET_CARGO:UnHandleEvent(EventID)

UnSubscribe to a DCS event.

SET_CARGO._

SET_CARGO:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SET_CARGO:_Serialize(Arguments)

(Internal) Serialize arguments

SET_CARGO:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SET_CARGO.__

SET_CARGO:onEvent(event)

The main event handling function...

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)

Builds a set of clients that are only active.

SET_CLIENT:FilterCallsigns(Callsigns)

Builds a set of clients of certain callsigns.

SET_CLIENT:FilterCategories(Categories)

Builds a set of clients out of categories.

SET_CLIENT:FilterCoalitions(Coalitions)

Builds a set of clients of coalitions.

SET_CLIENT:FilterCountries(Countries)

Builds a set of clients of defined countries.

SET_CLIENT:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_CLIENT:FilterPlayernames(Playernames)

Builds a set of clients of certain playernames.

SET_CLIENT:FilterPrefixes(Prefixes)

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

SET_CLIENT:FilterStart()

Starts the filtering.

SET_CLIENT:FilterStop()

Stops the filtering.

SET_CLIENT:FilterTypes(Types)

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)

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

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_CLIENT:FilterOnce()

Filters for the defined collection.

SET_CLIENT:FilterStop()

Stops the filtering for the defined collection.

SET_CLIENT:FindNearestObjectFromPointVec2(PointVec2)

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

SET_CLIENT:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_CLIENT:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_CLIENT:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_CLIENT.Index

Table of indices.

SET_CLIENT:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_CLIENT:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_CLIENT.SomeIteratorLimit

SET_CLIENT:SortByName()

Sort the set by name.

SET_CLIENT.TimeInterval

SET_CLIENT.YieldInterval

SET_CLIENT:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_CLIENT.ClassID

The ID number of the class.

SET_CLIENT.ClassName

The name of the class.

SET_CLIENT.ClassNameAndID

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

SET_CLIENT:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_CLIENT:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_CLIENT:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_CLIENT.Scheduler

SET_CLIENT:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_CLIENT:SetState(Object, Key, Value)

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

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 a class

SET_CLIENT:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_CLIENT:TraceLevel(Level)

Set trace level

SET_CLIENT:TraceOff()

Set trace off.

SET_CLIENT:TraceOn()

Set trace on.

SET_CLIENT:TraceOnOff(TraceOnOff)

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

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_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(ZoneObject, Zone)

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

SET_GROUP:AnyCompletelyInZone(ZoneObject, 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(ZoneObject, 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(ZoneObject, 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(ZoneObject, 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(ZoneObject, Zone)

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

SET_GROUP:FilterActive(Active)

Builds a set of groups that are active, ie in the mission but not yet activated (false) or actived (true).

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 groups of coalitions.

SET_GROUP:FilterCountries(Countries)

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)

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

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(PointVec2)

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

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 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(ZoneObject, 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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_GROUP:FilterOnce()

Filters for the defined collection.

SET_GROUP:FilterStop()

Stops the filtering for the defined collection.

SET_GROUP:FindNearestObjectFromPointVec2(PointVec2)

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

SET_GROUP:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_GROUP:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_GROUP:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_GROUP.Index

Table of indices.

SET_GROUP:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_GROUP:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_GROUP.SomeIteratorLimit

SET_GROUP:SortByName()

Sort the set by name.

SET_GROUP.TimeInterval

SET_GROUP.YieldInterval

SET_GROUP:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_GROUP.ClassID

The ID number of the class.

SET_GROUP.ClassName

The name of the class.

SET_GROUP.ClassNameAndID

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

SET_GROUP:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_GROUP:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_GROUP:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_GROUP.Scheduler

SET_GROUP:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_GROUP:SetState(Object, Key, Value)

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

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 a class

SET_GROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_GROUP:TraceLevel(Level)

Set trace level

SET_GROUP:TraceOff()

Set trace off.

SET_GROUP:TraceOn()

Set trace on.

SET_GROUP:TraceOnOff(TraceOnOff)

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

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 Core.Base#BASE object in the Core.Set#SET_BASE, 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:FilterActive(Active)

Builds a set of groups that are only active.

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:FilterCoalitions(Coalitions, Clear)

Builds a set of groups of coalitions.

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

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_OPSGROUP:FilterOnce()

Filters for the defined collection.

SET_OPSGROUP:FilterStop()

Stops the filtering for the defined collection.

SET_OPSGROUP:FindNearestObjectFromPointVec2(PointVec2)

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

SET_OPSGROUP:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_OPSGROUP:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_OPSGROUP:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_OPSGROUP.Index

Table of indices.

SET_OPSGROUP:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_OPSGROUP:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_OPSGROUP.SomeIteratorLimit

SET_OPSGROUP:SortByName()

Sort the set by name.

SET_OPSGROUP.TimeInterval

SET_OPSGROUP.YieldInterval

SET_OPSGROUP:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_OPSGROUP.ClassID

The ID number of the class.

SET_OPSGROUP.ClassName

The name of the class.

SET_OPSGROUP.ClassNameAndID

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

SET_OPSGROUP:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_OPSGROUP:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_OPSGROUP:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_OPSGROUP.Scheduler

SET_OPSGROUP:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_OPSGROUP:SetState(Object, Key, Value)

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

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 a class

SET_OPSGROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_OPSGROUP:TraceLevel(Level)

Set trace level

SET_OPSGROUP:TraceOff()

Set trace off.

SET_OPSGROUP:TraceOn()

Set trace on.

SET_OPSGROUP:TraceOnOff(TraceOnOff)

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

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:FilterCoalitions(Coalitions)

Builds a set of groups of coalitions.

SET_OPSZONE:FilterOnce()

Filters for the defined collection.

SET_OPSZONE:FilterPrefixes(Prefixes)

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

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

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 OnDead or OnCrash event for alive units set.

SET_OPSZONE:OnEventNewZoneGoal(EventData)

Handles the OnEventNewZone 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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_OPSZONE:FilterOnce()

Filters for the defined collection.

SET_OPSZONE:FilterStop()

Stops the filtering for the defined collection.

SET_OPSZONE:FindNearestObjectFromPointVec2(PointVec2)

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

SET_OPSZONE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_OPSZONE:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_OPSZONE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_OPSZONE.Index

Table of indices.

SET_OPSZONE:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_OPSZONE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_OPSZONE.SomeIteratorLimit

SET_OPSZONE:SortByName()

Sort the set by name.

SET_OPSZONE.TimeInterval

SET_OPSZONE.YieldInterval

SET_OPSZONE:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_OPSZONE.ClassID

The ID number of the class.

SET_OPSZONE.ClassName

The name of the class.

SET_OPSZONE.ClassNameAndID

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

SET_OPSZONE:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_OPSZONE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_OPSZONE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_OPSZONE.Scheduler

SET_OPSZONE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_OPSZONE:SetState(Object, Key, Value)

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

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 a class

SET_OPSZONE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_OPSZONE:TraceLevel(Level)

Set trace level

SET_OPSZONE:TraceOff()

Set trace off.

SET_OPSZONE:TraceOn()

Set trace on.

SET_OPSZONE:TraceOnOff(TraceOnOff)

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

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:FilterCoalitions(Coalitions)

Builds a set of clients of coalitions joined by specific 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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_PLAYER:FilterOnce()

Filters for the defined collection.

SET_PLAYER:FilterStop()

Stops the filtering for the defined collection.

SET_PLAYER:FindNearestObjectFromPointVec2(PointVec2)

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

SET_PLAYER:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_PLAYER:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_PLAYER:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_PLAYER.Index

Table of indices.

SET_PLAYER:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_PLAYER:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_PLAYER.SomeIteratorLimit

SET_PLAYER:SortByName()

Sort the set by name.

SET_PLAYER.TimeInterval

SET_PLAYER.YieldInterval

SET_PLAYER:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_PLAYER.ClassID

The ID number of the class.

SET_PLAYER.ClassName

The name of the class.

SET_PLAYER.ClassNameAndID

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

SET_PLAYER:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_PLAYER:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_PLAYER:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_PLAYER.Scheduler

SET_PLAYER:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_PLAYER:SetState(Object, Key, Value)

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

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 a class

SET_PLAYER:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_PLAYER:TraceLevel(Level)

Set trace level

SET_PLAYER:TraceOff()

Set trace off.

SET_PLAYER:TraceOn()

Set trace on.

SET_PLAYER:TraceOnOff(TraceOnOff)

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

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

Filters for the defined collection.

SET_SCENERY:FilterPrefixes(Prefixes)

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

SET_SCENERY:FilterRoles(Role)

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

SET_SCENERY:FilterZones(Zones)

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)

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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_SCENERY:FilterOnce()

Filters for the defined collection.

SET_SCENERY:FilterStop()

Stops the filtering for the defined collection.

SET_SCENERY:FindNearestObjectFromPointVec2(PointVec2)

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

SET_SCENERY:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_SCENERY:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_SCENERY:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_SCENERY.Index

Table of indices.

SET_SCENERY:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_SCENERY:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_SCENERY.SomeIteratorLimit

SET_SCENERY:SortByName()

Sort the set by name.

SET_SCENERY.TimeInterval

SET_SCENERY.YieldInterval

SET_SCENERY:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_SCENERY.ClassID

The ID number of the class.

SET_SCENERY.ClassName

The name of the class.

SET_SCENERY.ClassNameAndID

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

SET_SCENERY:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_SCENERY:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_SCENERY:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_SCENERY.Scheduler

SET_SCENERY:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_SCENERY:SetState(Object, Key, Value)

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

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 a class

SET_SCENERY:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_SCENERY:TraceLevel(Level)

Set trace level

SET_SCENERY:TraceOff()

Set trace off.

SET_SCENERY:TraceOn()

Set trace on.

SET_SCENERY:TraceOnOff(TraceOnOff)

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

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)

Builds a set of units out of categories.

SET_STATIC:FilterCoalitions(Coalitions)

Builds a set of units of coalitions.

SET_STATIC:FilterCountries(Countries)

Builds a set of units of defined countries.

SET_STATIC:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_STATIC:FilterPrefixes(Prefixes)

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

SET_STATIC:FilterStart()

Starts the filtering.

SET_STATIC:FilterTypes(Types)

Builds a set of units of defined unit types.

SET_STATIC:FilterZones(Zones)

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(IteratorFunction, ...)

Check if minimal one element of the SET_STATIC is in the Zone.

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(ZoneObject, Zone)

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

SET_STATIC:IsPartiallyInZone(Zone)

Check if minimal one 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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_STATIC:FilterOnce()

Filters for the defined collection.

SET_STATIC:FilterStop()

Stops the filtering for the defined collection.

SET_STATIC:FindNearestObjectFromPointVec2(PointVec2)

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

SET_STATIC:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_STATIC:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_STATIC:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_STATIC.Index

Table of indices.

SET_STATIC:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_STATIC:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_STATIC.SomeIteratorLimit

SET_STATIC:SortByName()

Sort the set by name.

SET_STATIC.TimeInterval

SET_STATIC.YieldInterval

SET_STATIC:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_STATIC.ClassID

The ID number of the class.

SET_STATIC.ClassName

The name of the class.

SET_STATIC.ClassNameAndID

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

SET_STATIC:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_STATIC:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_STATIC:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_STATIC.Scheduler

SET_STATIC:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_STATIC:SetState(Object, Key, Value)

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

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 a class

SET_STATIC:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_STATIC:TraceLevel(Level)

Set trace level

SET_STATIC:TraceOff()

Set trace off.

SET_STATIC:TraceOn()

Set trace on.

SET_STATIC:TraceOnOff(TraceOnOff)

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

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

Iterate the SET_UNIT and count how many UNITs are alive.

SET_UNIT:FilterActive(Active)

Builds a set of units that are only active.

SET_UNIT:FilterCategories(Categories)

Builds a set of units out of categories.

SET_UNIT:FilterCoalitions(Coalitions)

Builds a set of units of coalitions.

SET_UNIT:FilterCountries(Countries)

Builds a set of units of defined countries.

SET_UNIT:FilterFunction(ConditionFunction, ...)

[User] Add a custom condition function.

SET_UNIT:FilterHasRadar(RadarTypes)

Builds a set of units having a radar of give types.

SET_UNIT:FilterHasSEAD()

Builds a set of SEADable units.

SET_UNIT:FilterPrefixes(Prefixes)

Builds a set of UNITs that contain a given string in their unit name.

SET_UNIT:FilterStart()

Starts the filtering.

SET_UNIT:FilterStop()

Stops the filtering.

SET_UNIT:FilterTypes(Types)

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)

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 average heading of 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 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(ZoneObject, 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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_UNIT:FilterOnce()

Filters for the defined collection.

SET_UNIT:FilterStop()

Stops the filtering for the defined collection.

SET_UNIT:FindNearestObjectFromPointVec2(PointVec2)

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

SET_UNIT:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_UNIT:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_UNIT:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_UNIT.Index

Table of indices.

SET_UNIT:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_UNIT:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_UNIT.SomeIteratorLimit

SET_UNIT:SortByName()

Sort the set by name.

SET_UNIT.TimeInterval

SET_UNIT.YieldInterval

SET_UNIT:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_UNIT.ClassID

The ID number of the class.

SET_UNIT.ClassName

The name of the class.

SET_UNIT.ClassNameAndID

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

SET_UNIT:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_UNIT:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_UNIT:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_UNIT.Scheduler

SET_UNIT:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_UNIT:SetState(Object, Key, Value)

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

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 a class

SET_UNIT:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_UNIT:TraceLevel(Level)

Set trace level

SET_UNIT:TraceOff()

Set trace off.

SET_UNIT:TraceOn()

Set trace on.

SET_UNIT:TraceOnOff(TraceOnOff)

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

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:FilterPrefixes(Prefixes)

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

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 OnDead or OnCrash event for alive units 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:SetZoneProbability(ZoneName, ZoneProbability)

Set a zone probability.

SET_ZONE:Trigger(Objects)

Start watching if the Object or Objects move into or out of our set of zones.

SET_ZONE:TriggerStop()

Triggers the FSM event "TriggerStop".

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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_ZONE:FilterOnce()

Filters for the defined collection.

SET_ZONE:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE:FindNearestObjectFromPointVec2(PointVec2)

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

SET_ZONE:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_ZONE:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_ZONE:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_ZONE.Index

Table of indices.

SET_ZONE:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

SET_ZONE:SetSomeIteratorLimit(Limit)

Define the SET iterator "limit".

SET_ZONE.SomeIteratorLimit

SET_ZONE:SortByName()

Sort the set by name.

SET_ZONE.TimeInterval

SET_ZONE.YieldInterval

SET_ZONE:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_ZONE.ClassID

The ID number of the class.

SET_ZONE.ClassName

The name of the class.

SET_ZONE.ClassNameAndID

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

SET_ZONE:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_ZONE:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_ZONE:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_ZONE.Scheduler

SET_ZONE:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_ZONE:SetState(Object, Key, Value)

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

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 a class

SET_ZONE:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_ZONE:TraceLevel(Level)

Set trace level

SET_ZONE:TraceOff()

Set trace off.

SET_ZONE:TraceOn()

Set trace on.

SET_ZONE:TraceOnOff(TraceOnOff)

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

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)

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

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 OnDead or OnCrash event for alive units set.

SET_ZONE_GOAL:OnEventNewZoneGoal(EventData)

Handles the OnEventNewZone event for the Set.

SET_ZONE_GOAL:RemoveZonesByName(RemoveZoneNames)

Remove ZONEs from SET_ZONE_GOAL.

SET_ZONE_GOAL:SetZoneProbability(ZoneName, ZoneProbability)

Set a zone probability.

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)

Compare two sets.

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

Clear all filters.

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, ...)

[Internal] Add a functional filter

SET_ZONE_GOAL:FilterOnce()

Filters for the defined collection.

SET_ZONE_GOAL:FilterStop()

Stops the filtering for the defined collection.

SET_ZONE_GOAL:FindNearestObjectFromPointVec2(PointVec2)

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

SET_ZONE_GOAL:Flush(MasterObject)

Flushes the current SET_BASE contents in the log ...

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

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

Get the complement of two sets.

SET_ZONE_GOAL:GetSetIntersection(SetB)

Get the intersection of this set, called A , and another set.

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)

Get the union of two sets.

SET_ZONE_GOAL:GetSomeIteratorLimit()

Get the SET iterator "limit".

SET_ZONE_GOAL.Index

Table of indices.

SET_ZONE_GOAL:IsInSet(Object)

Decides whether an object is in the SET

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 a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

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:SetIteratorIntervals(YieldInterval, TimeInterval)

Define the SET iterator "yield interval" and the "time interval".

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

SET_ZONE_GOAL.YieldInterval

SET_ZONE_GOAL:_EvalFilterFunctions(Object)

[Internal] Check if the condition functions returns true.

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.

Fields and Methods inherited from BASE Description

SET_ZONE_GOAL.ClassID

The ID number of the class.

SET_ZONE_GOAL.ClassName

The name of the class.

SET_ZONE_GOAL.ClassNameAndID

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

SET_ZONE_GOAL:ClearState(Object, StateName)

Clear the state of 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: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 Crash 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 Class Core.Event processing Priority.

SET_ZONE_GOAL:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

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

Enquires if tracing is on (for the class).

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: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: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:OnEventParatrooperLanding(EventData)

Weapon add.

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:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

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

Schedule a new time event.

SET_ZONE_GOAL:ScheduleStop(SchedulerID)

Stops the Schedule.

SET_ZONE_GOAL.Scheduler

SET_ZONE_GOAL:SetEventPriority(EventPriority)

Set the Class Core.Event processing Priority.

SET_ZONE_GOAL:SetState(Object, Key, Value)

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

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 a class

SET_ZONE_GOAL:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SET_ZONE_GOAL:TraceLevel(Level)

Set trace level

SET_ZONE_GOAL:TraceOff()

Set trace off.

SET_ZONE_GOAL:TraceOn()

Set trace on.

SET_ZONE_GOAL:TraceOnOff(TraceOnOff)

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

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

Parameter:

#string Categories

Can take the following values: "airdrome", "helipad", "ship".

Return value:

self

Builds a set of airbases of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_AIRBASE

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

Return value:

self

Starts the filtering.

Defined in:

SET_AIRBASE

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

Defined in:

SET_AIRBASE

Parameter:

A Core.Point#POINT_VEC2 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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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.

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:

The added BASE Object.

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:

The added BASE Object.

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

Compare two sets.

Defined in:

SET_BASE

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

SET_BASE

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

SET_BASE

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

[Internal] Add a functional filter

Defined in:

SET_BASE

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

SET_BASE

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

Defined in:

SET_BASE

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

SET_BASE

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

SET_BASE

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

SET_BASE

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

SET_BASE

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

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 .

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.

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.

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:

self

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

Defined in:

SET_BASE

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

SET_BASE

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

SET_BASE

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

SET_BASE

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

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.

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Filters

Field(s)

#table SET_BASE.Filters.Coalition

Coalitions

#table SET_BASE.Filters.Prefix

Prefixes.

Function(s)

Field(s)

Function(s)

(R2.1) Add CARGO to SET_CARGO.

Defined in:

SET_CARGO

Parameter:

A single cargo.

Return value:

(R2.1) Add CARGOs to SET_CARGO.

Defined in:

SET_CARGO

Parameter:

#string AddCargoNames

A single name or an array of CARGO names.

Return value:

(R2.1) 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_CARGO

Parameter:

Return values:

#string:

The name of the CARGO

#table:

The CARGO

(R2.1) Builds a set of cargos of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_CARGO

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

Return value:

self

(R2.1) Builds a set of cargos of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_CARGO

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

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

Attention! Bad naming convention as this does not filter only prefixes but all cargos that contain the string.

Defined in:

SET_CARGO

Parameter:

#string Prefixes

The string pattern(s) that need to be in the cargo name. Can also be passed as a #table of strings.

Return value:

self

(R2.1) Starts the filtering.

Defined in:

SET_CARGO

Return value:

self

Stops the filtering for the defined collection.

Defined in:

SET_CARGO

Return value:

self

(R2.1) Builds a set of cargos of defined cargo types.

Possible current types are those types known within DCS world.

Defined in:

SET_CARGO

Parameter:

#string Types

Can take those type strings known within DCS world.

Return value:

self

(R2.1) Finds a Cargo based on the Cargo Name.

Defined in:

SET_CARGO

Parameter:

#string CargoName

Return value:

The found Cargo.

(R2.1) 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_CARGO

Parameter:

Return values:

#string:

The name of the CARGO

#table:

The CARGO

(R2.1) Iterate the SET_CARGO while identifying the nearest Cargo.Cargo#CARGO from a Core.Point#POINT_VEC2.

Defined in:

SET_CARGO

Parameter:

A Core.Point#POINT_VEC2 object from where to evaluate the closest Cargo.Cargo#CARGO.

Return value:

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Deployed.

Defined in:

SET_CARGO

Return value:

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Loaded.

Defined in:

SET_CARGO

Return value:

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded.

Defined in:

SET_CARGO

Return value:

Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded and not Deployed.

Defined in:

SET_CARGO

Return value:

Defined in:

SET_CARGO

Parameter:

State

Defined in:

SET_CARGO

Parameter:

State

(R2.1) Iterate the SET_CARGO and call an iterator function for each CARGO, providing the CARGO and optional parameters.

Defined in:

SET_CARGO

Parameters:

#function IteratorFunction

The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.

...

Return value:

self

(R2.1)

Defined in:

SET_CARGO

Parameter:

Return value:

self

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

Defined in:

SET_CARGO

Return value:

Usage:

-- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
DatabaseSet = SET_CARGO:New()

(R2.1) Handles the OnDead or OnCrash event for alive units set.

Defined in:

SET_CARGO

Parameter:

(R2.1) Handles the OnEventNewCargo event for the Set.

Defined in:

SET_CARGO

Parameter:

(R2.1) Remove CARGOs from SET_CARGO.

Defined in:

SET_CARGO

Parameter:

Cargo.Cargo#CARGO RemoveCargoNames

A single name or an array of CARGO names.

Return value:

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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

Field(s)

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

Builds a set of clients that are only active.

Only the clients that are active will be included within the set.

Defined in:

SET_CLIENT

Parameter:

#boolean Active

(Optional) Include only active clients to the set. Include inactive clients if you provide false.

Return value:

self

Usage:


-- Include only active clients to the set.
ClientSet = SET_CLIENT:New():FilterActive():FilterStart()

-- Include only active clients to the set of the blue coalition, and filter one time.
ClientSet = SET_CLIENT:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()

-- Include only active clients to the set of the blue coalition, and filter one time.
-- Later, reset to include back inactive clients to the set.
ClientSet = SET_CLIENT:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()
... logic ...
ClientSet = SET_CLIENT:New():FilterActive( false ):FilterCoalition( "blue" ):FilterOnce()

Builds a set of clients of certain callsigns.

Defined in:

SET_CLIENT

Parameter:

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

Return value:

self

Builds a set of clients out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_CLIENT

Parameter:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

Return value:

self

Builds a set of clients of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_CLIENT

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

Return value:

self

Builds a set of clients of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_CLIENT

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_CLIENT

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CLIENT object as first argument.

...

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 of certain playernames.

Defined in:

SET_CLIENT

Parameter:

#string Playernames

Can be a single string e.g. "Apple", or a table of strings e.g. {"Walter","Hermann","Gonzo"}. Useful if you have e.g. a common squadron prefix.

Return value:

self

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

Attention! Bad naming convention as this does not filter only prefixes but all clients that contain the string.

Defined in:

SET_CLIENT

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

Parameter:

#string Types

Can take those type strings known within DCS world.

Return value:

self

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

Defined in:

SET_CLIENT

Parameter:

#number Seconds

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

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

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:

Wrapper.Client#CLIENT RemoveClientNames

A single object or an array of 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)

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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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

Builds a set of groups that are active, ie in the mission but not yet activated (false) or actived (true).

Only the groups that are active will be included within the set.

Defined in:

SET_GROUP

Parameter:

#boolean Active

(Optional) Include only active groups to the set. Include inactive groups if you provide false.

Return value:

self

Usage:


-- Include only active groups to the set.
GroupSet = SET_GROUP:New():FilterActive():FilterStart()

-- Include only active groups to the set of the blue coalition, and filter one time.
GroupSet = SET_GROUP:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()

-- Include only active groups to the set of the blue coalition, and filter one time.
-- Later, reset to include back inactive groups to the set.
GroupSet = SET_GROUP:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()
... logic ...
GroupSet = SET_GROUP:New():FilterActive( false ):FilterCoalition( "blue" ):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 groups of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_GROUP

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "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

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_GROUP

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a GROUP object as first argument.

...

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

Parameter:

#string Prefixes

The string pattern(s) that needs to be contained in the group name. Can also be passed as a #table of strings.

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

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

Defined in:

SET_GROUP

Parameter:

A Core.Point#POINT_VEC2 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 that only contains alive groups.

Defined in:

SET_GROUP

Return value:

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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 Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

Defined in:

SET_OPSGROUP

Parameters:

#string ObjectName

The name of the object.

The object itself.

Return value:

The added BASE Object.

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.

Builds a set of groups that are only active.

Only the groups that are active will be included within the set.

Defined in:

SET_OPSGROUP

Parameter:

#boolean Active

(optional) Include only active groups to the set. Include inactive groups if you provide false.

Return value:

Usage:


-- Include only active groups to the set.
GroupSet = SET_OPSGROUP:New():FilterActive():FilterStart()

-- Include only active groups to the set of the blue coalition, and filter one time.
GroupSet = SET_OPSGROUP:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()

-- Include only active groups to the set of the blue coalition, and filter one time.
-- Later, reset to include back inactive groups to the set.
GroupSet = SET_OPSGROUP:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()
... logic ...
GroupSet = SET_OPSGROUP:New():FilterActive( false ):FilterCoalition( "blue" ):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 coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_OPSGROUP

Parameters:

#string Coalitions

Can take the following values: "red", "blue", "neutral" or combinations as a table, for example {"red", "neutral"}.

#boolean Clear

If true, clear any previously defined filters.

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:

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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

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

Defined in:

Parameter:

The EventData structure.

Weapon add.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Trigger zone.

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

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

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

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

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

Defined in:

Parameters:

#number Start

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

#number Repeat

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

#number RandomizeFactor

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

#number Stop

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

#function SchedulerFunction

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

#table ...

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

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

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

Set the Class Core.Event processing Priority.

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

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

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

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

Defined in:

Parameters:

Object

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

Key

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

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

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

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

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


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

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

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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

Builds a set of groups of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_OPSZONE

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral" or combinations as a table, for example {"red", "neutral"}.

Return value:

self

Filters for the defined collection.

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

Parameter:

#string Prefixes

The string pattern(s) that needs to be contained in the zone name. Can also be passed as a #table of strings.

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

Return value:

The random Zone.

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 OnDead or OnCrash event for alive units set.

Defined in:

SET_OPSZONE

Parameter:

Handles the OnEventNewZone event for the Set.

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.

Defined in:

SET_OPSZONE

Parameters:

#string ZoneName

The name of the zone.

#number Probability

The probability in percent.

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:

The added BASE Object.

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

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

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

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

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

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

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

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

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

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

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

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

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

#BASE FromClass

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

Return value:

Get a Value given a Key from the Object.

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

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

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

Return value:

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

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

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

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

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

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

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

Examples:

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

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

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

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

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

Defined in:

Parameter:

ClassName

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

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

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

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

Defined in:

Return value:

Occurs when an Event for an object is triggered.

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

Defined in:

Parameter:

The EventData structure.

BDA.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

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

Defined in:

Parameter:

The EventData structure.

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

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

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

Defined in:

Parameter:

The EventData structure.

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

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

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

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

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

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

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

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

Defined in:

Parameter:

The EventData structure.

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

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

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

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

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

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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 coalitions joined by specific players.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_PLAYER

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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.

Filters for the defined collection.

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

Parameter:

#string Prefixes

The string pattern(s) that need to be contained in the scenery name. Can also be passed as a #table of strings.

Return value:

self

Builds a set of SCENERYs that contain an exact match of the "ROLE" property.

Defined in:

SET_SCENERY

Parameter:

#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.

Return value:

self

Builds a set of scenery objects in zones.

Defined in:

SET_SCENERY

Parameter:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#SET_ZONE

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:

The center coordinate of all the objects in the set.

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

[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

Parameter:

The zone to be scanned. Can be a ZONE_RADIUS (round) or a ZONE_POLYGON (e.g. Quad-Point)

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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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:

#string AddStatic

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 units out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_STATIC

Parameter:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

Return value:

self

Builds a set of units of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_STATIC

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

Return value:

self

Builds a set of units of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_STATIC

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_STATIC

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a STATIC object as first argument.

...

Condition function arguments if any.

Return value:

self

Usage:

         -- Image you want to exclude a specific CLIENT from a SET:
         local groundset = SET_STATIC:New():FilterCoalitions("blue"):FilterActive(true):FilterFunction(
         -- The function needs to take a STATIC object as first - and in this case, only - argument.
         function(static)
             local isinclude = true
             if static:GetName() == "Exclude Me" then isinclude = false end
             return isinclude
         end
         ):FilterOnce()
         BASE:I(groundset:Flush())

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

Parameter:

#string Prefixes

The string pattern(s) that need to be contained in the static name. Can also be passed as a #table of strings.

Return value:

self

Starts 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

Parameter:

#string Types

Can take those type strings known within DCS world.

Return value:

self

Builds a set of statics in zones.

Defined in:

SET_STATIC

Parameter:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#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_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

Check if minimal one element of the SET_STATIC is in the Zone.

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 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 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_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 element of the SET_STATIC is in the Zone.

Defined in:

SET_STATIC

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

Return value:

#boolean:

Check if minimal one element of the SET_STATIC is in the Zone.

Defined in:

SET_STATIC

Parameter:

The Zone to be tested for.

Return value:

#boolean:

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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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

Iterate the SET_UNIT and count how many UNITs are alive.

Defined in:

SET_UNIT

Return value:

#number:

The number of UNITs alive.

Builds a set of units that are only active.

Only the units that are active will be included within the set.

Defined in:

SET_UNIT

Parameter:

#boolean Active

(Optional) Include only active units to the set. Include inactive units if you provide false.

Return value:

self

Usage:


-- Include only active units to the set.
UnitSet = SET_UNIT:New():FilterActive():FilterStart()

-- Include only active units to the set of the blue coalition, and filter one time.
UnitSet = SET_UNIT:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()

-- Include only active units to the set of the blue coalition, and filter one time.
-- Later, reset to include back inactive units to the set.
UnitSet = SET_UNIT:New():FilterActive():FilterCoalition( "blue" ):FilterOnce()
... logic ...
UnitSet = SET_UNIT:New():FilterActive( false ):FilterCoalition( "blue" ):FilterOnce()

Builds a set of units out of categories.

Possible current categories are plane, helicopter, ground, ship.

Defined in:

SET_UNIT

Parameter:

#string Categories

Can take the following values: "plane", "helicopter", "ground", "ship".

Return value:

self

Builds a set of units of coalitions.

Possible current coalitions are red, blue and neutral.

Defined in:

SET_UNIT

Parameter:

#string Coalitions

Can take the following values: "red", "blue", "neutral".

Return value:

self

Builds a set of units of defined countries.

Possible current countries are those known within DCS world.

Defined in:

SET_UNIT

Parameter:

#string Countries

Can take those country strings known within DCS world.

Return value:

self

[User] Add a custom condition function.

Defined in:

SET_UNIT

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a UNIT object as first argument.

...

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 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

Parameter:

#table RadarTypes

The radar types.

Return value:

self

Builds a set of SEADable units.

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

Parameter:

#string Prefixes

The string pattern(s) that needs to be contained in the unit name. Can also be passed as a #table of strings.

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

Parameter:

#string Types

Can take those type strings known within DCS world.

Return value:

self

Set filter timer interval for FilterZones if using active filtering with FilterStart().

Defined in:

SET_UNIT

Parameter:

#number Seconds

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

Parameter:

#table Zones

Table of Core.Zone#ZONE Zone objects, or a Core.Set#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_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 SET 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 average heading of the SET_UNIT.

Defined in:

SET_UNIT

Return value:

#number:

Heading Heading in degrees and speed in mps in case of moving units.

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:

self

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 SET_UNIT.

Defined in:

SET_UNIT

Return value:

#number:

The speed in mps in case of moving units.

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

Parameters:

Core.Zone#ZONE ZoneObject

The Zone to be tested for.

Zone

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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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

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

Transparency [0,1]. Default 1.

#table FillColor

RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as Color value.

#number FillAlpha

Transparency [0,1]. Default 0.15.

#number LineType

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

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

Parameter:

#string Prefixes

The string pattern(s) that need to be contained in the zone name. Can also be passed as a #table of strings.

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

Number of tries to find a zone

Return values:

The random Zone.

#nil:

if no zone in the collection.

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 OnDead or OnCrash event for alive units set.

Defined in:

SET_ZONE

Parameter:

Handles the OnEventNewZone event for the Set.

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

Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.

Return value:

self

Set a zone probability.

Defined in:

SET_ZONE

Parameters:

#string ZoneName

The name of the zone.

ZoneProbability

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)

Triggers the FSM event "TriggerStop".

Stops the SET_ZONE Trigger.

Defined in:

SET_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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event

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

Parameter:

#string Prefixes

The string pattern(s) that needs to be contained in the zone name. Can also be passed as a #table of strings.

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

Return values:

The random Zone.

#nil:

if no zone in the collection.

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 OnDead or OnCrash event for alive units set.

Defined in:

SET_ZONE_GOAL

Parameter:

Handles the OnEventNewZone event for the Set.

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

Set a zone probability.

Defined in:

SET_ZONE_GOAL

Parameters:

#string ZoneName

The name of the zone.

ZoneProbability

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:

The added BASE Object.

Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

Defined in:

Parameter:

Return value:

The added BASE Object.

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

Compare two sets.

Defined in:

Parameters:

First set.

Set to be merged into first set.

Return value:

The set of objects that are included in SetA and SetB.

Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

Defined in:

Return value:

#number:

Count

Clear all filters.

You still need to apply :FilterOnce()

Defined in:

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

[Internal] Add a functional filter

Defined in:

Parameters:

#function ConditionFunction

If this function returns true, the object is added to the SET. The function needs to take a CONTROLLABLE object as first argument.

...

Condition function arguments, if any.

Return value:

#boolean:

If true, at least one condition is true

Filters for the defined collection.

Defined in:

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#POINT_VEC2.

Defined in:

Parameter:

A Core.Point#COORDINATE or Core.Point#POINT_VEC2 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.

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

#table arg

Arguments of the IteratorFunction.

#SET_BASE Set

(Optional) The set to use. Default self:GetSet().

#function Function

(Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.

#table FunctionArguments

(Optional) Function arguments.

Return value:

self

Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.

Defined in:

Parameters:

#function IteratorFunction

The function that will be called.

arg

Set

Function

FunctionArguments

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:

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

Get the complement of two sets.

Defined in:

Parameter:

Set other set, called B .

Return value:

The set of objects that are in set B but not in this set A .

Get the intersection of this set, called A , and another set.

Defined in:

Parameter:

Set other set, called B .

Return value:

A set of objects that is 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.

Get the union of two sets.

Defined in:

Parameter:

Set B .

Return value:

The union set, i.e. contains objects that are in set A or in set B .

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.

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.

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:

self

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

Defined in:

Parameter:

Database

Return value:

Usage:

-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
DBObject = 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 "yield interval" and the "time interval".

Defined in:

Parameters:

#number YieldInterval

Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

#number TimeInterval

Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

Return value:

self

Define the SET iterator "limit".

Defined in:

Parameter:

#number Limit

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:

The added BASE Object.

[Internal] Check if the condition functions returns true.

Defined in:

Parameter:

The object to filter for

Return value:

#boolean:

If true, if all conditions are true

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.

Field(s)

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

IniObjectCategory

Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.

Defined in:

Parameter:

Wrapper.Unit#UNIT PlayerUnit

The aircraft unit the player entered.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Core.Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()

Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

Event ID.

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end

Defined in:

Return value:

Occurs when an Event for an object is triggered.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.

Defined in:

Parameter:

The EventData structure.

BDA.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Discard chair after ejection.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.

initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Landing quality mark.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Weapon add.

Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when a player enters a slot and takes control of an aircraft.

Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Trigger zone.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

Have a look at the class Core.Event#EVENT as these are just the prototypes.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#string:

The Schedule ID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#string SchedulerID

(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.

Set the Class Core.Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Core.Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Class name.

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

Class name.

#string Method

Method.

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:


  -- Switch the tracing On
  BASE:TraceOnOff( true )

  -- Switch the tracing Off
  BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Event ID.

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

(Internal) Serialize arguments

Defined in:

Parameter:

#table Arguments

Return value:

#string:

Text

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

The main event handling function...

This function captures all events generated for the class.

Defined in:

Parameter:

DCS#Event event