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:
- #SET_GROUP: Defines a collection of Wrapper.Groups filtered by filter criteria.
- #SET_UNIT: Defines a collection of Wrapper.Units filtered by filter criteria.
- #SET_STATIC: Defines a collection of Wrapper.Statics filtered by filter criteria.
- #SET_CLIENT: Defines a collection of Wrapper.Clients filtered by filter criteria.
- #SET_AIRBASE: Defines a collection of Wrapper.Airbases filtered by filter criteria.
- #SET_CARGO: Defines a collection of Cargo.Cargos filtered by filter criteria.
- #SET_ZONE: Defines a collection of Core.Zones filtered by filter criteria.
- #SET_SCENERY: Defines a collection of Wrapper.Scenerys added via a filtered #SET_ZONE.
- #SET_DYNAMICCARGO: Defines a collection of Wrapper.DynamicCargos filtered by filter criteria.
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:
SET_AIRBASE constructorCreate a new SET_AIRBASE object with the SET_AIRBASE.New method:
|
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.New: Creates a new SET_AIRBASE object.
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:
- SET_AIRBASE.FilterCoalitions: Builds the SET_AIRBASE with the airbases belonging to the coalition(s).
Once the filter criteria have been set for the SET_AIRBASE, you can start filtering using:
- SET_AIRBASE.FilterStart: Starts the filtering of the airbases within the SET_AIRBASE.
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:
- SET_AIRBASE.ForEachAirbase: Calls a function for each airbase it finds within the SET_AIRBASE.
Global SET_BASE |
The Core.Set#SET_BASE class defines the core functions that define a collection of objects. |
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:
SET_CARGO constructorCreate a new SET_CARGO object with the SET_CARGO.New method:
|
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.New: Creates a new SET_CARGO object.
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.FilterStart: Starts the filtering of the cargos within the SET_CARGO.
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:
- SET_CARGO.ForEachCargo: Calls a function for each cargo it finds 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:
|
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:
- SET_CLIENT.New: Creates a new SET_CLIENT object.
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:
- SET_CLIENT.FilterCoalitions: Builds the SET_CLIENT with the clients belonging to the coalition(s).
- SET_CLIENT.FilterCategories: Builds the SET_CLIENT with the clients belonging to the category(ies).
- SET_CLIENT.FilterTypes: Builds the SET_CLIENT with the clients belonging to the client type(s).
- SET_CLIENT.FilterCountries: Builds the SET_CLIENT with the clients belonging to the country(ies).
- SET_CLIENT.FilterPrefixes: Builds the SET_CLIENT with the clients containing 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
- SET_CLIENT.FilterActive: Builds the SET_CLIENT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
- SET_CLIENT.FilterZones: Builds the SET_CLIENT with the clients within a Core.Zone#ZONE.
- SET_CLIENT.FilterFunction: Builds the SET_CLIENT with a custom condition.
Once the filter criteria have been set for the SET_CLIENT, you can start filtering using:
- SET_CLIENT.FilterStart: Starts the filtering of the clients dynamically.
- SET_CLIENT.FilterOnce: Filters the clients once.
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:
- SET_CLIENT.ForEachClient: Calls a function for each alive client it finds within the SET_CLIENT.
Global SET_DYNAMICCARGO |
The Core.Set#SET_DYNAMICCARGO class defines the functions that define a collection of objects form Wrapper.DynamicCargo#DYNAMICCARGO. |
The Core.Set#SET_DYNAMICCARGO class defines the functions that define a collection of objects form Wrapper.DynamicCargo#DYNAMICCARGO.
A SET provides iterators to iterate the SET. - Mission designers can use the SET_DYNAMICCARGO class to build sets of cargos belonging to certain:
- Coalitions
- Categories
- Countries
- Static types
- Starting with certain prefix strings.
- Etc.
SET_DYNAMICCARGO constructor
Create a new SET_DYNAMICCARGO object with the SET_DYNAMICCARGO.New method:
- SET_DYNAMICCARGO.New: Creates a new SET_DYNAMICCARGO object.
SET_DYNAMICCARGO filter criteria
You can set filter criteria to define the set of objects within the SET_DYNAMICCARGO. Filter criteria are defined by:
- SET_DYNAMICCARGO.FilterCoalitions: Builds the SET_DYNAMICCARGO with the objects belonging to the coalition(s).
- SET_DYNAMICCARGO.FilterTypes: Builds the SET_DYNAMICCARGO with the cargos belonging to the statiy type name(s).
- SET_DYNAMICCARGO.FilterCountries: Builds the SET_DYNAMICCARGO with the objects belonging to the country(ies).
- SET_DYNAMICCARGO.FilterNamePatterns, SET_DYNAMICCARGO.FilterPrefixes: Builds the SET_DYNAMICCARGO with the cargo containing the same string(s) 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
- SET_DYNAMICCARGO.FilterZones: Builds the SET_DYNAMICCARGO with the cargo within a Core.Zone#ZONE.
- SET_DYNAMICCARGO.FilterFunction: Builds the SET_DYNAMICCARGO with a custom condition.
- SET_DYNAMICCARGO.FilterCurrentOwner: Builds the SET_DYNAMICCARGO with a specific owner name.
- SET_DYNAMICCARGO.FilterIsLoaded: Builds the SET_DYNAMICCARGO which is in state LOADED.
- SET_DYNAMICCARGO.FilterIsNew: Builds the SET_DYNAMICCARGO with is in state NEW.
- SET_DYNAMICCARGO.FilterIsUnloaded: Builds the SET_DYNAMICCARGO with is in state UNLOADED.
Once the filter criteria have been set for the SET_DYNAMICCARGO, you can start and stop filtering using:
- SET_DYNAMICCARGO.FilterStart: Starts the continous filtering of the objects within the SET_DYNAMICCARGO.
- SET_DYNAMICCARGO.FilterStop: Stops the continous filtering of the objects within the SET_DYNAMICCARGO.
- SET_DYNAMICCARGO.FilterOnce: Filters once for the objects within the SET_DYNAMICCARGO.
SET_DYNAMICCARGO iterators
Once the filters have been defined and the SET_DYNAMICCARGO has been built, you can iterate the SET_DYNAMICCARGO with the available iterator methods. The iterator methods will walk the SET_DYNAMICCARGO set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SET_DYNAMICCARGO:
- SET_DYNAMICCARGO.ForEach: Calls a function for each alive dynamic cargo it finds within the SET_DYNAMICCARGO.
SET_DYNAMICCARGO atomic methods
Various methods exist for a SET_DYNAMICCARGO to perform actions or calculations and retrieve results from the SET_DYNAMICCARGO:
- SET_DYNAMICCARGO.GetOwnerClientObjects(): Retrieve the type names of the Wrapper.Statics in the SET, delimited by a comma.
- SET_DYNAMICCARGO.GetOwnerNames(): Retrieve the type names of the Wrapper.Statics in the SET, delimited by a comma.
- SET_DYNAMICCARGO.GetStorageObjects(): Retrieve the type names of the Wrapper.Statics in the SET, delimited by a comma.
Global SET_GROUP |
Mission designers can use the Core.Set#SET_GROUP class to build sets of groups belonging to certain:
|
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:
- SET_GROUP.New: Creates a new SET_GROUP object.
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:
- SET_GROUP.FilterCategoryAirplane: Builds the SET_GROUP from airplanes.
- SET_GROUP.FilterCategoryHelicopter: Builds the SET_GROUP from helicopters.
- SET_GROUP.FilterCategoryGround: Builds the SET_GROUP from ground vehicles or infantry.
- SET_GROUP.FilterCategoryShip: Builds the SET_GROUP from ships.
- SET_GROUP.FilterCategoryStructure: Builds the SET_GROUP from structures.
- SET_GROUP.FilterZones: Builds the SET_GROUP with the groups within a Core.Zone#ZONE.
- SET_GROUP.FilterFunction: Builds the SET_GROUP with a custom condition.
Once the filter criteria have been set for the SET_GROUP, you can start filtering using:
- SET_GROUP.FilterStart: Starts the filtering of the groups within the SET_GROUP and add or remove GROUP objects dynamically.
- SET_GROUP.FilterOnce: Filters of the groups once.
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.ForEachGroup: Calls a function for each alive group it finds within the SET_GROUP.
- SET_GROUP.ForEachGroupCompletelyInZone: 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.ForEachGroupPartlyInZone: 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.ForEachGroupNotInZone: 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 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:
SET_OPSGROUP constructorCreate a new SET_OPSGROUP object with the SET_OPSGROUP.New method:
|
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.New: Creates a new SET_OPSGROUP object.
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:
- SET_OPSGROUP.FilterCategoryAirplane: Builds the SET_OPSGROUP from airplanes.
- SET_OPSGROUP.FilterCategoryHelicopter: Builds the SET_OPSGROUP from helicopters.
- SET_OPSGROUP.FilterCategoryGround: Builds the SET_OPSGROUP from ground vehicles or infantry.
- SET_OPSGROUP.FilterCategoryShip: Builds the SET_OPSGROUP from ships.
Once the filter criteria have been set for the SET_OPSGROUP, you can start filtering using:
- SET_OPSGROUP.FilterStart: Starts the filtering of the groups within the SET_OPSGROUP and add or remove GROUP objects dynamically.
- SET_OPSGROUP.FilterOnce: Filters of the groups once.
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.ForEachGroup: Calls a function for each alive group it finds 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. |
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:
- SET_OPSZONE.New: Creates a new SET_OPSZONE object.
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.FilterStart: Starts the filtering of the zones within the SET_OPSZONE.
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:
- SET_OPSZONE.ForEachZone: Calls a function for each zone it finds 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 constructorCreate a new SET_PLAYER object with the SET_PLAYER.New method:
|
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.New: Creates a new SET_PLAYER object.
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:
- SET_PLAYER.FilterStart: Starts the filtering of the clients within the SET_PLAYER.
Planned filter criteria within development are (so these are not yet available):
- SET_PLAYER.FilterZones: Builds the SET_PLAYER with the clients within a Core.Zone#ZONE.
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:
- SET_PLAYER.ForEachClient: Calls a function for each alive client it finds within the SET_PLAYER.
Global SET_SCENERY |
Mission designers can use the SET_SCENERY class to build sets of scenery belonging to certain:
SET_SCENERY constructorCreate a new SET_SCENERY object with the SET_SCENERY.New method:
|
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.New: Creates a new SET_SCENERY object.
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.ForEachScenery: Calls a function for each alive object it finds 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:
|
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:
- SET_STATIC.New: Creates a new SET_STATIC object.
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:
- SET_STATIC.FilterCoalitions: Builds the SET_STATIC with the units belonging to the coalition(s).
- SET_STATIC.FilterCategories: Builds the SET_STATIC with the units belonging to the category(ies).
- SET_STATIC.FilterTypes: Builds the SET_STATIC with the units belonging to the unit type(s).
- SET_STATIC.FilterCountries: Builds the SET_STATIC with the units belonging to the country(ies).
- SET_STATIC.FilterPrefixes: Builds the SET_STATIC with the units containing the same string(s) 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
- SET_STATIC.FilterZones: Builds the SET_STATIC with the units within a Core.Zone#ZONE.
- SET_STATIC.FilterFunction: Builds the SET_STATIC with a custom condition.
Once the filter criteria have been set for the SET_STATIC, you can start filtering using:
- SET_STATIC.FilterStart: Starts the filtering of the units within the SET_STATIC.
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.ForEachStatic: Calls a function for each alive unit it finds within the SET_STATIC.
- SET_STATIC.ForEachStaticCompletelyInZone: 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: 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.ForEachStaticNotInZone: 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 atomic methods
Various methods exist for a SET_STATIC to perform actions or calculations and retrieve results from the SET_STATIC:
- SET_STATIC.GetTypeNames(): Retrieve the type names of the Wrapper.Statics in the SET, delimited by a comma.
Global SET_UNIT |
Mission designers can use the SET_UNIT class to build sets of units belonging to certain:
|
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:
- SET_UNIT.New: Creates a new SET_UNIT object.
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:
- SET_UNIT.FilterCoalitions: Builds the SET_UNIT with the units belonging to the coalition(s).
- SET_UNIT.FilterCategories: Builds the SET_UNIT with the units belonging to the category(ies).
- SET_UNIT.FilterTypes: Builds the SET_UNIT with the units belonging to the unit type(s).
- SET_UNIT.FilterCountries: Builds the SET_UNIT with the units belonging to the country(ies).
- SET_UNIT.FilterPrefixes: Builds the SET_UNIT with the units sharing the same string(s) 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
- SET_UNIT.FilterActive: Builds the SET_UNIT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
- SET_UNIT.FilterZones: Builds the SET_UNIT with the units within a Core.Zone#ZONE.
- SET_UNIT.FilterFunction: Builds the SET_UNIT with a custom condition.
Once the filter criteria have been set for the SET_UNIT, you can start filtering using:
- SET_UNIT.FilterStart: Starts the filtering of the units dynamically.
- SET_UNIT.FilterOnce: Filters of the units once.
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:
- SET_UNIT.GetTypeNames(): Retrieve the type names of the Wrapper.Units in the SET, delimited by a comma.
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. |
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:
- SET_ZONE.New: Creates a new SET_ZONE object.
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.FilterStart: Starts the filtering of the zones within the SET_ZONE.
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:
- SET_ZONE.ForEachZone: Calls a function for each zone it finds 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. |
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:
- SET_ZONE_GOAL.New: Creates a new SET_ZONE_GOAL object.
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.FilterStart: Starts the filtering of the zones within the SET_ZONE_GOAL.
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:
- SET_ZONE_GOAL.ForEachZone: Calls a function for each zone it finds within the SET_ZONE_GOAL.
Type(s)
Fields and Methods inherited from SET_AIRBASE | Description |
---|---|
Add an AIRBASE object to SET_AIRBASE. |
|
Add AIRBASEs to SET_AIRBASE. |
|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Builds a set of airbases out of categories. |
|
Builds a set of airbases of coalitions. |
|
Starts the filtering. |
|
Finds a Airbase based on the Airbase Name. |
|
Finds an Airbase in range of a coordinate. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#POINT_VEC2. |
|
Iterate the SET_AIRBASE and call an iterator function for each AIRBASE, providing the AIRBASE and optional parameters. |
|
Finds a random Airbase in the set. |
|
Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories. |
|
Base capturing event. |
|
Dead event. |
|
Remove AIRBASEs from SET_AIRBASE. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_AIRBASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_AIRBASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_AIRBASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Added Handler OnAfter for SET_BASE |
|
SET_BASE:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_BASE.Filters | Description |
---|---|
Coalitions |
|
Prefixes. |
Fields and Methods inherited from SET_CARGO | Description |
---|---|
(R2.1) Add CARGO to SET_CARGO. |
|
(R2.1) Add CARGOs to SET_CARGO. |
|
(R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
(R2.1) Builds a set of cargos of coalitions. |
|
(R2.1) Builds a set of cargos of defined countries. |
|
Builds a set of CARGOs that contain a given string in their name. |
|
(R2.1) Starts the filtering. |
|
Stops the filtering for the defined collection. |
|
(R2.1) Builds a set of cargos of defined cargo types. |
|
(R2.1) Finds a Cargo based on the Cargo Name. |
|
(R2.1) Handles the Database to check on any event that Object exists in the Database. |
|
(R2.1) Iterate the SET_CARGO while identifying the nearest Cargo.Cargo#CARGO from a Core.Point#POINT_VEC2. |
|
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Deployed. |
|
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Loaded. |
|
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded. |
|
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded and not Deployed. |
|
(R2.1) Iterate the SET_CARGO and call an iterator function for each CARGO, providing the CARGO and optional parameters. |
|
(R2.1) |
|
Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories. |
|
(R2.1) Handles the OnDead or OnCrash event for alive units set. |
|
(R2.1) Handles the OnEventNewCargo event for the Set. |
|
(R2.1) Remove CARGOs from SET_CARGO. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Added Handler OnAfter for SET_BASE |
|
SET_CARGO:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_CARGO:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_CARGO:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_CARGO:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_CLIENT | Description |
---|---|
Add CLIENT(s) to SET_CLIENT. |
|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Iterate the SET_CLIENT and count alive units. |
|
Builds a set of clients that are only active. |
|
Builds a set of units which exist and are alive. |
|
Builds a set of clients of certain callsigns. |
|
Builds a set of clients out of categories. |
|
Builds a set of clients of coalitions. |
|
Builds a set of clients of defined countries. |
|
[User] Add a custom condition function. |
|
Builds a set of clients of certain playernames. |
|
Builds a set of CLIENTs that contain the given string in their unit/pilot name and NOT the group name! Attention! Bad naming convention as this does not filter only prefixes but all clients that contain the string. |
|
Starts the filtering. |
|
Stops the filtering. |
|
Builds a set of clients of defined client types. |
|
Set filter timer interval for FilterZones if using active filtering with FilterStart(). |
|
Builds a set of clients in zones. |
|
Finds a Client based on the Client Name. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
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. |
Gets the alive set. |
|
Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Remove CLIENT(s) from SET_CLIENT. |
|
[Internal] Private function for use of continous zone filter |
|
Handle CA slots addition |
|
Handle CA slots removal |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_CLIENT:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_CLIENT:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_CLIENT:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_DYNAMICCARGO | Description |
---|---|
Filters. |
|
Builds a set of dynamic cargo of defined coalitions. |
|
Builds a set of dynamic cargo of defined countries. |
|
This filter is N/A for SET_DYNAMICCARGO |
|
Builds a set of DYNAMICCARGOs that are owned at the moment by this player name. |
|
This filter is N/A for SET_DYNAMICCARGO |
|
[User] Add a custom condition function. |
|
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e. |
|
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.NEW (i.e. |
|
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e. |
|
Builds a set of DYNAMICCARGOs that contain the given string in their name. |
|
Builds a set of DYNAMICCARGOs that contain the given string in their name. |
|
Starts the filtering. |
|
Stops the filtering. |
|
Builds a set of dynamic cargo of defined dynamic cargo type names. |
|
Set filter timer interval for FilterZones if using active filtering with FilterStart(). |
|
Builds a set of dynamic cargo in zones. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Returns a list of current owners (Wrapper.Client#CLIENT objects) indexed by playername from the SET. |
|
Returns a list of current owners (playernames) indexed by playername from the SET. |
|
Returns a list of Wrapper.Storage#STORAGE objects from the SET indexed by cargo name. |
|
Table of indices. |
|
Unused table. |
|
Creates a new SET_DYNAMICCARGO object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Table of objects. |
|
Timer for active filtering of zones. |
|
[Internal] Private function for use of continous zone filter |
|
Handles the events for the Set. |
|
Handles the remove event for dynamic cargo set. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
Flushes the current SET_BASE contents in the log ... |
|
SET_DYNAMICCARGO: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_DYNAMICCARGO: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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
SET_DYNAMICCARGO:OnAfterAdded(From, Event, To, ObjectName, Object) |
Added Handler OnAfter for SET_BASE |
SET_DYNAMICCARGO:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
SET_DYNAMICCARGO:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
SET_DYNAMICCARGO:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
SET_DYNAMICCARGO:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
SET_DYNAMICCARGO:CreateEventDynamicCargoLoaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
SET_DYNAMICCARGO:CreateEventDynamicCargoRemoved(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
SET_DYNAMICCARGO:CreateEventDynamicCargoUnloaded(DynamicCargo) |
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
SET_DYNAMICCARGO:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
SET_DYNAMICCARGO:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
SET_DYNAMICCARGO:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
SET_DYNAMICCARGO:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_DYNAMICCARGO:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_DYNAMICCARGO:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_DYNAMICCARGO.Filters | Description |
---|---|
Fields and Methods inherited from SET_GROUP | Description |
---|---|
Activate late activated groups. |
|
Add a GROUP to SET_GROUP. |
|
Add GROUP(s) to SET_GROUP. |
|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Iterate the SET_GROUP and return true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE |
|
Iterate the SET_GROUP and return true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#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 |
|
Iterate the SET_GROUP and return true if at least one Wrapper.Group#GROUP of the #SET_GROUP is partly in Core.Zone. |
|
Iterate the SET_GROUP and count how many GROUPs and UNITs are 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... |
|
Iterate the SET_GROUP and count how many UNITs are completely in the Zone |
|
Builds a set of groups that are active, ie in the mission but not yet activated (false) or actived (true). |
|
Build a set of groups that are alive. |
|
Builds a set of groups out of categories. |
|
Builds a set of groups out of airplane category. |
|
Builds a set of groups out of ground category. |
|
Builds a set of groups out of helicopter category. |
|
Builds a set of groups out of ship category. |
|
Builds a set of groups out of structure category. |
|
Builds a set of groups of coalitions. |
|
Builds a set of groups of defined countries. |
|
[User] Add a custom condition function. |
|
Filter the set once |
|
Builds a set of groups that contain the given string in their group name. |
|
Starts the filtering. |
|
Stops the filtering. |
|
Set filter timer interval for FilterZones if using active filtering with FilterStart(). |
|
Builds a set of groups in zones. |
|
Finds a Group based on the Group Name. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Iterate the SET_GROUP while identifying the nearest object from a Core.Point#POINT_VEC2. |
|
Iterate the SET_GROUP and call an iterator function for each GROUP object, providing the GROUP and optional parameters. |
|
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. |
Iterate the SET_GROUP and call an iterator function for some GROUP objects, providing the GROUP and optional parameters. |
|
Iterate the SET_GROUP and call an iterator function for some alive GROUP objects, providing the GROUP and optional parameters. |
|
Get a new set that only contains alive groups. |
|
Get the closest group of the set with respect to a given reference coordinate. |
|
Returns a report of of unit types. |
|
Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
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 |
|
Remove GROUP(s) from SET_GROUP. |
|
Iterate the SET_GROUP and set for each unit the default cargo bay weight limit. |
|
[Internal] Private function for use of continous zone filter |
|
Handles the OnDead or OnCrash event for alive groups set. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Added Handler OnAfter for SET_BASE |
|
SET_GROUP:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_GROUP:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_GROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_GROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_OPSGROUP | Description |
---|---|
Activate late activated groups in the set. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Add a GROUP or OPSGROUP object to the set. |
|
Add GROUP(s) or OPSGROUP(s) to the set. |
|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Builds a set of groups that are only active. |
|
Builds a set of groups out of categories. |
|
Builds a set of groups out of aicraft category (planes and helicopters). |
|
Builds a set of groups out of airplane category. |
|
Builds a set of groups out of ground category. |
|
Builds a set of groups out of helicopter category. |
|
Builds a set of groups out of ship category. |
|
Builds a set of groups of coalitions. |
|
Builds a set of groups of defined countries. |
|
Builds a set of groups that contain the given string in their group name. |
|
Starts the filtering. |
|
Finds a ARMYGROUP based on the group name. |
|
Finds a FLIGHTGROUP based on the group name. |
|
Finds an OPSGROUP based on the group name. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a NAVYGROUP based on the group name. |
|
Iterate the set and call an iterator function for each OPSGROUP object. |
|
Gets a new set that only contains alive groups. |
|
Check include object. |
|
Creates a new SET_OPSGROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Remove GROUP(s) or OPSGROUP(s) from the set. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive groups set. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_OPSGROUP:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_OPSGROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_OPSGROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_OPSZONE | Description |
---|---|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Add an OPSZONE to set. |
|
Clear all filters. |
|
Builds a set of groups of coalitions. |
|
Filters for the defined collection. |
|
Builds a set of OPSZONEs that contain the given string in their name. |
|
Starts the filtering. |
|
Stops the filtering for the defined collection. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a Zone based on its name. |
|
Iterate the SET_OPSZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters. |
|
Get the closest OPSZONE from a given reference coordinate. |
|
Get a random zone from the set. |
|
Validate if a coordinate is in one of the zones in the set. |
|
Private function that checks if an object is contained in the set or filtered. |
|
Creates a new SET_OPSZONE object, building a set of zones. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Handles the OnEventNewZone event for the Set. |
|
Remove ZONEs from SET_OPSZONE. |
|
Set a zone probability. |
|
Start all opszones of the set. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_OPSZONE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_OPSZONE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_OPSZONE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_PLAYER | Description |
---|---|
Add CLIENT(s) to SET_PLAYER. |
|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Builds a set of clients out of categories joined by players. |
|
Builds a set of clients of coalitions joined by specific players. |
|
Builds a set of clients of defined countries. |
|
Builds a set of PLAYERs that contain the given string in their unit/pilot name. |
|
Starts the filtering. |
|
Builds a set of clients of defined client types joined by players. |
|
Builds a set of players in zones. |
|
Finds a Client based on the Player Name. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
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. |
Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Remove CLIENT(s) from SET_PLAYER. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_PLAYER:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_PLAYER:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_PLAYER:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_SCENERY | Description |
---|---|
Add SCENERY(s) to SET_SCENERY. |
|
Add SCENERY(s) to SET_SCENERY. |
|
Iterate the SET_SCENERY and count how many SCENERYSs are alive. |
|
Filters for the defined collection. |
|
Builds a set of SCENERYs that contain the given string in their name. |
|
Builds a set of SCENERYs that contain an exact match of the "ROLE" property. |
|
Builds a set of scenery objects in zones. |
|
Finds a Scenery in the SET, based on the Scenery Name. |
|
Iterate the SET_SCENERY and call an iterator function for each alive SCENERY, providing the SCENERY and optional parameters. |
|
Get a table of alive objects. |
|
Get the center coordinate of the SET_SCENERY. |
|
Count overall current lifepoints of the SET objects. |
|
Count overall initial (Life0) lifepoints of the SET objects. |
|
Calculate current relative lifepoints of the SET objects, i.e. |
|
[Internal] Determine if an object is to be included in the SET |
|
Creates a new SET_SCENERY object. |
|
Creates a new SET_SCENERY object. |
|
Remove SCENERY(s) from SET_SCENERY. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_SCENERY:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_SCENERY:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_SCENERY:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_STATIC | Description |
---|---|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Add STATIC(s) to SET_STATIC. |
|
Add STATIC(s) to SET_STATIC. |
|
Calculate the maximum A2G threat level of the SET_STATIC. |
|
Iterate the SET_STATIC and count how many STATICSs are alive. |
|
Builds a set of units out of categories. |
|
Builds a set of units of coalitions. |
|
Builds a set of units of defined countries. |
|
[User] Add a custom condition function. |
|
Builds a set of STATICs that contain the given string in their name. |
|
Starts the filtering. |
|
Builds a set of units of defined unit types. |
|
Builds a set of statics in zones. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a Static based on the Static Name. |
|
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. |
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. |
Get the closest static of the set with respect to a given reference coordinate. |
|
Get the center coordinate of the SET_STATIC. |
|
Get the first unit from the set. |
|
Get the average heading of the SET_STATIC. |
|
Returns map of unit types. |
|
Returns a comma separated string of the unit types with a count in the Core.Set. |
|
Retrieve the type names of the Wrapper.Statics in the SET, delimited by an optional delimiter. |
|
Get the maximum velocity of the SET_STATIC. |
|
Check if no element of the SET_STATIC is in the Zone. |
|
Check if minimal one element of the SET_STATIC is in the Zone. |
|
Creates a new SET_STATIC object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Remove STATIC(s) from SET_STATIC. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_STATIC:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_STATIC:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_STATIC:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_UNIT | Description |
---|---|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Add UNIT(s) to SET_UNIT. |
|
Add UNIT(s) to SET_UNIT. |
|
Calculate the maximum A2G threat level of the SET_UNIT. |
|
Count Alive Units |
|
Builds a set of units that are only active. |
|
Builds a set of units which exist and are alive. |
|
Builds a set of units out of categories. |
|
Builds a set of units of coalitions. |
|
Builds a set of units of defined countries. |
|
[User] Add a custom condition function. |
|
Builds a set of units having a radar of give types. |
|
Builds a set of SEADable units. |
|
Builds a set of UNITs that contain a given string in their unit name. |
|
Starts the filtering. |
|
Stops the filtering. |
|
Builds a set of units of defined unit types. |
|
Set filter timer interval for FilterZones if using active filtering with FilterStart(). |
|
Builds a set of units in zones. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a Unit based on the Unit Name. |
|
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. |
Gets the alive set. |
|
Get the center coordinate of the SET_UNIT. |
|
Get the first unit from the set. |
|
Get the average heading of the SET_UNIT. |
|
SET_UNIT:GetSetPerThreatLevel(FromThreatLevel, ToThreatLevel) |
Get the SET of the SET_UNIT sorted per Threat Level. |
Retrieve the type names of the Wrapper.Units in the SET, delimited by an optional delimiter. |
|
Returns map of unit threat levels. |
|
Returns map of unit types. |
|
Returns a comma separated string of the unit types with a count in the Core.Set. |
|
Get the maximum velocity of the SET_UNIT. |
|
Returns if the Core.Set has air targets. |
|
Returns if the Core.Set has friendly ground units. |
|
Returns if the Core.Set has ground targets. |
|
Returns if the Core.Set has targets having a radar (of a given type). |
|
Returns if the Core.Set has targets that can be SEADed. |
|
Check if no element of the SET_UNIT is in the Zone. |
|
Check if minimal one element of the SET_UNIT is in the Zone. |
|
Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Remove UNIT(s) from SET_UNIT. |
|
Iterate the SET_UNIT and set for each unit the default cargo bay weight limit. |
|
[Internal] Private function for use of continous zone filter |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Added Handler OnAfter for SET_BASE |
|
SET_UNIT:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_UNIT:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_UNIT:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_UNIT:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_ZONE | Description |
---|---|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Add ZONEs to SET_ZONE. |
|
Add ZONEs by a search name to SET_ZONE. |
|
SET_ZONE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly) |
Draw all zones in the set on the F10 map. |
Builds a set of ZONEs that contain the given string in their name. |
|
Starts the filtering. |
|
Stops the filtering for the defined collection. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a Zone based on the Zone Name. |
|
Iterate the SET_ZONE and call an iterator function for each ZONE, providing the ZONE and optional parameters. |
|
Get the average aggregated coordinate of this set of zones. |
|
Get the closest zone to a given coordinate. |
|
Get a random zone from the set. |
|
Validate if a coordinate is in one of the zones in the set. |
|
Private function. |
|
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. |
Handles the OnDead or OnCrash event for alive units set. |
|
Handles the OnEventNewZone event for the Set. |
|
Remove ZONEs from SET_ZONE. |
|
Set the check time for SET_ZONE:Trigger() |
|
Set a zone probability. |
|
Start watching if the Object or Objects move into or out of our set of zones. |
|
Triggers the FSM event "TriggerStop". |
|
(Internal) Check the assigned objects for being in/out of the zone |
|
Triggers the FSM event "TriggerStop" after a delay. |
|
(Internal) Check the assigned objects for being in/out of the zone |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
|
Added Handler OnAfter for SET_BASE |
|
SET_ZONE:OnAfterRemoved(From, Event, To, ObjectName, Object) |
Removed Handler OnAfter for SET_BASE |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_ZONE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_ZONE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_ZONE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from SET_ZONE_GOAL | Description |
---|---|
Handles the Database to check on an event (birth) that the Object was added in the Database. |
|
Add ZONEs to SET_ZONE_GOAL. |
|
Builds a set of ZONE_GOALs that contain the given string in their name. |
|
Starts the filtering. |
|
Stops the filtering for the defined collection. |
|
Handles the Database to check on any event that Object exists in the Database. |
|
Finds a Zone based on the Zone Name. |
|
Iterate the SET_ZONE_GOAL and call an iterator function for each ZONE, providing the ZONE and optional parameters. |
|
Get a random zone from the set. |
|
Validate if a coordinate is in one of the zones in the set. |
|
Creates a new SET_ZONE_GOAL object, building a set of zones. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Handles the OnEventNewZone event for the Set. |
|
Remove ZONEs from SET_ZONE_GOAL. |
|
Set a zone probability. |
Fields and Methods inherited from SET_BASE | Description |
---|---|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index. |
|
Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index. |
|
Add a SET to this set. |
|
Clear the Objects in the Set. |
|
Compare two sets. |
|
Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes. |
|
Filters |
|
Clear all filters. |
|
Starts the filtering of the Crash events for the collection. |
|
Starts the filtering of the Dead events for the collection. |
|
[Internal] Add a functional filter |
|
Filters for the defined collection. |
|
Stops the filtering for the defined collection. |
|
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2. |
|
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. |
Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Gets the first object from the Core.Set#SET_BASE and derived classes. |
|
Gets the last object from the Core.Set#SET_BASE and derived classes. |
|
Gets a string with all the object names. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets a random object from the Core.Set#SET_BASE and derived classes. |
|
Gets the Set. |
|
Get the complement of two sets. |
|
Get the intersection of this set, called A , and another set. |
|
Gets a list of the Names of the Objects in the Set. |
|
Returns a table of the Objects in the Set. |
|
Get the union of two sets. |
|
Get the SET iterator "limit". |
|
Table of indices. |
|
Decides whether an object is in the SET |
|
Decides whether to include the Object. |
|
Decides whether an object is not in the SET |
|
Unused table. |
|
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 |
Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name. |
|
Table of objects. |
|
Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set). |
|
Define the SET iterator "limit". |
|
Sort the set by name. |
|
[Internal] Check if the condition functions returns true. |
|
Handles the OnBirth event for the Set. |
|
Handles the OnDead or OnCrash event for alive units set. |
|
Starts the filtering for the defined collection. |
|
Finds an Core.Base#BASE object based on the object Name. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
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. |
Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event. |
|
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event. |
|
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event. |
|
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo. |
|
Occurs when a dynamic cargo crate is removed. |
|
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
SET_ZONE_GOAL:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
SET_ZONE_GOAL:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
(Internal) Serialize arguments |
|
SET_ZONE_GOAL:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Field(s)
Function(s)
Add an AIRBASE object to SET_AIRBASE.
Defined in:
SET_AIRBASE
Parameter:
Wrapper.Airbase#AIRBASE airbase
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!
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.
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:
Core.Point#COORDINATE Coordinate
#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!
Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#POINT_VEC2.
Defined in:
SET_AIRBASE
Parameter:
Core.Point#POINT_VEC2 PointVec2
A Core.Point#POINT_VEC2 object from where to evaluate the closest Wrapper.Airbase#AIRBASE.
Return value:
The closest Wrapper.Airbase#AIRBASE.
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.
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.
Dead event.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Now base the new Set on the BaseSet
Table of indices.
Unused table.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
SET_BASE
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
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.
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.
Get the complement of two sets.
Defined in:
SET_BASE
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
Finds an Core.Base#BASE object based on the object Name.
Field(s)
Now base the new Set on the BaseSet
Table of indices.
Unused table.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Filters
Field(s)
Coalitions
Prefixes.
Function(s)
Field(s)
Function(s)
(R2.1) Add CARGO to SET_CARGO.
(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:
self
(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:
Core.Event#EVENTDATA Event
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.
Stops the filtering for the defined collection.
(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:
Core.Event#EVENTDATA Event
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:
Core.Point#POINT_VEC2 PointVec2
A Core.Point#POINT_VEC2 object from where to evaluate the closest Cargo.Cargo#CARGO.
Return value:
The closest Cargo.Cargo#CARGO.
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Deployed.
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is Loaded.
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded.
Iterate the SET_CARGO while identifying the first Cargo.Cargo#CARGO that is UnLoaded and not Deployed.
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)
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.
(R2.1) Handles the OnEventNewCargo event for the Set.
(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:
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
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 units which exist and are alive.
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 and NOT the group name! Attention! Bad naming convention as this does not filter only prefixes but all clients that contain the string.
Pattern matching applies.
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.
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:
Core.Event#EVENTDATA Event
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
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
Handle CA slots addition
Handle CA slots removal
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Table of indices.
Unused table.
Table of objects.
Function(s)
Builds a set of dynamic cargo of defined coalitions.
Possible current coalitions are red, blue and neutral.
Defined in:
SET_DYNAMICCARGO
Parameter:
#string Coalitions
Can take the following values: "red", "blue", "neutral".
Return value:
self
Builds a set of dynamic cargo of defined countries.
Possible current countries are those known within DCS world.
Defined in:
SET_DYNAMICCARGO
Parameter:
#string Countries
Can take those country strings known within DCS world.
Return value:
self
This filter is N/A for SET_DYNAMICCARGO
Builds a set of DYNAMICCARGOs that are owned at the moment by this player name.
This filter is N/A for SET_DYNAMICCARGO
[User] Add a custom condition function.
Defined in:
SET_DYNAMICCARGO
Parameters:
#function ConditionFunction
If this function returns true
, the object is added to the SET. The function needs to take a DYNAMICCARGO object as first argument.
...
Condition function arguments if any.
Return value:
self
Usage:
-- Image you want to exclude a specific DYNAMICCARGO from a SET:
local cargoset = SET_DYNAMICCARGO:New():FilterCoalitions("blue"):FilterFunction(
-- The function needs to take a DYNAMICCARGO object as first - and in this case, only - argument.
function(dynamiccargo)
local isinclude = true
if dynamiccargo:GetName() == "Exclude Me" then isinclude = false end
return isinclude
end
):FilterOnce()
BASE:I(cargoset:Flush())
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.
is on board of a Chinook).
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.NEW (i.e.
new and never loaded into a Chinook).
Builds a set of DYNAMICCARGOs that are in state DYNAMICCARGO.State.LOADED (i.e.
was on board of a Chinook previously and is now unloaded).
Builds a set of DYNAMICCARGOs that contain the given string in their name.
Attention! LUA Regex applies!
Defined in:
SET_DYNAMICCARGO
Parameter:
#string Patterns
The string pattern(s) that need to be contained in the dynamic cargo name. Can also be passed as a #table
of strings.
Return value:
self
Builds a set of DYNAMICCARGOs that contain the given string in their name.
Attention! Bad naming convention as this does not filter only prefixes but all names that contain the string. LUA Regex applies.
Defined in:
SET_DYNAMICCARGO
Parameter:
#string Prefixes
The string pattern(s) that need to be contained in the dynamic cargo name. Can also be passed as a #table
of strings.
Return value:
self
Starts the filtering.
Stops the filtering.
Builds a set of dynamic cargo of defined dynamic cargo type names.
Defined in:
SET_DYNAMICCARGO
Parameter:
#string Types
Can take those type name strings known within DCS world.
Return value:
self
Set filter timer interval for FilterZones if using active filtering with FilterStart().
Defined in:
SET_DYNAMICCARGO
Parameter:
#number Seconds
Seconds between check intervals, defaults to 30. Caution - do not be too agressive with timing! Objects are usually not moving fast enough to warrant a check of below 10 seconds.
Return value:
self
Builds a set of dynamic cargo in zones.
Defined in:
SET_DYNAMICCARGO
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 SETDYNAMICCARGO event or vise versa!
Returns a list of current owners (Wrapper.Client#CLIENT objects) indexed by playername from the SET.
Defined in:
SET_DYNAMICCARGO
Return value:
#list<#string>:
Ownerlist
Returns a list of current owners (playernames) indexed by playername from the SET.
Defined in:
SET_DYNAMICCARGO
Return value:
#list<#string>:
Ownerlist
Returns a list of Wrapper.Storage#STORAGE objects from the SET indexed by cargo name.
Defined in:
SET_DYNAMICCARGO
Return value:
#list<Wrapper.Storage#STORAGE>:
Storagelist
Defined in:
SET_DYNAMICCARGO
Parameter:
Return value:
self
Creates a new SET_DYNAMICCARGO object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
Defined in:
SET_DYNAMICCARGO
Return value:
Usage:
-- Define a new SET_DYNAMICCARGO Object. This DBObject will contain a reference to all alive Statics.
DBObject = SET_DYNAMICCARGO:New()
[Internal] Private function for use of continous zone filter
Handles the events for the Set.
Handles the remove event for dynamic cargo set.
Field(s)
Table of indices.
Unused table.
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:
Parameters:
#string ObjectName
The name of the object.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
Finds an Core.Base#BASE object based on the object Name.
Defined in:
Parameter:
#string ObjectName
Return value:
The Object found.
Field(s)
Table of indices.
Unused table.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace level
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
Activate late activated groups.
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:
Wrapper.Group#GROUP group
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:
self
Add GROUP(s) to SET_GROUP.
Defined in:
SET_GROUP
Parameter:
#string AddGroupNames
A single name or an array of GROUP 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_GROUP
Parameter:
Core.Event#EVENTDATA Event
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.
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.
Builds a set of groups out of ground category.
Builds a set of groups out of helicopter category.
Builds a set of groups out of ship category.
Builds a set of groups out of structure category.
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())
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
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:
Core.Event#EVENTDATA Event
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:
Core.Point#POINT_VEC2 PointVec2
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.
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:
Core.Point#COORDINATE Coordinate
Reference Coordinate from which the closest group is determined.
#table Coalitions
(Optional) Table of coalition #number entries to filter for.
Return values:
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:
Wrapper.Group#GROUP MGroup
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:
self
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
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.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
Activate late activated groups in the set.
Defined in:
SET_OPSGROUP
Parameter:
#number Delay
Delay in seconds.
Return value:
self
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.
Core.Base#BASE 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:
Wrapper.Group#GROUP group
The GROUP which should be added to the set. Can also be given as an #OPSGROUP object.
Return value:
self
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:
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!
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.OpsGroup#OPSGROUP Object
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:
self
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:
self
Builds a set of groups out of aicraft category (planes and helicopters).
Builds a set of groups out of airplane category.
Builds a set of groups out of ground category.
Builds a set of groups out of helicopter category.
Builds a set of groups out of ship category.
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:
self
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:
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_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:
self
Starts the filtering.
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!
Finds a NAVYGROUP based on the group name.
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:
self
Gets a new set that only contains alive groups.
Check include object.
Defined in:
SET_OPSGROUP
Parameter:
Wrapper.Group#GROUP MGroup
The group that is checked for inclusion.
Return value:
self
Creates a new SET_OPSGROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.
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:
self
Handles the OnBirth event for the Set.
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.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the AIRBASE
#table:
The AIRBASE
Add an OPSZONE to set.
Clear all filters.
You still need to apply FilterOnce()
to have an effect on the set.
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.
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.
Stops the filtering for the defined collection.
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:
Core.Event#EVENTDATA Event
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:
Core.Point#COORDINATE Coordinate
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:
Get a random zone from the set.
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:
Core.Point#COORDINATE Coordinate
The coordinate to be searched.
Return values:
Private function that checks if an object is contained in the set or filtered.
Creates a new SET_OPSZONE object, building a set of zones.
Handles the OnDead or OnCrash event for alive units set.
Handles the OnEventNewZone event for the Set.
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.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
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.
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:
Core.Event#EVENTDATA Event
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
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
Add SCENERY(s) to SET_SCENERY.
Defined in:
SET_SCENERY
Parameter:
Wrapper.Scenery#SCENERY AddScenery
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.
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:
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
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:
Core.Zone#ZONE Zone
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the STATIC
#table:
The STATIC
Add STATIC(s) to SET_STATIC.
Defined in:
SET_STATIC
Parameter:
Wrapper.Static#STATIC 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.
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:
Core.Event#EVENTDATA Event
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:
Core.Point#COORDINATE Coordinate
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.
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.
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:
Core.Zone#ZONE Zone
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the UNIT
#table:
The UNIT
Add UNIT(s) to SET_UNIT.
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
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 which exist and are alive.
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.
Builds a set of SEADable units.
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
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the UNIT
#table:
The UNIT
Finds a Unit based on the Unit Name.
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.
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.
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
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:
self
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
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the AIRBASE
#table:
The AIRBASE
Add ZONEs to SET_ZONE.
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
Stops the filtering for the defined collection.
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the AIRBASE
#table:
The AIRBASE
Finds a Zone based on the Zone Name.
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.
Get the closest zone to a given coordinate.
Defined in:
SET_ZONE
Parameter:
Core.Point#COORDINATE Coordinate
The reference coordinate from which the closest zone is determined.
Return values:
Get a random zone from the set.
Defined in:
SET_ZONE
Parameter:
#number margin
Number of tries to find a zone
Return values:
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:
Core.Point#COORDINATE Coordinate
The coordinate to be searched.
Return value:
The zone (if any) that validates the coordinate location.
Private function.
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.
Wrapper.Controllable#CONTROLLABLE Controllable
The controllable entering the zone.
Core.Zone#ZONE_BASE 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.
Wrapper.Controllable#CONTROLLABLE Controllable
The controllable leaving the zone.
Core.Zone#ZONE_BASE Zone
The zone left.
Handles the OnDead or OnCrash event for alive units set.
Handles the OnEventNewZone event for the Set.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Field(s)
Function(s)
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:
Core.Event#EVENTDATA Event
Return values:
#string:
The name of the AIRBASE
#table:
The AIRBASE
Add ZONEs to SET_ZONE_GOAL.
Defined in:
SET_ZONE_GOAL
Parameter:
Core.Zone#ZONE_BASE Zone
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:
self
Starts the filtering.
Stops the filtering for the defined collection.
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:
Core.Event#EVENTDATA Event
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:
self
Get a random zone from the set.
Defined in:
SET_ZONE_GOAL
Return values:
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:
Core.Point#COORDINATE Coordinate
The coordinate to be searched.
Return values:
Creates a new SET_ZONE_GOAL object, building a set of zones.
Defined in:
SET_ZONE_GOAL
Return value:
self
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.
Handles the OnEventNewZone event for the Set.
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.
Core.Base#BASE 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.
Add a SET to this set.
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:
Core.Set#SET_BASE SetA
First set.
Core.Set#SET_BASE SetB
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.
Clear all filters.
You still need to apply :FilterOnce()
Starts the filtering of the Crash events for the collection.
Starts the filtering of the Dead events for the collection.
[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.
Stops the filtering for the defined collection.
Iterate the SET_BASE while identifying the nearest object in the set from a Core.Point#POINT_VEC2.
Defined in:
Parameter:
Core.Point#POINT_VEC2 PointVec2
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.
Gets the first object from the Core.Set#SET_BASE and derived classes.
Gets the last object from the Core.Set#SET_BASE and derived classes.
Gets a string with all the object names.
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.
Get the complement of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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:
Core.Set#SET_BASE SetB
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.
Returns a table of the Objects in the Set.
Get the union of two sets.
Defined in:
Parameter:
Core.Set#SET_BASE SetB
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.
Decides whether an object is not in the SET
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).
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.
[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.
Handles the OnDead or OnCrash event for alive units set.
Starts the filtering for the defined collection.
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_DYNAMIC_CARGO_LOADED event.
Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a dynamic cargo crate is removed.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
* NOTE * this is a workarounf for DCS not creating these events as of Aug 2024.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
(Internal) Serialize arguments
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.