Module Core.Menu
Core - Manage hierarchical menu structures and commands for players within a mission.
Features:
- Setup mission sub menus.
- Setup mission command menus.
- Setup coalition sub menus.
- Setup coalition command menus.
- Setup group sub menus.
- Setup group command menus.
- Manage menu creation intelligently, avoid double menu creation.
- Only create or delete menus when required, and keep existing menus persistent.
- Update menu structures.
- Refresh menu structures intelligently, based on a time stamp of updates.
- Delete obsolete menus.
- Create new one where required.
- Don't touch the existing ones.
- Provide a variable amount of parameters to menus.
- Update the parameters and the receiving methods, without updating the menu within DCS!
- Provide a great performance boost in menu management.
- Provide a great tool to manage menus in your code.
DCS Menus can be managed using the MENU classes. The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scenarios where you need to set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing menus is not a easy feat if you have complex menu hierarchies defined. Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy. On top, MOOSE implements variable parameter passing for command menus.
There are basically two different MENU class types that you need to use:
To manage main menus, the classes begin with MENU_:
- Core.Menu#MENU_MISSION: Manages main menus for whole mission file.
- Core.Menu#MENU_COALITION: Manages main menus for whole coalition.
- Core.Menu#MENU_GROUP: Manages main menus for GROUPs.
To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENU_COMMAND_:
- Core.Menu#MENU_MISSION_COMMAND: Manages command menus for whole mission file.
- Core.Menu#MENU_COALITION_COMMAND: Manages command menus for whole coalition.
- Core.Menu#MENU_GROUP_COMMAND: Manages command menus for GROUPs.
-
Author: FlightControl
Contributions:
Global(s)
Global MENU_BASE |
Defines the main MENU class where other MENU classes are derived from. |
Defines the main MENU class where other MENU classes are derived from.
This is an abstract class, so don't use it.
Global MENU_COALITION |
Manages the main menus for DCS.coalitions. |
Manages the main menus for DCS.coalitions.
You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.
Usage:
-- This demo creates a menu structure for the planes within the red coalition.
-- To test, join the planes, then look at the other radio menus (Option F10).
-- Then switch planes and check if the menu is still there.
local Plane1 = CLIENT:FindByName( "Plane 1" )
local Plane2 = CLIENT:FindByName( "Plane 2" )
-- This would create a menu for the red coalition under the main DCS "Others" menu.
local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )
local function ShowStatus( StatusText, Coalition )
MESSAGE:New( Coalition, 15 ):ToRed()
Plane1:Message( StatusText, 15 )
Plane2:Message( StatusText, 15 )
end
local MenuStatus -- Menu#MENU_COALITION
local MenuStatusShow -- Menu#MENU_COALITION_COMMAND
local function RemoveStatusMenu()
MenuStatus:Remove()
end
local function AddStatusMenu()
-- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
end
local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
Global MENU_COALITION_COMMAND |
Manages the command menus for coalitions, which allow players to execute functions during mission execution. |
Manages the command menus for coalitions, which allow players to execute functions during mission execution.
You can add menus with the MENU_COALITION_COMMAND.New method, which constructs a MENU_COALITION_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION_COMMAND.Remove.
Global MENU_COMMAND_BASE |
Defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands. |
Defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.
Global MENU_GROUP |
Manages the main menus for Wrapper.Groups. |
Manages the main menus for Wrapper.Groups.
You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.
Usage:
-- This demo creates a menu structure for the two groups of planes.
-- Each group will receive a different menu structure.
-- To test, join the planes, then look at the other radio menus (Option F10).
-- Then switch planes and check if the menu is still there.
-- And play with the Add and Remove menu options.
-- Note that in multi player, this will only work after the DCS groups bug is solved.
local function ShowStatus( PlaneGroup, StatusText, Coalition )
MESSAGE:New( Coalition, 15 ):ToRed()
PlaneGroup:Message( StatusText, 15 )
end
local MenuStatus = {}
local function RemoveStatusMenu( MenuGroup )
local MenuGroupName = MenuGroup:GetName()
MenuStatus[MenuGroupName]:Remove()
end
--- @param Wrapper.Group#GROUP MenuGroup
local function AddStatusMenu( MenuGroup )
local MenuGroupName = MenuGroup:GetName()
-- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
end
SCHEDULER:New( nil,
function()
local PlaneGroup = GROUP:FindByName( "Plane 1" )
if PlaneGroup and PlaneGroup:IsAlive() then
local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
end
end, {}, 10, 10 )
SCHEDULER:New( nil,
function()
local PlaneGroup = GROUP:FindByName( "Plane 2" )
if PlaneGroup and PlaneGroup:IsAlive() then
local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
end
end, {}, 10, 10 )
Global MENU_GROUP_COMMAND |
The Core.Menu#MENU_GROUP_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution. |
The Core.Menu#MENU_GROUP_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
You can add menus with the MENU_GROUP_COMMAND.New method, which constructs a MENU_GROUP_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP_COMMAND.Remove.
Global MENU_GROUP_COMMAND_DELAYED |
Manages the command menus for coalitions, which allow players to execute functions during mission execution. |
Manages the command menus for coalitions, which allow players to execute functions during mission execution.
You can add menus with the MENU_GROUP_COMMAND_DELAYED.New method, which constructs a MENU_GROUP_COMMAND_DELAYED object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP_COMMAND_DELAYED.Remove.
Global MENU_GROUP_DELAYED |
The MENU_GROUP_DELAYED class manages the main menus for groups. |
The MENU_GROUP_DELAYED class manages the main menus for groups.
You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove. The creation of the menu item is delayed however, and must be created using the MENU_GROUP.Set method. This method is most of the time called after the "old" menu items have been removed from the sub menu.
Global MENU_INDEX |
Global MENU_MISSION |
Manages the main menus for a complete mission. |
Manages the main menus for a complete mission.
You can add menus with the MENU_MISSION.New method, which constructs a MENU_MISSION object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION.Remove.
Global MENU_MISSION_COMMAND |
Manages the command menus for a complete mission, which allow players to execute functions during mission execution. |
Manages the command menus for a complete mission, which allow players to execute functions during mission execution.
You can add menus with the MENU_MISSION_COMMAND.New method, which constructs a MENU_MISSION_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION_COMMAND.Remove.
Type(s)
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
|
Creation of a |
|
|
Creation of a Remove Unit Event. |
|
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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 pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_COALITION | Description |
|---|---|
|
MENU_COALITION constructor. |
|
|
Refreshes a radio item for a coalition |
|
|
Removes the main menu and the sub menus recursively of this MENU_COALITION. |
|
|
Removes the sub menus recursively of this MENU_COALITION. |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_COALITION:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
|
Creation of a |
|
|
Creation of a Remove Unit Event. |
|
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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 pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_COALITION:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_COALITION:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_COALITION:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_COALITION_COMMAND | Description |
|---|---|
|
MENU_COALITION constructor. |
|
|
Refreshes a radio item for a coalition |
|
|
Removes a radio command item for a coalition |
| Fields and Methods inherited from MENU_COMMAND_BASE | Description |
|---|---|
MENU_COALITION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) |
Constructor |
MENU_COALITION_COMMAND:SetCommandMenuArguments(CommandMenuArguments) |
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!! |
MENU_COALITION_COMMAND:SetCommandMenuFunction(CommandMenuFunction) |
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!! |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_COALITION_COMMAND:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
MENU_COALITION_COMMAND:CreateEventCrash(EventTime, Initiator) |
Creation of a Crash Event. |
MENU_COALITION_COMMAND:CreateEventDead(EventTime, Initiator) |
Creation of a Dead Event. |
MENU_COALITION_COMMAND:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_COALITION_COMMAND:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
MENU_COALITION_COMMAND:CreateEventTakeoff(EventTime, Initiator) |
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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. |
|
MENU_COALITION_COMMAND:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
MENU_COALITION_COMMAND:OnEventLandingAfterEjection(EventData) |
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. |
|
|
Occurs when a mission starts. |
|
|
Weapon add. |
|
|
Occurs when the pilot of an aircraft is killed. |
|
MENU_COALITION_COMMAND:OnEventPlayerEnterAircraft(EventData) |
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. |
|
MENU_COALITION_COMMAND:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
MENU_COALITION_COMMAND:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_COALITION_COMMAND:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_COALITION_COMMAND:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_COMMAND_BASE | Description |
|---|---|
MENU_COMMAND_BASE:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) |
Constructor |
MENU_COMMAND_BASE:SetCommandMenuArguments(CommandMenuArguments) |
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!! |
MENU_COMMAND_BASE:SetCommandMenuFunction(CommandMenuFunction) |
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!! |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_COMMAND_BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
MENU_COMMAND_BASE:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_COMMAND_BASE:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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. |
|
MENU_COMMAND_BASE:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_COMMAND_BASE:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
MENU_COMMAND_BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_COMMAND_BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_COMMAND_BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_GROUP | Description |
|---|---|
|
MENU_GROUP constructor. |
|
|
Refreshes a new radio item for a group and submenus |
|
|
Removes the main menu and sub menus recursively of this MENU_GROUP. |
|
|
Removes the sub menus recursively of this MENU_GROUP. |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_GROUP:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
|
Creation of a |
|
|
Creation of a Remove Unit Event. |
|
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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 pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_GROUP:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_GROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_GROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_GROUP_COMMAND | Description |
|---|---|
MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) |
Creates a new radio command item for a group |
|
Refreshes a radio item for a group |
|
|
Removes a menu structure for a group. |
| Fields and Methods inherited from MENU_COMMAND_BASE | Description |
|---|---|
MENU_GROUP_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) |
Constructor |
MENU_GROUP_COMMAND:SetCommandMenuArguments(CommandMenuArguments) |
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!! |
MENU_GROUP_COMMAND:SetCommandMenuFunction(CommandMenuFunction) |
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!! |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_GROUP_COMMAND:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
MENU_GROUP_COMMAND:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_GROUP_COMMAND:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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. |
|
MENU_GROUP_COMMAND:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_GROUP_COMMAND:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
MENU_GROUP_COMMAND:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_GROUP_COMMAND:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_GROUP_COMMAND:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_GROUP_COMMAND_DELAYED | Description |
|---|---|
|
Creates a new radio command item for a group |
|
|
Refreshes a radio item for a group |
|
|
Removes a menu structure for a group. |
|
|
Refreshes a radio item for a group |
| Fields and Methods inherited from MENU_COMMAND_BASE | Description |
|---|---|
MENU_GROUP_COMMAND_DELAYED:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) |
Constructor |
MENU_GROUP_COMMAND_DELAYED:SetCommandMenuArguments(CommandMenuArguments) |
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!! |
MENU_GROUP_COMMAND_DELAYED:SetCommandMenuFunction(CommandMenuFunction) |
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!! |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_GROUP_COMMAND_DELAYED:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
MENU_GROUP_COMMAND_DELAYED:CreateEventCrash(EventTime, Initiator) |
Creation of a Crash Event. |
MENU_GROUP_COMMAND_DELAYED:CreateEventDead(EventTime, Initiator) |
Creation of a Dead Event. |
MENU_GROUP_COMMAND_DELAYED:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_GROUP_COMMAND_DELAYED:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
MENU_GROUP_COMMAND_DELAYED:CreateEventTakeoff(EventTime, Initiator) |
Creation of a Takeoff 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 Event processing Priority. |
|
|
This is the worker method to retrieve the Parent class. |
|
|
Get a Value given a Key from the Object. |
|
MENU_GROUP_COMMAND_DELAYED:HandleEvent(EventID, EventFunction) |
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 object is completely destroyed. |
|
|
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. |
|
MENU_GROUP_COMMAND_DELAYED:OnEventDetailedFailure(EventData) |
Unknown precisely what creates this event, likely tied into newer damage model. |
MENU_GROUP_COMMAND_DELAYED:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
MENU_GROUP_COMMAND_DELAYED:OnEventLandingAfterEjection(EventData) |
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
MENU_GROUP_COMMAND_DELAYED:OnEventLandingQualityMark(EventData) |
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. |
|
|
Occurs when a mission starts. |
|
MENU_GROUP_COMMAND_DELAYED:OnEventParatrooperLanding(EventData) |
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
MENU_GROUP_COMMAND_DELAYED:OnEventPlayerEnterAircraft(EventData) |
Occurs when a player enters a slot and takes control of an aircraft. |
MENU_GROUP_COMMAND_DELAYED:OnEventPlayerEnterUnit(EventData) |
Occurs when any player assumes direct control of a unit. |
MENU_GROUP_COMMAND_DELAYED:OnEventPlayerLeaveUnit(EventData) |
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. |
|
MENU_GROUP_COMMAND_DELAYED:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
|
Schedule a new time event. |
|
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_GROUP_COMMAND_DELAYED:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_GROUP_COMMAND_DELAYED:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_GROUP_DELAYED | Description |
|---|---|
|
MENU_GROUP_DELAYED constructor. |
|
|
Refreshes a new radio item for a group and submenus |
|
|
Removes the main menu and sub menus recursively of this MENU_GROUP. |
|
|
Removes the sub menus recursively of this MENU_GROUP_DELAYED. |
|
|
Refreshes a new radio item for a group and submenus |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_GROUP_DELAYED:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
MENU_GROUP_DELAYED:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_GROUP_DELAYED:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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. |
|
MENU_GROUP_DELAYED:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_GROUP_DELAYED:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
MENU_GROUP_DELAYED:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_GROUP_DELAYED:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_GROUP_DELAYED:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_MISSION | Description |
|---|---|
|
MENU_MISSION constructor. |
|
|
Refreshes a radio item for a mission |
|
|
Removes the main menu and the sub menus recursively of this MENU_MISSION. |
|
|
Removes the sub menus recursively of this MENU_MISSION. |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_MISSION:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
|
Creation of a |
|
|
Creation of a Remove Unit Event. |
|
|
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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 pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_MISSION:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_MISSION:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_MISSION:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
| Fields and Methods inherited from MENU_MISSION_COMMAND | Description |
|---|---|
MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) |
MENU_MISSION constructor. |
|
Refreshes a radio item for a mission |
|
|
Removes a radio command item for a coalition |
| Fields and Methods inherited from MENU_COMMAND_BASE | Description |
|---|---|
MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) |
Constructor |
MENU_MISSION_COMMAND:SetCommandMenuArguments(CommandMenuArguments) |
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!! |
MENU_MISSION_COMMAND:SetCommandMenuFunction(CommandMenuFunction) |
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!! |
| Fields and Methods inherited from MENU_BASE | Description |
|---|---|
|
Gets a menu stamp for later prevention of menu removal. |
|
|
Constructor |
|
|
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu. |
|
|
Sets a menu stamp for later prevention of menu removal. |
|
|
Sets a tag for later selection of menu refresh. |
|
|
Sets a time stamp for later prevention of menu removal. |
| 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. |
|
MENU_MISSION_COMMAND:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
|
Creation of a Crash Event. |
|
|
Creation of a Dead Event. |
|
MENU_MISSION_COMMAND:CreateEventPlayerEnterAircraft(PlayerUnit) |
Creation of a |
MENU_MISSION_COMMAND:CreateEventRemoveUnit(EventTime, Initiator) |
Creation of a Remove Unit Event. |
MENU_MISSION_COMMAND:CreateEventTakeoff(EventTime, Initiator) |
Creation of a Takeoff 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 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 object is completely destroyed. |
|
|
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. |
|
MENU_MISSION_COMMAND:OnEventDiscardChairAfterEjection(EventData) |
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected |
|
|
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 initiator : The unit that has landed. |
|
|
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. |
|
|
Occurs when a mission starts. |
|
|
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. |
|
MENU_MISSION_COMMAND:ScheduleOnce(Start, SchedulerFunction, ...) |
Schedule a new time event. |
MENU_MISSION_COMMAND:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
|
Stops the Schedule. |
|
|
Set the Class 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. |
|
MENU_MISSION_COMMAND:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
MENU_MISSION_COMMAND:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
Field(s)
self:F( { RemoveParent } )
Function(s)
Defined in:
MENU_BASE
Parameter:
MenuText
Gets a Menu from a parent Menu
Defined in:
MENU_BASE
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Defined in:
MENU_BASE
Return value:
MenuStamp
Constructor
Defined in:
MENU_BASE
Parameters:
MenuText
Menu
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
MENU_BASE
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
MENU_BASE
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
Field(s)
self:F( { RemoveParent } )
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_COALITION constructor.
Creates a new MENU_COALITION object and creates the menu for a complete coalition.
Defined in:
MENU_COALITION
Parameters:
DCS#coalition.side Coalition
The coalition owning the menu.
#string MenuText
The text for the menu.
#table ParentMenu
The parent menu. This parameter can be ignored if you want the menu to be located at the parent menu of DCS world (under F10 other).
Return value:
self
Refreshes a radio item for a coalition
Removes the main menu and the sub menus recursively of this MENU_COALITION.
Defined in:
MENU_COALITION
Parameters:
MenuStamp
MenuTag
Return value:
#nil:
Removes the sub menus recursively of this MENU_COALITION.
Note that the main menu is kept!
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_COALITION constructor.
Creates a new radio command item for a coalition, which can invoke a function with parameters.
Defined in:
MENU_COALITION_COMMAND
Parameters:
DCS#coalition.side Coalition
The coalition owning the menu.
#string MenuText
The text for the menu.
Core.Menu#MENU_COALITION ParentMenu
The parent menu.
CommandMenuFunction
A function that is called when the menu key is pressed.
CommandMenuArgument
An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.
...
Return value:
Refreshes a radio item for a coalition
Removes a radio command item for a coalition
Defined in:
MENU_COALITION_COMMAND
Parameters:
MenuStamp
MenuTag
Return value:
#nil:
Field(s)
Function(s)
Constructor
Defined in:
Parameters:
MenuText
ParentMenu
CommandMenuFunction
CommandMenuArguments
Return value:
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuArguments
Return value:
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuFunction
Return value:
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
Constructor
Defined in:
MENU_COMMAND_BASE
Parameters:
MenuText
ParentMenu
CommandMenuFunction
CommandMenuArguments
Return value:
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_GROUP constructor.
Creates a new radio menu item for a group.
Defined in:
MENU_GROUP
Parameters:
Wrapper.Group#GROUP Group
The Group owning the menu.
#string MenuText
The text for the menu.
#table ParentMenu
The parent menu.
Return value:
self
Refreshes a new radio item for a group and submenus
Removes the main menu and sub menus recursively of this MENU_GROUP.
Defined in:
MENU_GROUP
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
#nil:
Removes the sub menus recursively of this MENU_GROUP.
Defined in:
MENU_GROUP
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
self
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
Creates a new radio command item for a group
Defined in:
MENU_GROUP_COMMAND
Parameters:
Wrapper.Group#GROUP Group
The Group owning the menu.
MenuText
The text for the menu.
ParentMenu
The parent menu.
CommandMenuFunction
A function that is called when the menu key is pressed.
CommandMenuArgument
An argument for the function.
...
Return value:
Refreshes a radio item for a group
Removes a menu structure for a group.
Defined in:
MENU_GROUP_COMMAND
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
#nil:
Field(s)
Function(s)
Constructor
Defined in:
Parameters:
MenuText
ParentMenu
CommandMenuFunction
CommandMenuArguments
Return value:
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuArguments
Return value:
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuFunction
Return value:
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
Creates a new radio command item for a group
Defined in:
MENU_GROUP_COMMAND_DELAYED
Parameters:
Wrapper.Group#GROUP Group
The Group owning the menu.
MenuText
The text for the menu.
ParentMenu
The parent menu.
CommandMenuFunction
A function that is called when the menu key is pressed.
CommandMenuArgument
An argument for the function.
...
Return value:
Refreshes a radio item for a group
Removes a menu structure for a group.
Defined in:
MENU_GROUP_COMMAND_DELAYED
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
#nil:
Refreshes a radio item for a group
Field(s)
Function(s)
Constructor
Defined in:
Parameters:
MenuText
ParentMenu
CommandMenuFunction
CommandMenuArguments
Return value:
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuArguments
Return value:
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuFunction
Return value:
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_GROUP_DELAYED constructor.
Creates a new radio menu item for a group.
Defined in:
MENU_GROUP_DELAYED
Parameters:
Wrapper.Group#GROUP Group
The Group owning the menu.
#string MenuText
The text for the menu.
#table ParentMenu
The parent menu.
Return value:
self
Refreshes a new radio item for a group and submenus
Removes the main menu and sub menus recursively of this MENU_GROUP.
Defined in:
MENU_GROUP_DELAYED
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
#nil:
Removes the sub menus recursively of this MENU_GROUP_DELAYED.
Defined in:
MENU_GROUP_DELAYED
Parameters:
MenuStamp
MenuTag
A Tag or Key to filter the menus to be refreshed with the Tag set.
Return value:
self
Refreshes a new radio item for a group and submenus
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_MISSION constructor.
Creates a new MENU_MISSION object and creates the menu for a complete mission file.
Defined in:
MENU_MISSION
Parameters:
#string MenuText
The text for the menu.
#table ParentMenu
The parent menu. This parameter can be ignored if you want the menu to be located at the parent menu of DCS world (under F10 other).
Return value:
Refreshes a radio item for a mission
Removes the main menu and the sub menus recursively of this MENU_MISSION.
Defined in:
MENU_MISSION
Parameters:
MenuStamp
MenuTag
Return value:
#nil:
Removes the sub menus recursively of this MENU_MISSION.
Note that the main menu is kept!
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event
Field(s)
Function(s)
MENU_MISSION constructor.
Creates a new radio command item for a complete mission file, which can invoke a function with parameters.
Defined in:
MENU_MISSION_COMMAND
Parameters:
#string MenuText
The text for the menu.
Core.Menu#MENU_MISSION ParentMenu
The parent menu.
CommandMenuFunction
A function that is called when the menu key is pressed.
CommandMenuArgument
An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.
...
Return value:
self
Refreshes a radio item for a mission
Removes a radio command item for a coalition
Defined in:
MENU_MISSION_COMMAND
Return value:
#nil:
Field(s)
Function(s)
Constructor
Defined in:
Parameters:
MenuText
ParentMenu
CommandMenuFunction
CommandMenuArguments
Return value:
This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuArguments
Return value:
This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!
Defined in:
Parameter:
CommandMenuFunction
Return value:
Field(s)
Function(s)
Gets a Menu from a parent Menu
Defined in:
Parameter:
#string MenuText
The text of the child menu.
Return value:
Gets a menu stamp for later prevention of menu removal.
Constructor
Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.
Defined in:
Parameter:
#boolean RemoveParent
If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.
Return value:
Sets a menu stamp for later prevention of menu removal.
Sets a tag for later selection of menu refresh.
Defined in:
Parameter:
#string MenuTag
A Tag or Key that will filter only menu items set with this key.
Return value:
Sets a time stamp for later prevention of menu removal.
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.
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.
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.
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 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 object is completely destroyed.
initiator : The unit that is was destroyed.
BDA.
Occurs when a ground unit captures either an airbase or a farp.
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.
initiator : The unit that was spawned.
Occurs when any aircraft crashes into the ground and is completely destroyed.
initiator : The unit that has crashed.
Occurs when an object is dead.
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.
Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
initiator : The unit that is stopping its engines..
Occurs when any aircraft starts its engines.
initiator : The unit that is starting its engines..
Occurs whenever an object is hit by a weapon.
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.
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.
- initiator: The unit that killed the target.
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship 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.
- 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.
Landing quality mark.
Occurs when a new mark was added.
MarkID: ID of the mark.
Occurs when a mark text was changed.
MarkID: ID of the mark.
Occurs when a mark was removed.
MarkID: ID of the mark.
Occurs when a mission ends.
Occurs when a mission starts.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
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. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
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.
initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
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.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. 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), auto cannons, and machine guns. 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 auto cannon based weapon, those are handled by EVENT.ShootingStart.
Occurs when an aircraft takes off from an airbase, farp, or ship.
initiator : The unit that took off. place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships.
Trigger zone.
Occurs when the game thinks an object is destroyed.
- 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:
#number:
The ScheduleID 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:
#number:
The ScheduleID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
Set the Class 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
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
TODO: Complete DCS#Event structure. - The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event