From be8c95fcfd69fa7239f309ba4a14fcd5d04cbc8a Mon Sep 17 00:00:00 2001
From: Applevangelist
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
The Defender Default Settings over all Squadrons.
+ + + +The Defender Default Settings over all Squadrons.
+ + + +The Defender Default Settings over all Squadrons.
+ + + +Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
The Defender Default Settings over all Squadrons.
+ + + +Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Set destination airbase for next :Route() command.
+ +Aircraft is on a depoly mission.
+Set destination airbase for next :Route() command.
+ +Aircraft is on a depoly mission.
+Set destination airbase for next :Route() command.
+ +Aircraft is on a depoly mission.
+Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Set destination airbase for next :Route() command.
+ +Aircraft is on a depoly mission.
+Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
This table contains the targets detected during patrol.
- @@ -6386,9 +6383,6 @@ Note that this method is required, as triggers the next route when patrolling fo - -This table contains the targets detected during patrol.
- @@ -7133,9 +7127,6 @@ Note that this method is required, as triggers the next route when patrolling fo - -This table contains the targets detected during patrol.
- @@ -7606,7 +7597,7 @@ Note that this method is required, as triggers the next route when patrolling foCurrent FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
This table contains the targets detected during patrol.
- diff --git a/Documentation/Actions.Account.html b/Documentation/Actions.Account.html index e89b46277..04580cb7b 100644 --- a/Documentation/Actions.Account.html +++ b/Documentation/Actions.Account.html @@ -4630,7 +4630,7 @@ There are 2 moments when state transition methods will be called by the state maCurrent FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
self.CargoObject:Destroy()
- -self.CargoObject:Destroy()
- -Set cargo object.
+Set cargo object.
+A Finite State Machine (FSM) models a process flow that transitions between various States through triggered Events.
A FSM can only be in one of a finite number of states. -The machine is in only one state at a time; the state it is in at any given time is called the current state. -It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. +The machine is in only one state at a time; the state it is in at any given time is called the current state. +It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.
-The FSM class supports a hierarchical implementation of a Finite State Machine, +
The FSM class supports a hierarchical implementation of a Finite State Machine, that is, it allows to embed existing FSM implementations in a master FSM. FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.
@@ -1531,7 +1531,7 @@ FSM hierarchies allow for efficient FSM re-use, not having to re-inventThe above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, orders him to destroy x targets and account the results. -Other examples of ready made FSM could be:
+Other examples of ready made FSM could be:The MOOSE framework uses extensively the FSM class and derived FSM_ classes, +
The MOOSE framework uses extensively the FSM class and derived FSM_ classes, because the goal of MOOSE is to simplify mission design complexity for mission building. By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. -Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, +Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, and tailored by mission designers through the implementation of Transition Handlers. Each of these FSM implementation classes start either with:
@@ -1556,7 +1556,7 @@ Each of these FSM implementation classes start either with:Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections.
-The FSM class development is based on a finite state machine implementation made by Conroy Kyle. The state machine can be found on github I've reworked this development (taken the concept), and created a hierarchical state machine out of it, embedded within the DCS simulator. @@ -1574,7 +1574,6 @@ Additionally, I've added extendability and created an API that allows seamless F
A FSM can only be in one of a finite number of states. -The machine is in only one state at a time; the state it is in at any given time is called the current state. -It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. +The machine is in only one state at a time; the state it is in at any given time is called the current state. +It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.
-The FSM class supports a hierarchical implementation of a Finite State Machine, +
The FSM class supports a hierarchical implementation of a Finite State Machine, that is, it allows to embed existing FSM implementations in a master FSM. FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.
@@ -1617,20 +1616,20 @@ FSM hierarchies allow for efficient FSM re-use, not having to re-inventThe above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, orders him to destroy x targets and account the results. -Other examples of ready made FSM could be:
+Other examples of ready made FSM could be:The MOOSE framework uses extensively the FSM class and derived FSM_ classes, +
The MOOSE framework uses extensively the FSM class and derived FSM_ classes, because the goal of MOOSE is to simplify mission design complexity for mission building. By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. -Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, +Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, and tailored by mission designers through the implementation of Transition Handlers. Each of these FSM implementation classes start either with:
@@ -1647,9 +1646,9 @@ The derived FSM_ classes extend the Finite State Machine functionality to run aFinite State Machines have Transition Rules, Transition Handlers and Event Triggers.
-The Transition Rules define the "Process Flow Boundaries", that is, +
The Transition Rules define the "Process Flow Boundaries", that is, the path that can be followed hopping from state to state upon triggered events. -If an event is triggered, and there is no valid path found for that event, +If an event is triggered, and there is no valid path found for that event, an error will be raised and the FSM will stop functioning.
The Transition Handlers are special methods that can be defined by the mission designer, following a defined syntax. @@ -1660,20 +1659,20 @@ The method can then define its own custom logic to implement the FSM workflow, a Most of the time, these Event Triggers are used within the Transition Handler methods, so that a workflow is created running through the state machine.
As explained above, a FSM supports Linear State Transitions and Hierarchical State Transitions, and both can be mixed to make a comprehensive FSM implementation. -The below documentation has a seperate chapter explaining both transition modes, taking into account the Transition Rules, Transition Handlers and Event Triggers.
+The below documentation has a separate chapter explaining both transition modes, taking into account the Transition Rules, Transition Handlers and Event Triggers.Linear Transitions are Transition Rules allowing an FSM to transition from one or multiple possible From state(s) towards a To state upon a Triggered Event. -The Lineair transition rule evaluation will always be done from the current state of the FSM. +The Linear transition rule evaluation will always be done from the current state of the FSM. If no valid Transition Rule can be found in the FSM, the FSM will log an error and stop.
The FSM has transition rules that it follows and validates, as it walks the process. +
The FSM has transition rules that it follows and validates, as it walks the process. These rules define when an FSM can transition from a specific state towards an other specific state upon a triggered event.
-The method FSM.AddTransition() specifies a new possible Transition Rule for the FSM.
+The method FSM.AddTransition() specifies a new possible Transition Rule for the FSM.
The initial state can be defined using the method FSM.SetStartState(). The default start state of an FSM is "None".
@@ -1705,7 +1704,7 @@ These rules define when an FSM can transition from a specific state towards an oThe below code snippet shows how the two last lines can be rewritten and consensed.
+The below code snippet shows how the two last lines can be rewritten and condensed.
FsmSwitch:AddTransition( { "On", "Middle" }, "SwitchOff", "Off" )
@@ -1714,8 +1713,8 @@ These rules define when an FSM can transition from a specific state towards an o
An FSM transitions in 4 moments when an Event is being triggered and processed.
-The mission designer can define for each moment specific logic within methods implementations following a defined API syntax.
+
An FSM transitions in 4 moments when an Event is being triggered and processed. +The mission designer can define for each moment specific logic within methods implementations following a defined API syntax. These methods define the flow of the FSM process; because in those methods the FSM Internal Events will be triggered.
The FSM creates for each Event two Event Trigger methods.
+
The FSM creates for each Event two Event Trigger methods. There are two modes how Events can be triggered, which is synchronous and asynchronous:
The destinction between these 2 Event Trigger methods are important to understand. An asynchronous call will "log" the Event Trigger to be executed at a later time. +
The distinction between these 2 Event Trigger methods are important to understand. An asynchronous call will "log" the Event Trigger to be executed at a later time. Processing will just continue. Synchronous Event Trigger methods are useful to change states of the FSM immediately, but may have a larger processing impact.
The following example provides a little demonstration on the difference between synchronous and asynchronous Event Triggering.
function FSM:OnAfterEvent( From, Event, To, Amount )
- self:T( { Amount = Amount } )
+ self:T( { Amount = Amount } )
end
local Amount = 1
- FSM:__Event( 5, Amount )
+ FSM:__Event( 5, Amount )
Amount = Amount + 1
FSM:Event( Text, Amount )
In this example, the :OnAfterEvent() Transition Handler implementation will get called when Event is being triggered. -Before we go into more detail, let's look at the last 4 lines of the example. +Before we go into more detail, let's look at the last 4 lines of the example. The last line triggers synchronously the Event, and passes Amount as a parameter. -The 3rd last line of the example triggers asynchronously Event. +The 3rd last line of the example triggers asynchronously Event. Event will be processed after 5 seconds, and Amount is given as a parameter.
The output of this little code fragment will be:
@@ -1823,7 +1822,7 @@ The next code implements this through the event handling method OnAfterSThe OnAfterSwitch implements a loop. The last line of the code fragment triggers the Switch Event within 5 seconds. Upon the event execution (after 5 seconds), the OnAfterSwitch method is called of FsmDemo (cfr. the double point notation!!! ":"). -The OnAfterSwitch method receives from the FSM the 3 transition parameter details ( From, Event, To ), +The OnAfterSwitch method receives from the FSM the 3 transition parameter details ( From, Event, To ), and one additional parameter that was given when the event was triggered, which is in this case the Unit that is used within OnSwitchAfter.
function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
@@ -1872,13 +1871,13 @@ And there is no transition handling method defined for that transition, thus, no
FSM Hierarchical Transitions
Hierarchical Transitions allow to re-use readily available and implemented FSMs.
-This becomes in very useful for mission building, where mission designers build complex processes and workflows,
+This becomes in very useful for mission building, where mission designers build complex processes and workflows,
combining smaller FSMs to one single FSM.
-The FSM can embed Sub-FSMs that will execute and return multiple possible Return (End) States.
+
The FSM can embed Sub-FSMs that will execute and return multiple possible Return (End) States.
Depending upon which state is returned, the main FSM can continue the flow triggering specific events.
-The method FSM.AddProcess() adds a new Sub-FSM to the FSM.
+The method FSM.AddProcess() adds a new Sub-FSM to the FSM.
@@ -5652,7 +5651,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
-
+ #string
FSM._StartState
@@ -6083,7 +6082,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
-Current FSM state.
+Current FSM state.
@@ -6412,7 +6411,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Goals are most of the time achieved by players. These player achievements can be registered as part of the goal achievement. Use GOAL.AddPlayerContribution() to add a player contribution to the goal. The player contributions are based on a points system, an internal counter per player. -So once the goal has been achieved, the player contributions can be queried using GOAL.GetPlayerContributions(), +So once the goal has been achieved, the player contributions can be queried using GOAL.GetPlayerContributions(), that retrieves all contributions done by the players. For one player, the contribution can be queried using GOAL.GetPlayerContribution(). The total amount of player contributions can be queried using GOAL.GetTotalContributions().
@@ -3387,7 +3387,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defauCurrent FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
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 scanerios where you need to +
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. +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.
+On top, MOOSE implements variable parameter passing for command menus.There are basically two different MENU class types that you need to use:
@@ -1547,12 +1547,12 @@ On top, MOOSE implements variable parameter passing for command-
+-
+
Defines the main MENU class where other MENU COMMAND_ +
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_ +
Defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.
@@ -1728,7 +1728,7 @@ Using this object reference, you can then remove ALL the menus and submenus unde -- 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 ) @@ -1983,7 +1983,7 @@ Using this object reference, you can then remove ALL the menus and submenus undeConsructor
+Constructor
Consructor
+Constructor
MENU_COALITION_COMMAND:SetCommandMenuFunction(CommandMenuFunction)
This sets the new command function of a menu, +
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!!!
@@ -3316,7 +3316,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
MENU_COMMAND_BASE:SetCommandMenuFunction(CommandMenuFunction)
This sets the new command function of a menu, +
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!!!
@@ -3969,7 +3969,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
Consructor
+Constructor
MENU_GROUP_COMMAND:SetCommandMenuFunction(CommandMenuFunction)
This sets the new command function of a menu, +
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!!!
@@ -5338,7 +5338,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
MENU_GROUP_COMMAND_DELAYED:SetCommandMenuFunction(CommandMenuFunction)
This sets the new command function of a menu, +
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!!!
@@ -6048,7 +6048,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
Consructor
+Constructor
Consructor
+Constructor
MENU_MISSION_COMMAND:SetCommandMenuFunction(CommandMenuFunction)
This sets the new command function of a menu, +
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!!!
@@ -8070,7 +8070,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
self:F( { RemoveParent } )
+self:F( { RemoveParent } )
@@ -8794,7 +8794,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defauConsructor
+Constructor
self:F( { RemoveParent } )
+self:F( { RemoveParent } )
The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).
+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).
Consructor
+Constructor
This sets the new command function of a menu, +
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!!!
@@ -16608,7 +16608,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
This sets the new command function of a menu, +
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!!!
@@ -20408,7 +20408,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
Consructor
+Constructor
This sets the new command function of a menu, +
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!!!
@@ -28414,7 +28414,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
This sets the new command function of a menu, +
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!!!
@@ -32578,7 +32578,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
Consructor
+Constructor
The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).
+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).
Consructor
+Constructor
This sets the new command function of a menu, +
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!!!
@@ -44376,7 +44376,7 @@ If the function changes, no new menu needs to be generated if the menu text is tConsructor
+Constructor
Sends a MESSAGE to a Coalition.
+Sends a MESSAGE to a Coalition.
Sends a MESSAGE to a Coalition if the given Condition is true.
+Sends a MESSAGE to a Coalition if the given Condition is true.
Sends a MESSAGE to a Group.
+Sends a MESSAGE to a Group.
Sends a MESSAGE to the Red Coalition.
+Sends a MESSAGE to the Red Coalition.
Clears all previous messages from the screen before the new message is displayed.
-Not that this must come before all functions starting with ToX(), e.g. ToAll(), ToGroup() etc.
+Not that this must come before all functions starting with ToX(), e.g. ToAll(), ToGroup() etc.
-- Create a series of new Messages.
--- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
--- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
--- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
--- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
+
+ -- Create a series of new Messages.
+ -- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
+ -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
+ -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
+ -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
+ MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
+ MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
+ MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
+ MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
+
@@ -2453,7 +2455,7 @@ MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25
Creates a new MESSAGE object of a certain type.
-Note that these MESSAGE objects are not yet displayed on the display panel. +
Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions ToClient or ToCoalition or ToAll to send these Messages to the respective recipients. The message display times are automatically defined based on the timing settings in the Settings menu.
@@ -2515,10 +2517,12 @@ The message display times are automatically defined based on the timing settings MessageAll = MESSAGE:NewType( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", MESSAGE.Type.Information )
+
+ MessageAll = MESSAGE:NewType( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", MESSAGE.Type.Information )
MessageRED = MESSAGE:NewType( "To the RED Players: You receive a penalty because you've killed one of your own units", MESSAGE.Type.Information )
MessageClient1 = MESSAGE:NewType( "Congratulations, you've just hit a target", MESSAGE.Type.Update )
- MessageClient2 = MESSAGE:NewType( "Congratulations, you've just killed a target", MESSAGE.Type.Update )
+ MessageClient2 = MESSAGE:NewType( "Congratulations, you've just killed a target", MESSAGE.Type.Update )
+
@@ -2565,13 +2569,15 @@ The message display times are automatically defined based on the timing settings
-- Send a message created to all players.
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
-or
-MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
-or
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
-MessageAll:ToAll()
+
+ -- Send a message created to all players.
+ MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
+ or
+ MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
+ or
+ MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
+ MessageAll:ToAll()
+
@@ -2645,13 +2651,15 @@ MessageAll:ToAll()
-- Send a message created with the @{New} method to the BLUE coalition.
-MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
-or
-MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
-or
-MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageBLUE:ToBlue()
+
+ -- Send a message created with the @{New} method to the BLUE coalition.
+ MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
+ or
+ MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
+ or
+ MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+ MessageBLUE:ToBlue()
+
@@ -2714,20 +2722,22 @@ MessageBLUE:ToBlue()
-- Send the 2 messages created with the @{New} method to the Client Group.
--- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
-ClientGroup = Group.getByName( "ClientGroup" )
+
+ -- Send the 2 messages created with the @{New} method to the Client Group.
+ -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
+ ClientGroup = Group.getByName( "ClientGroup" )
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-or
-MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-or
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
-MessageClient1:ToClient( ClientGroup )
-MessageClient2:ToClient( ClientGroup )
+ MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+ MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+ or
+ MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+ MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+ or
+ MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
+ MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
+ MessageClient1:ToClient( ClientGroup )
+ MessageClient2:ToClient( ClientGroup )
+
@@ -2740,7 +2750,7 @@ MessageClient2:ToClient( ClientGroup )
Sends a MESSAGE to a Coalition.
+Sends a MESSAGE to a Coalition.
-- Send a message created with the @{New} method to the RED coalition.
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
-or
-MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
-or
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageRED:ToCoalition( coalition.side.RED )
+
+ -- Send a message created with the @{New} method to the RED coalition.
+ MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
+ or
+ MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
+ or
+ MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+ MessageRED:ToCoalition( coalition.side.RED )
+
@@ -2806,7 +2818,7 @@ MessageRED:ToCoalition( coalition.side.RED )
Sends a MESSAGE to a Coalition if the given Condition is true.
+Sends a MESSAGE to a Coalition if the given Condition is true.
Sends the message only if the condition is true.
+Sends the message only if the condition is true.
Sends a MESSAGE to a Group.
+Sends a MESSAGE to a Group.
Sends a MESSAGE to the Red Coalition.
+Sends a MESSAGE to the Red Coalition.
-- Send a message created with the @{New} method to the RED coalition.
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
-or
-MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
-or
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageRED:ToRed()
+
+ -- Send a message created with the @{New} method to the RED coalition.
+ MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
+ or
+ MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
+ or
+ MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+ MessageRED:ToRed()
+
the y coordinate in meters.
- - - -the y coordinate in meters.
- - - -the y coordinate in meters.
- - - -Produces the text of the report, taking into account an optional delimeter, which is \n by default.
+Produces the text of the report, taking into account an optional delimiter, which is \n by default.
Produces the text of the report, taking into account an optional delimeter, which is \n by default.
+Produces the text of the report, taking into account an optional delimiter, which is \n by default.
The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected.
-Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
+
The non-persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collected when the parent object is destroyed, or set to nil and garbage collected. +Even when there are pending timer scheduled functions to be executed for the SCHEDULER object, these will not be executed anymore when the SCHEDULER object has been destroyed.
The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object. The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER. -The SCHEDULER object plans new scheduled functions through the Core.Scheduler#SCHEDULER.Schedule() method. +The SCHEDULER object plans new scheduled functions through the Core.Scheduler#SCHEDULER.Schedule() method. The Schedule() method returns the CallID that is the reference ID for each planned schedule.
Persistant schedulers.
+Persistent schedulers.
Shopw tracing info.
+Show tracing info.
Repeat time intervall in seconds.
+Repeat time interval in seconds.
Persistant schedulers.
+Persistent schedulers.
@@ -2331,7 +2331,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defauThe development of this method was really tidy. -It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified. +It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is set to nil. Nothing of this code should be modified without testing it thoroughly.
Radomization factor [0,1].
+Randomization factor [0,1].
Shopw tracing info.
+Show tracing info.
Persistant schedulers.
+Persistent schedulers.
Repeat time intervall in seconds.
+Repeat time interval in seconds.
SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
+SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is set to nil or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
ZoneObject = ZONE:New( "ZoneName" ) MasterObject = SCHEDULER:New( ZoneObject ) @@ -1658,13 +1658,13 @@ As a result, the MasterObject will cancel the planned schedule.
The above example creates a new MasterObject, and does schedule the first schedule as part of the call.
-Note that 2 variables are returned here: MasterObject, ScheduleID...
-Later in the logic, the repeating schedule with SchedulerID is stopped.
-A bit later, the repeating schedule with SchedulerId is (re)-started.
With the method SCHEDULER.Schedule() a new time event can be scheduled. +
With the method SCHEDULER.Schedule() a new time event can be scheduled. This method is used by the :New() constructor when a new schedule is planned.
Consider the following code fragment of the SCHEDULER object creation.
@@ -1673,14 +1673,14 @@ This method is used by the :New() constructor when a new schedule is planned. -Several parameters can be specified that influence the behaviour of a Schedule.
+Several parameters can be specified that influence the behavior of a Schedule.
SchedulerID = MasterObject:Schedule( ZoneObject, ScheduleFunction, {} )
-The above example schedules a new ScheduleFunction call to be executed asynchronously, within milleseconds ...
+The above example schedules a new ScheduleFunction call to be executed asynchronously, within milliseconds ...
SchedulerID = MasterObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60 )
-The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, +
The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, and repeating 60 every seconds ...
SchedulerID = MasterObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5 )
-The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, +
The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds,
and repeating 60 seconds, with a 50% time interval randomization ...
-So the repeating time interval will be randomized using the 0.5,
-and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat,
+So the repeating time interval will be randomized using the 0.5,
+and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat,
which is in this example between 30 and 90 seconds.
SchedulerID = MasterObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5, 300 )
-The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, +
The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds,
The schedule will repeat every 60 seconds.
-So the repeating time interval will be randomized using the 0.5,
-and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat,
+So the repeating time interval will be randomized using the 0.5,
+and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat,
which is in this example between 30 and 90 seconds.
The schedule will stop after 300 seconds.
Time interval in seconds after which the scheduler will be stoppe.
+Time interval in seconds after which the scheduler will be stopped.
Takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework.
+Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework.
Takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework.
+Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework.
The SETTINGS class takes care of various settings that influence the behaviour of certain functionalities and classes within the MOOSE framework. +
The SETTINGS class takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework. SETTINGS can work on 2 levels:
A menu is created automatically per Command Center that allows to modify the Default settings. So, when joining a CC unit, a menu will be available that allows to change the settings parameters FOR ALL THE PLAYERS! -Note that the Default settings will only be used when a player has not choosen its own settings.
+Note that the Default settings will only be used when a player has not chosen its own settings.Of course, it may be requried not to show any setting menus. In this case, a method is available on the _SETTINGS object. +
Of course, it may be required not to show any setting menus. In this case, a method is available on the _SETTINGS object. Use SETTINGS.SetPlayerMenuOff() to hide the player menus, and use SETTINGS.SetPlayerMenuOn() show the player menus. Note that when this method is used, any player already in a slot will not have its menus visibility changed. The option will only have effect when a player enters a new slot or changes a slot.
@@ -1611,8 +1611,8 @@ See below a comprehensive description of each.The settings can be changed by using the Default settings menu on the Command Center or the Player settings menu on the Player Slot.
Each Message Type has specific timings that will be applied when the message is displayed. -The Settings Menu will provide for each Message Type a selection of proposed durations from which can be choosen. +The Settings Menu will provide for each Message Type a selection of proposed durations from which can be chosen. So the player can choose its own amount of seconds how long a message should be displayed of a certain type. Note that Update messages can be chosen not to be displayed at all!
@@ -1728,7 +1728,7 @@ Note that Update messages can be chosen not to be displayed atThe threat level metric is scaled according the era of the battle. A target that is AAA, will pose a much greather threat in WWII than on modern warfare. +
The threat level metric is scaled according the era of the battle. A target that is AAA, will pose a much greater threat in WWII than on modern warfare. Therefore, there are 4 era that are defined within the settings:
Core - Spawn dynamically new groups of units in running missions.
-Each SPAWN object needs to be have related template groups setup in the Mission Editor (ME),
-which is a normal group with the Late Activation flag set.
-This template group will never be activated in your mission.
-SPAWN uses that template group to reference to all the characteristics
-(air, ground, livery, unit composition, formation, skill level etc) of each new group to be spawned.
Therefore, when creating a SPAWN object, the SPAWN.New and SPAWN.NewWithAlias require -the name of the template group to be given as a string to those constructor methods.
+the name of the template group to be given as a string to those constructor methods. -Initialization settings can be applied on the SPAWN object, -which modify the behaviour or the way groups are spawned. +
Initialization settings can be applied on the SPAWN object, +which modify the behavior or the way groups are spawned. These initialization methods have the prefix Init. There are also spawn methods with the prefix Spawn and will spawn new groups in various ways.
Because SPAWN can spawn multiple groups of a template group, -SPAWN has an internal index that keeps track -which was the latest group that was spawned.
+Because SPAWN can spawn multiple groups of a template group, +SPAWN has an internal index that keeps track +which was the latest group that was spawned.
-Limits can be set on how many groups can be spawn in each SPAWN object, +
Limits can be set on how many groups can be spawn in each SPAWN object, using the method SPAWN.InitLimit. SPAWN has 2 kind of limits:
When new groups get spawned using the Spawn methods, +
When new groups get spawned using the Spawn methods, it will be evaluated whether any limits have been reached. -When no spawn limit is reached, a new group will be created by the spawning methods, -and the internal index will be increased with 1.
+When no spawn limit is reached, a new group will be created by the spawning methods, +and the internal index will be increased with 1. -These limits ensure that your mission does not accidentally get flooded with spawned groups.
-Additionally, it also guarantees that independent of the group composition,
+
These limits ensure that your mission does not accidentally get flooded with spawned groups. +Additionally, it also guarantees that independent of the group composition, at any time, the most optimal amount of groups are alive in your mission. For example, if your template group has a group composition of 10 units, and you specify a limit of 100 units alive at the same time, with unlimited resources = :InitLimit( 100, 0 ) and 10 groups are alive, but two groups have only one unit alive in the group, @@ -1604,37 +1605,37 @@ then a sequent Spawn(Scheduled) will allow a new group to be spawned!!!
Spawned groups get the same name as the name of the template group.
-Spawned units in those groups keep by default the same name as the name of the template group.
-However, because multiple groups and units are created from the template group,
+
Spawned groups get the same name as the name of the template group. +Spawned units in those groups keep by default the same name as the name of the template group. +However, because multiple groups and units are created from the template group, a suffix is added to each spawned group and unit.
Newly spawned groups will get the following naming structure at run-time:
That being said, there is a way to keep the same unit names!
+
That being said, there is a way to keep the same unit names! The method SPAWN.InitKeepUnitNames() will keep the same unit names as defined within the template group, thus:
Some additional notes that need to be considered!!:
A spawn object will behave differently based on the usage of initialization methods, which all start with the Init prefix:
+A spawn object will behave differently based on the usage of initialization methods, which all start with the Init prefix:
Groups can be spawned at different times and methods:
@@ -1740,20 +1740,19 @@ So in principle, the group list will contain all parameters and configurations aNote that SPAWN.Spawn and SPAWN.ReSpawn return a Wrapper.Group#GROUP.New object, that contains a reference to the DCSGroup object. +
Note that SPAWN.Spawn and SPAWN.ReSpawn return a Wrapper.Group#GROUP.New object, that contains a reference to the DCSGroup object. You can use the GROUP object to do further actions with the DCSGroup.
The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. @@ -1771,24 +1770,24 @@ The method SPAWN.GetGroupFromIndex() w
Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, +
Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damaged stop their activities, while remaining alive. +In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, and it may occur that no new groups are or can be spawned as limits are reached. To prevent this, a SPAWN.InitCleanUp() initialization method has been defined that will silently monitor the status of each spawned group. -Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. -There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... -In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. -This models AI that has succesfully returned to their airbase, to restart their combat activities. +Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. +There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... +In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. +This models AI that has successfully returned to their airbase, to restart their combat activities. Check the SPAWN.InitCleanUp() for further info.
When using the SPAWN.SpawnScheduleds are created following the spawn time interval parameters. When a new Wrapper.Group is spawned, you maybe want to execute actions with that group spawned at the spawn event. -The SPAWN class supports this functionality through the method SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ), -which takes a function as a parameter that you can define locally. +The SPAWN class supports this functionality through the method SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ), +which takes a function as a parameter that you can define locally. Whenever a new Wrapper.Group is spawned, the given function is called, and the Wrapper.Group that was just spawned, is given as a parameter. -As a result, your spawn event handling function requires one parameter to be declared, which will contain the spawned Wrapper.Group object. +As a result, your spawn event handling function requires one parameter to be declared, which will contain the spawned Wrapper.Group object. A coding example is provided at the description of the SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ) method.
Turns the AI On or Off for the Wrapper.Group when spawning.
SPAWN:InitAirbase(AirbaseName, Takeoff, TerminalTyple, TerminalType)
Set spawns to happen at a particular airbase.
SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)
Makes the groups visible before start (like a batallion).
+Makes the groups visible before start (like a battalion).
Sets the radio comms on or off.
+Sets the radio communication on or off.
For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
+For planes and helicopters, when these groups go home and land on their home airbases and FARPs, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
SPAWN:ParkAircraft(SpawnAirbase, TerminalType, Parkingdata, SpawnIndex)
Will park a group at an Wrapper.Airbase.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)
The AI is on by default when spawning a group.
-self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
+self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
@@ -3658,28 +3642,6 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau - - - -When the first Spawn executes, all the Groups need to be made visible before start.
+Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
@@ -3957,28 +3919,6 @@ When Moose is loaded statically, (as one file), tracing is switched off by defauWhen working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.
- - - --- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
- -- Do actions with the GroupPlane object.
- GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
+
+ -- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+ while GroupPlane ~= nil do
+ -- Do actions with the GroupPlane object.
+ GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+ end
+
@@ -4154,11 +4096,13 @@ If no index is given, it will return the first group in the list.
-- Find the last alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
-if GroupPlane then -- GroupPlane can be nil!!!
- -- Do actions with the GroupPlane object.
-end
+
+ -- Find the last alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
+ if GroupPlane then -- GroupPlane can be nil!!!
+ -- Do actions with the GroupPlane object.
+ end
+
@@ -4213,12 +4157,14 @@ end
-- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
- -- Do actions with the GroupPlane object.
- GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
+
+ -- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+ while GroupPlane ~= nil do
+ -- Do actions with the GroupPlane object.
+ GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+ end
+
@@ -4324,7 +4270,7 @@ end
Turns the AI On or Off for the Wrapper.Group when spawning.
+ #boolean AIOnOff
A value of true sets the AI On, a value of false sets the AI Off.
+The SPAWN object
+ +Set spawns to happen at a particular airbase.
@@ -4396,7 +4356,7 @@ end#number - TerminalTyple + TerminalType
- TerminalType -
-Makes the groups visible before start (like a batallion).
+Makes the groups visible before start (like a battalion).
The method will take the position of the group as the first position in the array. @@ -4514,12 +4464,12 @@ CAUTION: this directive will NOT work with OnSpawnGroup function.
-- Define an array of Groups.
-Spawn_BE_Ground = SPAWN
- :New( 'BE Ground' )
- :InitLimit( 2, 24 )
- :InitArray( 90, 10, 100, 50 )
-
+
+ -- Define an array of Groups.
+ Spawn_BE_Ground = SPAWN:New( 'BE Ground' )
+ :InitLimit( 2, 24 )
+ :InitArray( 90, 10, 100, 50 )
+
@@ -4613,7 +4563,8 @@ When groups are still alive and have become inactive due to damage and are unabl
-Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
+ Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
+
@@ -4650,8 +4601,8 @@ Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters e
Coalition of the group as number of enumerator:
Sets the country of the spawn group.
-Note that the country determins the coalition of the group depending on which country is defined to be on which side for each specific mission!
+Note that the country determines the coalition of the group depending on which country is defined to be on which side for each specific mission!
mySpawner = SPAWN:New( ... )
--- Spawn the Group with the formation rotated +100 degrees around unit #1, compared to the mission template.
-mySpawner:InitGroupHeading( 100 )
+ -- Spawn the Group with the formation rotated +100 degrees around unit #1, compared to the mission template.
+ mySpawner:InitGroupHeading( 100 )
-Spawn the Group with the formation rotated units between +100 and +150 degrees around unit #1, compared to the mission template, and with individual units varying by +/- 10 degrees from their templated facing.
-mySpawner:InitGroupHeading( 100, 150, 10 )
+ -- Spawn the Group with the formation rotated units between +100 and +150 degrees around unit #1, compared to the mission template, and with individual units varying by +/- 10 degrees from their templated facing.
+ mySpawner:InitGroupHeading( 100, 150, 10 )
-Spawn the Group with the formation rotated -60 degrees around unit #1, compared to the mission template, but with all units facing due north regardless of how they were laid out in the template.
-mySpawner:InitGroupHeading(-60):InitHeading(0)
- or
-mySpawner:InitHeading(0):InitGroupHeading(-60)
+ -- Spawn the Group with the formation rotated -60 degrees around unit #1, compared to the mission template, but with all units facing due north regardless of how they were laid out in the template.
+ mySpawner:InitGroupHeading(-60):InitHeading(0)
+ -- or
+ mySpawner:InitHeading(0):InitGroupHeading(-60)
@@ -4933,7 +4884,7 @@ mySpawner:InitHeading(0):InitGroupHeading(-60)
Indicates the maximum amount of units in the group.
+Indicates the maximum amount of units in the group.
-Spawn = SPAWN:New( ... )
+ Spawn = SPAWN:New( ... )
--- Spawn the units pointing to 100 degrees.
-Spawn:InitHeading( 100 )
+ -- Spawn the units pointing to 100 degrees.
+ Spawn:InitHeading( 100 )
--- Spawn the units pointing between 100 and 150 degrees.
-Spawn:InitHeading( 100, 150 )
+ -- Spawn the units pointing between 100 and 150 degrees.
+ Spawn:InitHeading( 100, 150 )
@@ -5148,7 +5099,7 @@ When a SPAWN.New is executed and the limit of the am
The maximum amount of units that can be alive at runtime.
+The maximum amount of units that can be alive at runtime.
The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. -This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. +
The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. +This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. This parameter accepts the value 0, which defines that there are no maximum group limits, but there are limits on the maximum of units that can be alive at the same time.
-- NATO helicopters engaging in the battle field.
--- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
--- There will be maximum 24 groups spawned during the whole mission lifetime.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
+ -- There will be maximum 24 groups spawned during the whole mission lifetime.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
+
@@ -5213,7 +5166,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
Livery name. Note that this is not necessarily the same name as displayed in the mission edior.
+Livery name. Note that this is not necessarily the same name as displayed in the mission editor.
Sets the radio comms on or off.
+Sets the radio communication on or off.
Same as checking/unchecking the COMM box in the mission editor.
@@ -5307,7 +5260,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )If true (or nil), enables the radio comms. If false, disables the radio for the spawned group.
+If true (or nil), enables the radio communication. If false, disables the radio for the spawned group.
If true, SPAWN will perform the randomization of the Wrapper.Groups position between a given outer and inner radius.
+If true, SPAWN will perform the randomization of the Wrapper.Groups position between a given outer and inner radius.
Randomizes the defined route of the SpawnTemplatePrefix group in the ME.
-This is very useful to define extra variation of the behaviour of groups.
+This is very useful to define extra variation of the behavior of groups.
is the waypoint where the randomization begins. +
is the waypoint where the randomization begins. Note that the StartPoint = 0 equaling the point where the group is spawned.
is the waypoint where the randomization ends counting backwards. +
is the waypoint where the randomization ends counting backwards. This parameter is useful to avoid randomization to end at a waypoint earlier than the last waypoint on the route.
-- NATO helicopters engaging in the battle field.
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
+ -- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+ -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
@@ -5593,7 +5548,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
But I'll try to explain. -This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -5613,7 +5568,7 @@ In other words, this method randomizes between a defined set of groups the templA table with the names of the groups defined within the mission editor, from which one will be choosen when a new group will be spawned.
+A table with the names of the groups defined within the mission editor, from which one will be chosen when a new group will be spawned.
-- NATO Tank Platoons invading Gori.
--- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5',
- 'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10',
- 'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+
+ -- NATO Tank Platoons invading Gori.
+ -- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
+ Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5',
+ 'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10',
+ 'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
@@ -5655,7 +5611,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
Randomize templates to be used as the unit representatives for the Spawned group, defined by specifying the prefix names.
-This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +
This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -5691,17 +5647,19 @@ In other words, this method randomizes between a defined set of groups the templ-- NATO Tank Platoons invading Gori.
+
+ -- NATO Tank Platoons invading Gori.
--- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
+ -- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+
@@ -5717,7 +5675,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
Randomize templates to be used as the unit representatives for the Spawned group, defined using a SET_GROUP object.
-This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +
This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -5737,7 +5695,7 @@ In other words, this method randomizes between a defined set of groups the templA SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.
+A SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.
-- NATO Tank Platoons invading Gori.
+
+ -- NATO Tank Platoons invading Gori.
--- Choose between different 'US Tank Platoon Template' configurations to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
+ -- Choose between different 'US Tank Platoon Template' configurations to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
+ Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
---- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ -- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+
@@ -5797,7 +5757,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.
+If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.
-- NATO helicopters engaging in the battle field.
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
+ -- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+ -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
@@ -5874,7 +5836,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects.
+A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects.
-- Create a zone table of the 2 zones.
- ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
-
- Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
- :InitLimit( 10, 10 )
- :InitRandomizeRoute( 1, 1, 200 )
- :InitRandomizeZones( ZoneTable )
- :SpawnScheduled( 5, .5 )
-
+
+ -- Create a zone table of the 2 zones.
+ ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
+
+ Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
+ :InitLimit( 10, 10 )
+ :InitRandomizeRoute( 1, 1, 200 )
+ :InitRandomizeZones( ZoneTable )
+ :SpawnScheduled( 5, .5 )
+
@@ -5911,12 +5874,12 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
+For planes and helicopters, when these groups go home and land on their home airbases and FARPs, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
-This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. +
This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. This will enable a spawned group to be re-spawned after it lands, until it is destroyed... -Note: When the group is respawned, it will re-spawn from the original airbase where it took off. +Note: When the group is respawned, it will re-spawn from the original airbase where it took off. So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :Schedule( 2, 3, 1800, 0.4 )
- :SpawnUncontrolled()
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnEngineShutDown()
-
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :Schedule( 2, 3, 1800, 0.4 )
+ :SpawnUncontrolled()
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnEngineShutDown()
+
@@ -5978,14 +5941,14 @@ SpawnRU_SU34 = SPAWN
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :SpawnUncontrolled()
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnEngineShutDown()
- :Spawn()
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :SpawnUncontrolled()
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnEngineShutDown()
+ :Spawn()
@@ -6018,13 +5981,14 @@ SpawnRU_SU34 = SPAWN
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnLanding()
- :Spawn()
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnLanding()
+ :Spawn()
+
@@ -6245,8 +6209,9 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )
-- Create a new SPAWN object based on a Group Template defined from scratch.
Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )
--- Create a new CSAR_Spawn object based on a normal Group Template to spawn a soldier.
-local CSAR_Spawn = SPAWN:NewWithFromTemplate( Template, "CSAR", "Pilot" ) -- Declare SpawnObject and call a function when a new Group is spawned.
- local SpawnObject = SPAWN
- :New( "SpawnObject" )
- :InitLimit( 2, 10 )
- :OnSpawnGroup(
- function( SpawnGroup )
- SpawnGroup:E( "I am spawned" )
- end
- )
- :SpawnScheduled( 300, 0.3 )
-
+
+ -- Declare SpawnObject and call a function when a new Group is spawned.
+ local SpawnObject = SPAWN:New( "SpawnObject" )
+ :InitLimit( 2, 10 )
+ :OnSpawnGroup( function( SpawnGroup )
+ SpawnGroup:E( "I am spawned" )
+ end
+ )
+ :SpawnScheduled( 300, 0.3 )
+
@@ -6409,6 +6373,7 @@ The first parameter of the SpawnFunction is the Wrapper.Airbase.
+
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. +
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. The known AIRBASE objects are automatically imported at mission start by MOOSE. Therefore, there isn't any New() constructor defined for AIRBASE objects.
@@ -6573,13 +6538,13 @@ You need to provide the exact name of the airbase as the parame Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ) )
-
+
Spawn_Heli = SPAWN:New( "Heli")
-
+
Spawn_Heli:ParkAtAirbase( AIRBASE:FindByName( "FARP Cold" ) )
-
+
Spawn_Heli:ParkAtAirbase( AIRBASE:FindByName( "Carrier" ) )
-
+
Spawn_Plane:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), AIRBASE.TerminalType.OpenBig )
@@ -6733,16 +6698,16 @@ You can use the returned group to further define the route to be followed.
You can use the following enumerations to search for the pre-defined airbases on the current known maps of DCS:
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. +
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. The known AIRBASE objects are automatically imported at mission start by MOOSE. Therefore, there isn't any New() constructor defined for AIRBASE objects.
-Ships and Farps are added within the mission, and are therefore not known. +
Ships and FARPs are added within the mission, and are therefore not known. For these AIRBASE objects, there isn't an Wrapper.Airbase#AIRBASE enumeration defined. You need to provide the exact name of the airbase as the parameter to the Wrapper.Airbase#AIRBASE.FindByName() method!
@@ -6828,7 +6793,7 @@ You need to provide the exact name of the airbase as the parame(optional) Table holding the coordinates and terminal ids for all units of the group. Spawning will be forced to happen at exactily these spots!
+(optional) Table holding the coordinates and terminal ids for all units of the group. Spawning will be forced to happen at exactly these spots!
Spawn_Plane = SPAWN:New( "Plane" )
+
+ Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Hot )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Runway )
-
+
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
-
+
Spawn_Heli = SPAWN:New( "Heli")
-
+
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Cold" ), SPAWN.Takeoff.Cold )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Hot" ), SPAWN.Takeoff.Hot )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Runway" ), SPAWN.Takeoff.Runway )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Air" ), SPAWN.Takeoff.Air )
-
+
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
-
+
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold, nil, AIRBASE.TerminalType.OpenBig )
@@ -6874,7 +6840,7 @@ You need to provide the exact name of the airbase as the parame
SPAWN:SpawnAtParkingSpot(Airbase, Spots, Takeoff)
-Spawn a group on an Wrapper.Airbase at a specific parking spot.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
@@ -7104,10 +7070,10 @@ You can use the returned group to further define the route to be followed.
local SpawnPointVec2 = ZONE:New( ZoneName ):GetPointVec2()
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2 )
-
+ SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2 )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2, 2000, 4000 )
+ SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2, 2000, 4000 )
@@ -7185,8 +7151,8 @@ You can use the returned group to further define the route to be followed.
local SpawnPointVec3 = ZONE:New( ZoneName ):GetPointVec3( 2000 ) -- Get the center of the ZONE object at 2000 meters from the ground.
-- Spawn at the zone center position at 2000 meters from the ground!
- SpawnAirplanes:SpawnFromPointVec3( SpawnPointVec3 )
-
+ SpawnAirplanes:SpawnFromPointVec3( SpawnPointVec3 )
+
@@ -7288,10 +7254,10 @@ You can use the returned group to further define the route to be followed.
local SpawnStatic = STATIC:FindByName( StaticName )
-- Spawn from the static position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromStatic( SpawnStatic )
-
+ SpawnAirplanes:SpawnFromStatic( SpawnStatic )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )
+ SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )
@@ -7395,10 +7361,10 @@ You can use the returned group to further define the route to be followed.
local SpawnStatic = STATIC:FindByName( StaticName )
-- Spawn from the static position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromUnit( SpawnStatic )
-
+ SpawnAirplanes:SpawnFromUnit( SpawnStatic )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )
+ SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )
@@ -7502,10 +7468,10 @@ You can use the returned group to further define the route to be followed.
local SpawnVec2 = ZONE:New( ZoneName ):GetVec2()
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromVec2( SpawnVec2 )
-
+ SpawnAirplanes:SpawnFromVec2( SpawnVec2 )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )
+ SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )
@@ -7736,20 +7702,20 @@ The first waypoint (where the group is spawned) is replaced wit
local SpawnZone = ZONE:New( ZoneName )
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnInZone( SpawnZone )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone )
+
-- Spawn in the zone at a random position at the height specified in the Me of the group template.
- SpawnAirplanes:SpawnInZone( SpawnZone, true )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, true )
+
-- Spawn in the zone at a random position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )
+ SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )
-- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )
+
-- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )
+
@@ -7860,7 +7826,7 @@ The first waypoint (where the group is spawned) is replaced wit
The variation to be applied on the defined time interval between each new spawn. -The variation is a number between 0 and 1, representing the %-tage of variation to be applied on the time interval.
+The variation is a number between 0 and 1, representing the % of variation to be applied on the time interval.-- NATO helicopters engaging in the battle field.
-- The time interval is set to SPAWN new helicopters between each 600 seconds, with a time variation of 50%.
--- The time variation in this case will be between 450 seconds and 750 seconds.
--- This is calculated as follows:
--- Low limit: 600 * ( 1 - 0.5 / 2 ) = 450
+-- The time variation in this case will be between 450 seconds and 750 seconds.
+-- This is calculated as follows:
+-- Low limit: 600 * ( 1 - 0.5 / 2 ) = 450
-- High limit: 600 * ( 1 + 0.5 / 2 ) = 750
--- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters.
+-- Between these two values, a random amount of seconds will be chosen for each new spawn of the helicopters.
Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):SpawnScheduled( 600, 0.5 )
@@ -8729,14 +8695,11 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.
The AI is on by default when spawning a group.
-self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
@@ -9088,28 +9051,6 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups. - - -Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
@@ -9387,28 +9328,6 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups. When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts. - - - -Spawns a new static using a given template.
-Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
switch alarm state RED
- @@ -7010,9 +7007,6 @@ E.g. `mymantis:SetAdvancedMode(true, 90)` - -switch alarm state RED
- diff --git a/Documentation/Functional.Range.html b/Documentation/Functional.Range.html index 6a1a223cc..7b0ee9554 100644 --- a/Documentation/Functional.Range.html +++ b/Documentation/Functional.Range.html @@ -10223,7 +10223,7 @@ If a zone is not explicitly specified, the range zone is determined by its locatCurrent FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Type of terminal to be used when spawning at an airbase.
-Turns the AI On or Off for the Wrapper.Group when spawning.
RAT:InitAirbase(AirbaseName, Takeoff, TerminalTyple, TerminalType)
Set spawns to happen at a particular airbase.
RAT:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)
Makes the groups visible before start (like a batallion).
+Makes the groups visible before start (like a battalion).
Sets the radio comms on or off.
+Sets the radio communication on or off.
For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
+For planes and helicopters, when these groups go home and land on their home airbases and FARPs, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
RAT:ParkAircraft(SpawnAirbase, TerminalType, Parkingdata, SpawnIndex)
Will park a group at an Wrapper.Airbase.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
RAT:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)
Type of terminal to be used when spawning at an airbase.
- - - -Type of terminal to be used when spawning at an airbase.
- - - --- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
- -- Do actions with the GroupPlane object.
- GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
+
+ -- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+ while GroupPlane ~= nil do
+ -- Do actions with the GroupPlane object.
+ GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+ end
+
@@ -14843,11 +14806,13 @@ If no index is given, it will return the first group in the list.
-- Find the last alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
-if GroupPlane then -- GroupPlane can be nil!!!
- -- Do actions with the GroupPlane object.
-end
+
+ -- Find the last alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
+ if GroupPlane then -- GroupPlane can be nil!!!
+ -- Do actions with the GroupPlane object.
+ end
+
@@ -14902,12 +14867,14 @@ end
-- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
- -- Do actions with the GroupPlane object.
- GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
+
+ -- Find the first alive @{Wrapper.Group} object of the SpawnPlanes SPAWN object @{Wrapper.Group} collection that it has spawned during the mission.
+ local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+ while GroupPlane ~= nil do
+ -- Do actions with the GroupPlane object.
+ GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+ end
+
@@ -15013,7 +14980,7 @@ end
Turns the AI On or Off for the Wrapper.Group when spawning.
+ #boolean AIOnOff
A value of true sets the AI On, a value of false sets the AI Off.
+The SPAWN object
+ +Set spawns to happen at a particular airbase.
@@ -15085,7 +15066,7 @@ end#number - TerminalTyple + TerminalType
- TerminalType -
-Makes the groups visible before start (like a batallion).
+Makes the groups visible before start (like a battalion).
The method will take the position of the group as the first position in the array. @@ -15203,12 +15174,12 @@ CAUTION: this directive will NOT work with OnSpawnGroup function.
-- Define an array of Groups.
-Spawn_BE_Ground = SPAWN
- :New( 'BE Ground' )
- :InitLimit( 2, 24 )
- :InitArray( 90, 10, 100, 50 )
-
+
+ -- Define an array of Groups.
+ Spawn_BE_Ground = SPAWN:New( 'BE Ground' )
+ :InitLimit( 2, 24 )
+ :InitArray( 90, 10, 100, 50 )
+
@@ -15302,7 +15273,8 @@ When groups are still alive and have become inactive due to damage and are unabl
-Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
+ Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
+
@@ -15339,8 +15311,8 @@ Spawn_Helicopter:InitCleanUp( 20 ) -- CleanUp the spawning of the helicopters e
Coalition of the group as number of enumerator:
Sets the country of the spawn group.
-Note that the country determins the coalition of the group depending on which country is defined to be on which side for each specific mission!
+Note that the country determines the coalition of the group depending on which country is defined to be on which side for each specific mission!
mySpawner = SPAWN:New( ... )
--- Spawn the Group with the formation rotated +100 degrees around unit #1, compared to the mission template.
-mySpawner:InitGroupHeading( 100 )
+ -- Spawn the Group with the formation rotated +100 degrees around unit #1, compared to the mission template.
+ mySpawner:InitGroupHeading( 100 )
-Spawn the Group with the formation rotated units between +100 and +150 degrees around unit #1, compared to the mission template, and with individual units varying by +/- 10 degrees from their templated facing.
-mySpawner:InitGroupHeading( 100, 150, 10 )
+ -- Spawn the Group with the formation rotated units between +100 and +150 degrees around unit #1, compared to the mission template, and with individual units varying by +/- 10 degrees from their templated facing.
+ mySpawner:InitGroupHeading( 100, 150, 10 )
-Spawn the Group with the formation rotated -60 degrees around unit #1, compared to the mission template, but with all units facing due north regardless of how they were laid out in the template.
-mySpawner:InitGroupHeading(-60):InitHeading(0)
- or
-mySpawner:InitHeading(0):InitGroupHeading(-60)
+ -- Spawn the Group with the formation rotated -60 degrees around unit #1, compared to the mission template, but with all units facing due north regardless of how they were laid out in the template.
+ mySpawner:InitGroupHeading(-60):InitHeading(0)
+ -- or
+ mySpawner:InitHeading(0):InitGroupHeading(-60)
@@ -15622,7 +15594,7 @@ mySpawner:InitHeading(0):InitGroupHeading(-60)
Indicates the maximum amount of units in the group.
+Indicates the maximum amount of units in the group.
-Spawn = SPAWN:New( ... )
+ Spawn = SPAWN:New( ... )
--- Spawn the units pointing to 100 degrees.
-Spawn:InitHeading( 100 )
+ -- Spawn the units pointing to 100 degrees.
+ Spawn:InitHeading( 100 )
--- Spawn the units pointing between 100 and 150 degrees.
-Spawn:InitHeading( 100, 150 )
+ -- Spawn the units pointing between 100 and 150 degrees.
+ Spawn:InitHeading( 100, 150 )
@@ -15837,7 +15809,7 @@ When a SPAWN.New is executed and the limit of the am
The maximum amount of units that can be alive at runtime.
+The maximum amount of units that can be alive at runtime.
The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. -This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. +
The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. +This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. This parameter accepts the value 0, which defines that there are no maximum group limits, but there are limits on the maximum of units that can be alive at the same time.
-- NATO helicopters engaging in the battle field.
--- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
--- There will be maximum 24 groups spawned during the whole mission lifetime.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
+ -- There will be maximum 24 groups spawned during the whole mission lifetime.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
+
@@ -15902,7 +15876,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
Livery name. Note that this is not necessarily the same name as displayed in the mission edior.
+Livery name. Note that this is not necessarily the same name as displayed in the mission editor.
Sets the radio comms on or off.
+Sets the radio communication on or off.
Same as checking/unchecking the COMM box in the mission editor.
@@ -15996,7 +15970,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )If true (or nil), enables the radio comms. If false, disables the radio for the spawned group.
+If true (or nil), enables the radio communication. If false, disables the radio for the spawned group.
If true, SPAWN will perform the randomization of the Wrapper.Groups position between a given outer and inner radius.
+If true, SPAWN will perform the randomization of the Wrapper.Groups position between a given outer and inner radius.
Randomizes the defined route of the SpawnTemplatePrefix group in the ME.
-This is very useful to define extra variation of the behaviour of groups.
+This is very useful to define extra variation of the behavior of groups.
is the waypoint where the randomization begins. +
is the waypoint where the randomization begins. Note that the StartPoint = 0 equaling the point where the group is spawned.
is the waypoint where the randomization ends counting backwards. +
is the waypoint where the randomization ends counting backwards. This parameter is useful to avoid randomization to end at a waypoint earlier than the last waypoint on the route.
-- NATO helicopters engaging in the battle field.
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
+ -- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+ -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
@@ -16282,7 +16258,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
But I'll try to explain. -This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -16302,7 +16278,7 @@ In other words, this method randomizes between a defined set of groups the templA table with the names of the groups defined within the mission editor, from which one will be choosen when a new group will be spawned.
+A table with the names of the groups defined within the mission editor, from which one will be chosen when a new group will be spawned.
-- NATO Tank Platoons invading Gori.
--- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5',
- 'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10',
- 'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+
+ -- NATO Tank Platoons invading Gori.
+ -- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
+ Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5',
+ 'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10',
+ 'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
@@ -16344,7 +16321,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
Randomize templates to be used as the unit representatives for the Spawned group, defined by specifying the prefix names.
-This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +
This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -16380,17 +16357,19 @@ In other words, this method randomizes between a defined set of groups the templ-- NATO Tank Platoons invading Gori.
+
+ -- NATO Tank Platoons invading Gori.
--- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
+ -- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
+
@@ -16406,7 +16385,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
Randomize templates to be used as the unit representatives for the Spawned group, defined using a SET_GROUP object.
-This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +
This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, but they will all follow the same Template route and have the same prefix name. In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.
@@ -16426,7 +16405,7 @@ In other words, this method randomizes between a defined set of groups the templA SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.
+A SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.
-- NATO Tank Platoons invading Gori.
+
+ -- NATO Tank Platoons invading Gori.
--- Choose between different 'US Tank Platoon Template' configurations to be spawned for the
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
+ -- Choose between different 'US Tank Platoon Template' configurations to be spawned for the
+ -- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
--- with a limit set of maximum 12 Units alive simulteneously and 150 Groups to be spawned during the whole mission.
+ -- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and
+ -- with a limit set of maximum 12 Units alive simultaneously and 150 Groups to be spawned during the whole mission.
-Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
+ Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
---- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ -- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
+ Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):SpawnScheduled( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
+
@@ -16486,7 +16467,7 @@ Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150
If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.
+If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.
-- NATO helicopters engaging in the battle field.
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
+ -- NATO helicopters engaging in the battle field.
+ -- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP).
+ -- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+ -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+
@@ -16563,7 +16546,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects.
+A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects.
-- Create a zone table of the 2 zones.
- ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
-
- Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
- :InitLimit( 10, 10 )
- :InitRandomizeRoute( 1, 1, 200 )
- :InitRandomizeZones( ZoneTable )
- :SpawnScheduled( 5, .5 )
-
+
+ -- Create a zone table of the 2 zones.
+ ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
+
+ Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
+ :InitLimit( 10, 10 )
+ :InitRandomizeRoute( 1, 1, 200 )
+ :InitRandomizeZones( ZoneTable )
+ :SpawnScheduled( 5, .5 )
+
@@ -16600,12 +16584,12 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute(
For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
+For planes and helicopters, when these groups go home and land on their home airbases and FARPs, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
-This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. +
This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. This will enable a spawned group to be re-spawned after it lands, until it is destroyed... -Note: When the group is respawned, it will re-spawn from the original airbase where it took off. +Note: When the group is respawned, it will re-spawn from the original airbase where it took off. So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :Schedule( 2, 3, 1800, 0.4 )
- :SpawnUncontrolled()
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnEngineShutDown()
-
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :Schedule( 2, 3, 1800, 0.4 )
+ :SpawnUncontrolled()
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnEngineShutDown()
+
@@ -16667,14 +16651,14 @@ SpawnRU_SU34 = SPAWN
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :SpawnUncontrolled()
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnEngineShutDown()
- :Spawn()
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :SpawnUncontrolled()
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnEngineShutDown()
+ :Spawn()
@@ -16707,13 +16691,14 @@ SpawnRU_SU34 = SPAWN
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
-SpawnRU_SU34 = SPAWN
- :New( 'Su-34' )
- :InitRandomizeRoute( 1, 1, 3000 )
- :InitRepeatOnLanding()
- :Spawn()
+
+ -- RU Su-34 - AI Ship Attack
+ -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
+ SpawnRU_SU34 = SPAWN:New( 'Su-34' )
+ :InitRandomizeRoute( 1, 1, 3000 )
+ :InitRepeatOnLanding()
+ :Spawn()
+
@@ -16934,8 +16919,9 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )
-- Create a new SPAWN object based on a Group Template defined from scratch.
Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )
--- Create a new CSAR_Spawn object based on a normal Group Template to spawn a soldier.
-local CSAR_Spawn = SPAWN:NewWithFromTemplate( Template, "CSAR", "Pilot" ) -- Declare SpawnObject and call a function when a new Group is spawned.
- local SpawnObject = SPAWN
- :New( "SpawnObject" )
- :InitLimit( 2, 10 )
- :OnSpawnGroup(
- function( SpawnGroup )
- SpawnGroup:E( "I am spawned" )
- end
- )
- :SpawnScheduled( 300, 0.3 )
-
+
+ -- Declare SpawnObject and call a function when a new Group is spawned.
+ local SpawnObject = SPAWN:New( "SpawnObject" )
+ :InitLimit( 2, 10 )
+ :OnSpawnGroup( function( SpawnGroup )
+ SpawnGroup:E( "I am spawned" )
+ end
+ )
+ :SpawnScheduled( 300, 0.3 )
+
@@ -17098,6 +17083,7 @@ The first parameter of the SpawnFunction is the Wrapper.Airbase.
+
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. +
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. The known AIRBASE objects are automatically imported at mission start by MOOSE. Therefore, there isn't any New() constructor defined for AIRBASE objects.
@@ -17262,13 +17248,13 @@ You need to provide the exact name of the airbase as the parame Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ) )
-
+
Spawn_Heli = SPAWN:New( "Heli")
-
+
Spawn_Heli:ParkAtAirbase( AIRBASE:FindByName( "FARP Cold" ) )
-
+
Spawn_Heli:ParkAtAirbase( AIRBASE:FindByName( "Carrier" ) )
-
+
Spawn_Plane:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), AIRBASE.TerminalType.OpenBig )
@@ -17422,16 +17408,16 @@ You can use the returned group to further define the route to be followed.
You can use the following enumerations to search for the pre-defined airbases on the current known maps of DCS:
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. +
Use the method Wrapper.Airbase#AIRBASE.FindByName() to retrieve the airbase object. The known AIRBASE objects are automatically imported at mission start by MOOSE. Therefore, there isn't any New() constructor defined for AIRBASE objects.
-Ships and Farps are added within the mission, and are therefore not known. +
Ships and FARPs are added within the mission, and are therefore not known. For these AIRBASE objects, there isn't an Wrapper.Airbase#AIRBASE enumeration defined. You need to provide the exact name of the airbase as the parameter to the Wrapper.Airbase#AIRBASE.FindByName() method!
@@ -17517,7 +17503,7 @@ You need to provide the exact name of the airbase as the parame(optional) Table holding the coordinates and terminal ids for all units of the group. Spawning will be forced to happen at exactily these spots!
+(optional) Table holding the coordinates and terminal ids for all units of the group. Spawning will be forced to happen at exactly these spots!
Spawn_Plane = SPAWN:New( "Plane" )
+
+ Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Hot )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Runway )
-
+
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
-
+
Spawn_Heli = SPAWN:New( "Heli")
-
+
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Cold" ), SPAWN.Takeoff.Cold )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Hot" ), SPAWN.Takeoff.Hot )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Runway" ), SPAWN.Takeoff.Runway )
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Air" ), SPAWN.Takeoff.Air )
-
+
Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
-
+
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold, nil, AIRBASE.TerminalType.OpenBig )
@@ -17563,7 +17550,7 @@ You need to provide the exact name of the airbase as the parame
RAT:SpawnAtParkingSpot(Airbase, Spots, Takeoff)
-Spawn a group on an Wrapper.Airbase at a specific parking spot.
+Spawn a group on an Wrapper.Airbase at a specific parking spot.
@@ -17793,10 +17780,10 @@ You can use the returned group to further define the route to be followed.
local SpawnPointVec2 = ZONE:New( ZoneName ):GetPointVec2()
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2 )
-
+ SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2 )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2, 2000, 4000 )
+ SpawnAirplanes:SpawnFromPointVec2( SpawnPointVec2, 2000, 4000 )
@@ -17874,8 +17861,8 @@ You can use the returned group to further define the route to be followed.
local SpawnPointVec3 = ZONE:New( ZoneName ):GetPointVec3( 2000 ) -- Get the center of the ZONE object at 2000 meters from the ground.
-- Spawn at the zone center position at 2000 meters from the ground!
- SpawnAirplanes:SpawnFromPointVec3( SpawnPointVec3 )
-
+ SpawnAirplanes:SpawnFromPointVec3( SpawnPointVec3 )
+
@@ -17977,10 +17964,10 @@ You can use the returned group to further define the route to be followed.
local SpawnStatic = STATIC:FindByName( StaticName )
-- Spawn from the static position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromStatic( SpawnStatic )
-
+ SpawnAirplanes:SpawnFromStatic( SpawnStatic )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )
+ SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )
@@ -18084,10 +18071,10 @@ You can use the returned group to further define the route to be followed.
local SpawnStatic = STATIC:FindByName( StaticName )
-- Spawn from the static position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromUnit( SpawnStatic )
-
+ SpawnAirplanes:SpawnFromUnit( SpawnStatic )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )
+ SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )
@@ -18191,10 +18178,10 @@ You can use the returned group to further define the route to be followed.
local SpawnVec2 = ZONE:New( ZoneName ):GetVec2()
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnFromVec2( SpawnVec2 )
-
+ SpawnAirplanes:SpawnFromVec2( SpawnVec2 )
+
-- Spawn from the static position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )
+ SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )
@@ -18425,20 +18412,20 @@ The first waypoint (where the group is spawned) is replaced wit
local SpawnZone = ZONE:New( ZoneName )
-- Spawn at the zone center position at the height specified in the ME of the group template!
- SpawnAirplanes:SpawnInZone( SpawnZone )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone )
+
-- Spawn in the zone at a random position at the height specified in the Me of the group template.
- SpawnAirplanes:SpawnInZone( SpawnZone, true )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, true )
+
-- Spawn in the zone at a random position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )
+ SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )
-- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )
+
-- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
- SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )
-
+ SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )
+
@@ -18549,7 +18536,7 @@ The first waypoint (where the group is spawned) is replaced wit
The variation to be applied on the defined time interval between each new spawn. -The variation is a number between 0 and 1, representing the %-tage of variation to be applied on the time interval.
+The variation is a number between 0 and 1, representing the % of variation to be applied on the time interval.-- NATO helicopters engaging in the battle field.
-- The time interval is set to SPAWN new helicopters between each 600 seconds, with a time variation of 50%.
--- The time variation in this case will be between 450 seconds and 750 seconds.
--- This is calculated as follows:
--- Low limit: 600 * ( 1 - 0.5 / 2 ) = 450
+-- The time variation in this case will be between 450 seconds and 750 seconds.
+-- This is calculated as follows:
+-- Low limit: 600 * ( 1 - 0.5 / 2 ) = 450
-- High limit: 600 * ( 1 + 0.5 / 2 ) = 750
--- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters.
+-- Between these two values, a random amount of seconds will be chosen for each new spawn of the helicopters.
Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):SpawnScheduled( 600, 0.5 )
@@ -20548,17 +20535,6 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.Type of terminal to be used when spawning at an airbase.
-
-
-
-Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Set case of f
+Set case to that of lead.
@@ -38809,6 +38809,20 @@ When moose is loading dynamically (for moose class development), tracing is swit + +Decrease stack/flag. Human player needs to take care himself.
+ +Set time stamp.
+Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
GROUP_SET of all helis
-table of CSAR unit names
-Replacement woundedGroups
-counter for saved pilots
- -counter for successful rescue landings at FARP/AFB/MASH
- -GROUP_SET of all helis
-table of CSAR unit names
-Replacement woundedGroups
-counter for saved pilots
- -counter for successful rescue landings at FARP/AFB/MASH
- -Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
GROUP_SET of all helis
-table of CSAR unit names
-Replacement woundedGroups
-counter for saved pilots
- -counter for successful rescue landings at FARP/AFB/MASH
- -Name of the class.
+use as counter
+ +holds #CTLD_ENGINEERING objects
+Beacons
+tables
+time to repair a unit/group
+Name of the class.
+use as counter
+ +holds #CTLD_ENGINEERING objects
+Beacons
+tables
+time to repair a unit/group
+Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Name of the class.
+use as counter
+ +holds #CTLD_ENGINEERING objects
+Beacons
+tables
+time to repair a unit/group
+Can transport crate.
-Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.
Current FSM state.
+Current FSM state.
Table of call backs.
+Table of call backs.
Event name.
+Event name.
Function.
+Function.
Event name.
+Event name.
Name.
+Name.
true, FSM is in this state.
+true, FSM is in this state.