Module Set
This module contains the SET classes.
1) Set#SET_BASE class, extends Base#BASE
The 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 interator 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.
1.1) Add or remove objects from the SET
Some key core functions are Set#SET_BASE.Add and Set#SET_BASE.Remove to add or remove objects from the SET in your logic.
1.2) Define the SET iterator "yield interval" and the "time interval".
Modify the iterator intervals with the Set#SET_BASE.SetInteratorIntervals method. You can set the "yield interval", and the "time interval". (See above).
2) Set#SET_GROUP class, extends Set#SET_BASE
Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:
- Coalitions
- Categories
- Countries
- Starting with certain prefix strings.
2.1) SET_GROUP construction method:
Create a new SET_GROUP object with the SET_GROUP.New method:
- SET_GROUP.New: Creates a new SET_GROUP object.
2.2) Add or Remove GROUP(s) from SET_GROUP:
GROUPS can be added and removed using the Set#SET_GROUP.AddGroupsByName and 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.
2.3) 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 gruops belonging to the country(ies).
- SET_GROUP.FilterPrefixes: Builds the SET_GROUP with the groups starting with the same prefix string(s).
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.
Planned filter criteria within development are (so these are not yet available):
- SET_GROUP.FilterZones: Builds the SET_GROUP with the groups within a Zone#ZONE.
2.4) SET_GROUP iterators:
Once the filters have been defined and the SETGROUP has been built, you can iterate the SETGROUP with the available iterator methods. The iterator methods will walk the SETGROUP set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SETGROUP:
- 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 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 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 Zone, providing the GROUP and optional parameters to the called function.
3) Set#SET_UNIT class, extends Set#SET_BASE
Mission designers can use the Set#SET_UNIT class to build sets of units belonging to certain:
- Coalitions
- Categories
- Countries
- Unit types
- Starting with certain prefix strings.
3.1) SET_UNIT construction method:
Create a new SET_UNIT object with the SET_UNIT.New method:
- SET_UNIT.New: Creates a new SET_UNIT object.
3.2) Add or Remove UNIT(s) from SET_UNIT:
UNITs can be added and removed using the Set#SET_UNIT.AddUnitsByName and 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.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 starting with the same prefix string(s).
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 within the SET_UNIT.
Planned filter criteria within development are (so these are not yet available):
- SET_UNIT.FilterZones: Builds the SET_UNIT with the units within a Zone#ZONE.
3.4) SET_UNIT iterators:
Once the filters have been defined and the SETUNIT has been built, you can iterate the SETUNIT with the available iterator methods. The iterator methods will walk the SETUNIT set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SETUNIT:
- SET_UNIT.ForEachUnit: Calls a function for each alive unit it finds within the SET_UNIT.
- SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a 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 Zone, providing the GROUP and optional parameters to the called function.
Planned iterators methods in development are (so these are not yet available):
- SET_UNIT.ForEachUnitInUnit: Calls a function for each unit contained within the SET_UNIT.
- SET_UNIT.ForEachUnitCompletelyInZone: Iterate and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.
- SET_UNIT.ForEachUnitNotInZone: Iterate and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.
4) Set#SET_CLIENT class, extends Set#SET_BASE
Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:
- Coalitions
- Categories
- Countries
- Client types
- Starting with certain prefix strings.
4.1) SET_CLIENT construction method:
Create a new SET_CLIENT object with the SET_CLIENT.New method:
- SET_CLIENT.New: Creates a new SET_CLIENT object.
4.2) Add or Remove CLIENT(s) from SET_CLIENT:
CLIENTs can be added and removed using the Set#SET_CLIENT.AddClientsByName and 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.
4.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 starting with the same prefix string(s).
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 within the SET_CLIENT.
Planned filter criteria within development are (so these are not yet available):
- SET_CLIENT.FilterZones: Builds the SET_CLIENT with the clients within a Zone#ZONE.
4.4) SET_CLIENT iterators:
Once the filters have been defined and the SETCLIENT has been built, you can iterate the SETCLIENT with the available iterator methods. The iterator methods will walk the SETCLIENT set, and call for each element within the set a function that you provide. The following iterator methods are currently available within the SETCLIENT:
- SET_CLIENT.ForEachClient: Calls a function for each alive client it finds within the SET_CLIENT.
Global(s)
| SET_BASE | |
| SET_CLIENT | |
| SET_GROUP | |
| SET_UNIT |
Type SET_BASE
| SET_BASE:Add(ObjectName, Object) |
Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index. |
| SET_BASE.ClassName | |
| SET_BASE:Flush() |
Flushes the current SET_BASE contents in the log ... |
| SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) |
Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters. |
| SET_BASE:IsIncludeObject(Object) |
Decides whether to include the Object |
| SET_BASE:New(Database) |
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
| SET_BASE:Remove(ObjectName) |
Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name. |
| SET_BASE.Set | |
| SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) |
Define the SET iterator "yield interval" and the "time interval". |
| SET_BASE.TimeInterval | |
| SET_BASE.YieldInterval | |
| SET_BASE:_EventOnBirth(Event) |
Handles the OnBirth event for the Set. |
| SET_BASE:_EventOnDeadOrCrash(Event) |
Handles the OnDead or OnCrash event for alive units set. |
| SET_BASE:_FilterStart() |
Starts the filtering for the defined collection. |
| SET_BASE:_Find(ObjectName) |
Finds an Base#BASE object based on the object Name. |
Type SET_CLIENT
| SET_CLIENT:AddClientsByName(AddClientNames) |
Add CLIENT(s) to SET_CLIENT. |
| SET_CLIENT:AddInDatabase(Event) |
Handles the Database to check on an event (birth) that the Object was added in the Database. |
| SET_CLIENT.ClassName | |
| SET_CLIENT.Clients | |
| SET_CLIENT.Filter | |
| SET_CLIENT:FilterCategories(Categories) |
Builds a set of clients out of categories. |
| SET_CLIENT:FilterCoalitions(Coalitions) |
Builds a set of clients of coalitions. |
| SET_CLIENT:FilterCountries(Countries) |
Builds a set of clients of defined countries. |
| SET_CLIENT.FilterMeta | |
| SET_CLIENT:FilterPrefixes(Prefixes) |
Builds a set of clients of defined client prefixes. |
| SET_CLIENT:FilterStart() |
Starts the filtering. |
| SET_CLIENT:FilterTypes(Types) |
Builds a set of clients of defined client types. |
| SET_CLIENT:FindClient(ClientName) |
Finds a Client based on the Client Name. |
| SET_CLIENT:FindInDatabase(Event) |
Handles the Database to check on any event that Object exists in the Database. |
| SET_CLIENT:ForEachClient(IteratorFunction, ...) |
Interate the SET_CLIENT and call an interator 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 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 Zone, providing the CLIENT and optional parameters to the called function. |
| SET_CLIENT:IsIncludeObject(MClient) | |
| SET_CLIENT:New() |
Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names. |
| SET_CLIENT:RemoveClientsByName(RemoveClientNames) |
Remove CLIENT(s) from SET_CLIENT. |
Type SET_GROUP
| SET_GROUP:AddGroupsByName(AddGroupNames) |
Add GROUP(s) to SET_GROUP. |
| SET_GROUP:AddInDatabase(Event) |
Handles the Database to check on an event (birth) that the Object was added in the Database. |
| SET_GROUP.ClassName | |
| SET_GROUP.Filter | |
| SET_GROUP:FilterCategories(Categories) |
Builds a set of groups out of categories. |
| SET_GROUP:FilterCoalitions(Coalitions) |
Builds a set of groups of coalitions. |
| SET_GROUP:FilterCountries(Countries) |
Builds a set of groups of defined countries. |
| SET_GROUP.FilterMeta | |
| SET_GROUP:FilterPrefixes(Prefixes) |
Builds a set of groups of defined GROUP prefixes. |
| SET_GROUP:FilterStart() |
Starts the filtering. |
| SET_GROUP:FindGroup(GroupName) |
Finds a Group based on the Group Name. |
| SET_GROUP:FindInDatabase(Event) |
Handles the Database to check on any event that Object exists in the Database. |
| SET_GROUP:ForEachGroup(IteratorFunction, ...) |
Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters. |
| SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) |
Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a 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 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 Zone, providing the GROUP and optional parameters to the called function. |
| SET_GROUP:IsIncludeObject(MooseGroup) | |
| SET_GROUP:New() |
Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names. |
| SET_GROUP:RemoveGroupsByName(RemoveGroupNames) |
Remove GROUP(s) from SET_GROUP. |
Type SET_UNIT
| SET_UNIT:AddInDatabase(Event) |
Handles the Database to check on an event (birth) that the Object was added in the Database. |
| SET_UNIT:AddUnitsByName(AddUnitNames) |
Add UNIT(s) to SET_UNIT. |
| SET_UNIT.ClassName | |
| SET_UNIT.Filter | |
| SET_UNIT:FilterCategories(Categories) |
Builds a set of units out of categories. |
| SET_UNIT:FilterCoalitions(Coalitions) |
Builds a set of units of coalitions. |
| SET_UNIT:FilterCountries(Countries) |
Builds a set of units of defined countries. |
| SET_UNIT.FilterMeta | |
| SET_UNIT:FilterPrefixes(Prefixes) |
Builds a set of units of defined unit prefixes. |
| SET_UNIT:FilterStart() |
Starts the filtering. |
| SET_UNIT:FilterTypes(Types) |
Builds a set of units of defined unit types. |
| SET_UNIT:FindInDatabase(Event) |
Handles the Database to check on any event that Object exists in the Database. |
| SET_UNIT:FindUnit(UnitName) |
Finds a Unit based on the Unit Name. |
| SET_UNIT:ForEachUnit(IteratorFunction, ...) |
Interate the SET_UNIT and call an interator 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 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 Zone, providing the UNIT and optional parameters to the called function. |
| SET_UNIT:IsIncludeObject(MUnit) | |
| SET_UNIT:New() |
Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
| SET_UNIT:RemoveUnitsByName(RemoveUnitNames) |
Remove UNIT(s) from SET_UNIT. |
| SET_UNIT.Units |
Global(s)
Type Set
Type SET_BASE
SET_BASE class
Field(s)
- SET_BASE:Add(ObjectName, Object)
-
Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.
Parameters
-
#string ObjectName: -
Base#BASE Object:
Return value
Base#BASE: The added BASE Object.
-
- #string SET_BASE.ClassName
- SET_BASE:Flush()
-
Flushes the current SET_BASE contents in the log ...
(for debug reasons).
Return value
#string: A string with the names of the objects.
- SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments)
-
Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.
Parameters
-
#function IteratorFunction: The function that will be called. -
arg: -
Set: -
Function: -
FunctionArguments:
Return value
#SET_BASE: self
-
- SET_BASE:IsIncludeObject(Object)
-
Decides whether to include the Object
Parameter
-
#table Object:
Return value
#SET_BASE: self
-
- SET_BASE:New(Database)
-
Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
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() -
- SET_BASE:Remove(ObjectName)
-
Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.
Parameter
-
#string ObjectName:
-
- SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval)
-
Define the SET iterator "yield interval" and the "time interval".
Parameters
-
#number YieldInterval: Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed. -
#number TimeInterval: Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.
Return value
#SET_BASE: self
-
- SET_BASE:_EventOnBirth(Event)
-
Handles the OnBirth event for the Set.
Parameter
-
Event#EVENTDATA Event:
-
- SET_BASE:_EventOnDeadOrCrash(Event)
-
Handles the OnDead or OnCrash event for alive units set.
Parameter
-
Event#EVENTDATA Event:
-
- SET_BASE:_FilterStart()
-
Starts the filtering for the defined collection.
Return value
#SET_BASE: self
- SET_BASE:_Find(ObjectName)
-
Finds an Base#BASE object based on the object Name.
Parameter
-
#string ObjectName:
Return value
Base#BASE: The Object found.
-
Type SET_CLIENT
SET_CLIENT class
Field(s)
- SET_CLIENT:AddClientsByName(AddClientNames)
-
Add CLIENT(s) to SET_CLIENT.
Parameter
-
#string AddClientNames: A single name or an array of CLIENT names.
Return value
self
-
- SET_CLIENT:AddInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the CLIENT
-
#table: The CLIENT
-
- #string SET_CLIENT.ClassName
- SET_CLIENT:FilterCategories(Categories)
-
Builds a set of clients out of categories.
Possible current categories are plane, helicopter, ground, ship.
Parameter
-
#string Categories: Can take the following values: "plane", "helicopter", "ground", "ship".
Return value
#SET_CLIENT: self
-
- SET_CLIENT:FilterCoalitions(Coalitions)
-
Builds a set of clients of coalitions.
Possible current coalitions are red, blue and neutral.
Parameter
-
#string Coalitions: Can take the following values: "red", "blue", "neutral".
Return value
#SET_CLIENT: self
-
- SET_CLIENT:FilterCountries(Countries)
-
Builds a set of clients of defined countries.
Possible current countries are those known within DCS world.
Parameter
-
#string Countries: Can take those country strings known within DCS world.
Return value
#SET_CLIENT: self
-
- SET_CLIENT:FilterPrefixes(Prefixes)
-
Builds a set of clients of defined client prefixes.
All the clients starting with the given prefixes will be included within the set.
Parameter
-
#string Prefixes: The prefix of which the client name starts with.
Return value
#SET_CLIENT: self
-
- SET_CLIENT:FilterStart()
-
Starts the filtering.
Return value
#SET_CLIENT: self
- SET_CLIENT:FilterTypes(Types)
-
Builds a set of clients of defined client types.
Possible current types are those types known within DCS world.
Parameter
-
#string Types: Can take those type strings known within DCS world.
Return value
#SET_CLIENT: self
-
- SET_CLIENT:FindClient(ClientName)
-
Finds a Client based on the Client Name.
Parameter
-
#string ClientName:
Return value
Client#CLIENT: The found Client.
-
- SET_CLIENT:FindInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the CLIENT
-
#table: The CLIENT
-
- SET_CLIENT:ForEachClient(IteratorFunction, ...)
-
Interate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.
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
#SET_CLIENT: self
-
- SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.
Parameters
-
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
#SET_CLIENT: self
-
- SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.
Parameters
-
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
#SET_CLIENT: self
-
- SET_CLIENT:IsIncludeObject(MClient)
-
Parameter
-
Client#CLIENT MClient:
Return value
#SET_CLIENT: self
-
- SET_CLIENT:New()
-
Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.
Return value
Usage:
-- Define a new SET_CLIENT Object. This DBObject will contain a reference to all Clients. DBObject = SET_CLIENT:New()
- SET_CLIENT:RemoveClientsByName(RemoveClientNames)
-
Remove CLIENT(s) from SET_CLIENT.
Parameter
-
Client#CLIENT RemoveClientNames: A single name or an array of CLIENT names.
Return value
self
-
Type SET_GROUP
SET_GROUP class
Field(s)
- SET_GROUP:AddGroupsByName(AddGroupNames)
-
Add GROUP(s) to SET_GROUP.
Parameter
-
#string AddGroupNames: A single name or an array of GROUP names.
Return value
self
-
- SET_GROUP:AddInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the GROUP
-
#table: The GROUP
-
- #string SET_GROUP.ClassName
- SET_GROUP:FilterCategories(Categories)
-
Builds a set of groups out of categories.
Possible current categories are plane, helicopter, ground, ship.
Parameter
-
#string Categories: Can take the following values: "plane", "helicopter", "ground", "ship".
Return value
#SET_GROUP: self
-
- SET_GROUP:FilterCoalitions(Coalitions)
-
Builds a set of groups of coalitions.
Possible current coalitions are red, blue and neutral.
Parameter
-
#string Coalitions: Can take the following values: "red", "blue", "neutral".
Return value
#SET_GROUP: self
-
- SET_GROUP:FilterCountries(Countries)
-
Builds a set of groups of defined countries.
Possible current countries are those known within DCS world.
Parameter
-
#string Countries: Can take those country strings known within DCS world.
Return value
#SET_GROUP: self
-
- SET_GROUP:FilterPrefixes(Prefixes)
-
Builds a set of groups of defined GROUP prefixes.
All the groups starting with the given prefixes will be included within the set.
Parameter
-
#string Prefixes: The prefix of which the group name starts with.
Return value
#SET_GROUP: self
-
- SET_GROUP:FilterStart()
-
Starts the filtering.
Return value
#SET_GROUP: self
- SET_GROUP:FindGroup(GroupName)
-
Finds a Group based on the Group Name.
Parameter
-
#string GroupName:
Return value
Group#GROUP: The found Group.
-
- SET_GROUP:FindInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the GROUP
-
#table: The GROUP
-
- SET_GROUP:ForEachGroup(IteratorFunction, ...)
-
Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.
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
#SET_GROUP: self
-
- SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
Parameters
-
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
#SET_GROUP: self
-
- SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
Parameters
-
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
#SET_GROUP: self
-
- SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.
Parameters
-
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
#SET_GROUP: self
-
- SET_GROUP:IsIncludeObject(MooseGroup)
-
Parameter
-
Group#GROUP MooseGroup:
Return value
#SET_GROUP: self
-
- SET_GROUP:New()
-
Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.
Return value
Usage:
-- Define a new SET_GROUP Object. This DBObject will contain a reference to all alive GROUPS. DBObject = SET_GROUP:New()
- SET_GROUP:RemoveGroupsByName(RemoveGroupNames)
-
Remove GROUP(s) from SET_GROUP.
Parameter
-
Group#GROUP RemoveGroupNames: A single name or an array of GROUP names.
Return value
self
-
Type SET_UNIT
SET_UNIT class
Field(s)
- SET_UNIT:AddInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the UNIT
-
#table: The UNIT
-
- SET_UNIT:AddUnitsByName(AddUnitNames)
-
Add UNIT(s) to SET_UNIT.
Parameter
-
#string AddUnitNames: A single name or an array of UNIT names.
Return value
self
-
- #string SET_UNIT.ClassName
- SET_UNIT:FilterCategories(Categories)
-
Builds a set of units out of categories.
Possible current categories are plane, helicopter, ground, ship.
Parameter
-
#string Categories: Can take the following values: "plane", "helicopter", "ground", "ship".
Return value
#SET_UNIT: self
-
- SET_UNIT:FilterCoalitions(Coalitions)
-
Builds a set of units of coalitions.
Possible current coalitions are red, blue and neutral.
Parameter
-
#string Coalitions: Can take the following values: "red", "blue", "neutral".
Return value
#SET_UNIT: self
-
- SET_UNIT:FilterCountries(Countries)
-
Builds a set of units of defined countries.
Possible current countries are those known within DCS world.
Parameter
-
#string Countries: Can take those country strings known within DCS world.
Return value
#SET_UNIT: self
-
- SET_UNIT:FilterPrefixes(Prefixes)
-
Builds a set of units of defined unit prefixes.
All the units starting with the given prefixes will be included within the set.
Parameter
-
#string Prefixes: The prefix of which the unit name starts with.
Return value
#SET_UNIT: self
-
- SET_UNIT:FilterStart()
-
Starts the filtering.
Return value
#SET_UNIT: self
- SET_UNIT:FilterTypes(Types)
-
Builds a set of units of defined unit types.
Possible current types are those types known within DCS world.
Parameter
-
#string Types: Can take those type strings known within DCS world.
Return value
#SET_UNIT: self
-
- SET_UNIT:FindInDatabase(Event)
-
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!
Parameter
-
Event#EVENTDATA Event:
Return values
-
#string: The name of the UNIT
-
#table: The UNIT
-
- SET_UNIT:FindUnit(UnitName)
-
Finds a Unit based on the Unit Name.
Parameter
-
#string UnitName:
Return value
Unit#UNIT: The found Unit.
-
- SET_UNIT:ForEachUnit(IteratorFunction, ...)
-
Interate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.
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
#SET_UNIT: self
-
- SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.
Parameters
-
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
#SET_UNIT: self
-
- SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...)
-
Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.
Parameters
-
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
#SET_UNIT: self
-
- SET_UNIT:IsIncludeObject(MUnit)
-
Parameter
-
Unit#UNIT MUnit:
Return value
#SET_UNIT: self
-
- SET_UNIT:New()
-
Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
Return value
Usage:
-- Define a new SET_UNIT Object. This DBObject will contain a reference to all alive Units. DBObject = SET_UNIT:New()
- SET_UNIT:RemoveUnitsByName(RemoveUnitNames)
-
Remove UNIT(s) from SET_UNIT.
Parameter
-
Unit#UNIT RemoveUnitNames: A single name or an array of UNIT names.
Return value
self
-