mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Applied proper documentation
This commit is contained in:
@@ -89,52 +89,58 @@ Groups will follow the following naming structure when spawned at run-time:</p>
|
||||
<p>Some additional notes that need to be remembered:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</p></li>
|
||||
<li><p>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</p></li>
|
||||
<li><p>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</p></li>
|
||||
<li><h2>SPAWN object construction methods:</h2>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</p></li>
|
||||
<li>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</li>
|
||||
<li>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</li>
|
||||
<li>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN construction methods:</h1>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</li>
|
||||
</ul>
|
||||
|
||||
<p>It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned.
|
||||
The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
|
||||
So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.</p>
|
||||
|
||||
<ol>
|
||||
<li><h2>SPAWN object initialization methods: </h2>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p></li>
|
||||
<li><p><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </p></li>
|
||||
<li><p><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</p></li>
|
||||
<li><p><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</p></li>
|
||||
<li><p><a href="##(SPAWN).Repeat">SPAWN.Repeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a> and <a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a>.</p></li>
|
||||
<li><h2>SPAWN object spawning methods:</h2>
|
||||
<p>Groups can be spawned at different times and methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</p></li>
|
||||
<li><p><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</p></li>
|
||||
</ol>
|
||||
<h1>SPAWN initialization methods: </h1>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</li>
|
||||
<li><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</li>
|
||||
<li><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </li>
|
||||
<li><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</li>
|
||||
<li><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
|
||||
<li><a href="##(SPAWN).Repeat">SPAWN.Repeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a> and <a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN spawning methods:</h1>
|
||||
<p>Groups can be spawned at different times and methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</li>
|
||||
<li><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</li>
|
||||
<li><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</li>
|
||||
<li><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</li>
|
||||
<li><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that <a href="##(SPAWN).Spawn">SPAWN.Spawn</a> and <a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a> return a <a href="GROUP.html##(GROUP).New">GROUP#GROUP.New</a> object, that contains a reference to the DCSGroup object.
|
||||
You can use the <a href="GROUP.html">GROUP</a> object to do further actions with the DCSGroup.</p>
|
||||
|
||||
<ol>
|
||||
<li>SPAWN object cleaning:
|
||||
<hr/>
|
||||
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,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> 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.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</li>
|
||||
</ol>
|
||||
<h1>SPAWN object cleaning:</h1>
|
||||
<p>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,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> 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.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</p>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
@@ -2052,7 +2058,7 @@ Nothing found</p>
|
||||
|
||||
|
||||
|
||||
<p> TODO Need to delete this... _Database does this now ...</p>
|
||||
<p> TODO Need to delete this... _DATABASE does this now ...</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user