mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
3225 lines
85 KiB
HTML
3225 lines
85 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div id="navigation">
|
|
<h2>Modules</h2>
|
|
<ul><li>
|
|
<a href="index.html">index</a>
|
|
</li></ul>
|
|
<ul>
|
|
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
|
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
|
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
|
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
|
<li><a href="Account.html">Account</a></li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
|
<li><a href="Assign.html">Assign</a></li>
|
|
<li><a href="Base.html">Base</a></li>
|
|
<li><a href="Cargo.html">Cargo</a></li>
|
|
<li><a href="CleanUp.html">CleanUp</a></li>
|
|
<li><a href="Client.html">Client</a></li>
|
|
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
|
<li><a href="Controllable.html">Controllable</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Detection.html">Detection</a></li>
|
|
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="Event.html">Event</a></li>
|
|
<li><a href="Fsm.html">Fsm</a></li>
|
|
<li><a href="Group.html">Group</a></li>
|
|
<li><a href="Identifiable.html">Identifiable</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
|
<li><a href="Menu.html">Menu</a></li>
|
|
<li><a href="Message.html">Message</a></li>
|
|
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
|
<li><a href="Mission.html">Mission</a></li>
|
|
<li><a href="Object.html">Object</a></li>
|
|
<li><a href="Point.html">Point</a></li>
|
|
<li><a href="Positionable.html">Positionable</a></li>
|
|
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
|
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
|
<li><a href="Route.html">Route</a></li>
|
|
<li><a href="Scenery.html">Scenery</a></li>
|
|
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
|
<li><a href="Scheduler.html">Scheduler</a></li>
|
|
<li><a href="Scoring.html">Scoring</a></li>
|
|
<li><a href="Sead.html">Sead</a></li>
|
|
<li><a href="Set.html">Set</a></li>
|
|
<li><a href="Smoke.html">Smoke</a></li>
|
|
<li>Spawn</li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>Spawn</code></h1>
|
|
|
|
<p>Single-Player:<strong>Yes</strong> / Multi-Player:<strong>Yes</strong> / AI:<strong>Yes</strong> / Human:<strong>No</strong> / Types:<strong>All</strong> -- <br/>
|
|
<strong>Spawn groups of units dynamically in your missions.</strong></p>
|
|
|
|
<p><img src="..\Presentations\SPAWN\SPAWN.JPG" alt="Banner Image"/></p>
|
|
|
|
<hr/>
|
|
|
|
<h1>1) <a href="##(SPAWN)">#SPAWN</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
|
|
|
<p>The <a href="##(SPAWN)">#SPAWN</a> class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.</p>
|
|
|
|
|
|
<p>For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the <em>"Spawn Template"</em> of the SPAWN object.
|
|
A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods.</p>
|
|
|
|
<p>Within the SPAWN object, there is an internal index that keeps track of which group from the internal group list was spawned.
|
|
When new groups get spawned by using the SPAWN methods (see below), it will be validated whether the Limits (<a href="##(SPAWN).Limit">SPAWN.Limit</a>) of the SPAWN object are not reached.
|
|
When all is valid, a new group will be created by the spawning methods, and the internal index will be increased with 1.</p>
|
|
|
|
<p>Regarding the name of new spawned groups, a <em>SpawnPrefix</em> will be assigned for each new group created.
|
|
If you want to have the Spawn Template name to be used as the <em>SpawnPrefix</em> name, use the <a href="##(SPAWN).New">SPAWN.New</a> constructor.
|
|
However, when the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> constructor was used, the Alias name will define the <em>SpawnPrefix</em> name.
|
|
Groups will follow the following naming structure when spawned at run-time:</p>
|
|
|
|
<ol>
|
|
<li>Spawned groups will have the name <em>SpawnPrefix</em>#ggg, where ggg is a counter from 0 to 999.</li>
|
|
<li>Spawned units will have the name <em>SpawnPrefix</em>#ggg-uu, where uu is a counter from 0 to 99 for each new spawned unit belonging to the group.</li>
|
|
</ol>
|
|
|
|
<p>Some additional notes that need to be remembered:</p>
|
|
|
|
<ul>
|
|
<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>
|
|
|
|
<h2>1.1) SPAWN 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>
|
|
|
|
<ul>
|
|
<li><a href="##(SPAWN).New">SPAWN.New</a>(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition).</li>
|
|
<li><a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a>(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition), and gives each spawned <a href="Group.html">Group</a> an different name.</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 methods 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>
|
|
|
|
<h2>1.2) SPAWN initialization methods</h2>
|
|
|
|
<p>A spawn object will behave differently based on the usage of <strong>initialization</strong> methods, which all start with the <strong>Init</strong> prefix: </p>
|
|
|
|
<ul>
|
|
<li><a href="##(SPAWN).InitLimit">SPAWN.InitLimit</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).InitRandomizeRoute">SPAWN.InitRandomizeRoute</a>(): Randomize the routes of spawned groups, and for air groups also optionally the height.</li>
|
|
<li><a href="##(SPAWN).InitRandomizeTemplate">SPAWN.InitRandomizeTemplate</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).InitUnControlled">SPAWN.InitUnControlled</a>(): Spawn plane groups uncontrolled.</li>
|
|
<li><a href="##(SPAWN).InitArray">SPAWN.InitArray</a>(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
|
|
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>(): Re-spawn groups when they land at the home base. Similar methods are <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a> and <a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>.</li>
|
|
<li><a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>(): Randomizes the <a href="Unit.html">Unit</a>s in the <a href="Group.html">Group</a> that is spawned within a <strong>radius band</strong>, given an Outer and Inner radius.</li>
|
|
<li><a href="##(SPAWN).InitRandomizeZones">SPAWN.InitRandomizeZones</a>(): Randomizes the spawning between a predefined list of <a href="Zone.html">Zone</a>s that are declared using this function. Each zone can be given a probability factor.</li>
|
|
<li><a href="##(SPAWN).InitAIOn">SPAWN.InitAIOn</a>(): Turns the AI On when spawning the new <a href="Group.html">Group</a> object.</li>
|
|
<li><a href="##(SPAWN).InitAIOff">SPAWN.InitAIOff</a>(): Turns the AI Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
|
<li><a href="##(SPAWN).InitAIOnOff">SPAWN.InitAIOnOff</a>(): Turns the AI On or Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
|
</ul>
|
|
|
|
<h2>1.3) SPAWN spawning methods</h2>
|
|
|
|
<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).SpawnFromVec3">SPAWN.SpawnFromVec3</a>(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).</li>
|
|
<li><a href="##(SPAWN).SpawnFromVec2">SPAWN.SpawnFromVec2</a>(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).</li>
|
|
<li><a href="##(SPAWN).SpawnFromStatic">SPAWN.SpawnFromStatic</a>(): Spawn a new group from a structure, taking the position of a <a href="Static.html">Static</a>.</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>
|
|
|
|
<h2>1.4) Retrieve alive GROUPs spawned by the SPAWN object</h2>
|
|
|
|
<p>The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution.
|
|
Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS.
|
|
SPAWN provides methods to iterate through that internal GROUP object reference table:</p>
|
|
|
|
<ul>
|
|
<li><a href="##(SPAWN).GetFirstAliveGroup">SPAWN.GetFirstAliveGroup</a>(): Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.</li>
|
|
<li><a href="##(SPAWN).GetNextAliveGroup">SPAWN.GetNextAliveGroup</a>(): Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.</li>
|
|
<li><a href="##(SPAWN).GetLastAliveGroup">SPAWN.GetLastAliveGroup</a>(): Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.</li>
|
|
</ul>
|
|
|
|
<p>You can use the methods <a href="##(SPAWN).GetFirstAliveGroup">SPAWN.GetFirstAliveGroup</a>() and sequently <a href="##(SPAWN).GetNextAliveGroup">SPAWN.GetNextAliveGroup</a>() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example.
|
|
The method <a href="##(SPAWN).GetGroupFromIndex">SPAWN.GetGroupFromIndex</a>() will return the GROUP object reference from the given Index, dead or alive...</p>
|
|
|
|
<h2>1.5) SPAWN object cleaning</h2>
|
|
|
|
<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).InitCleanUp">SPAWN.InitCleanUp</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).InitCleanUp">SPAWN.InitCleanUp</a>() for further info.</p>
|
|
|
|
<h2>1.6) Catch the <a href="Group.html">Group</a> spawn event in a callback function!</h2>
|
|
|
|
<p>When using the SpawnScheduled method, new <a href="Group.html">Group</a>s are created following the schedule timing parameters.
|
|
When a new <a href="Group.html">Group</a> is spawned, you maybe want to execute actions with that group spawned at the spawn event.
|
|
To SPAWN class supports this functionality through the <a href="##(SPAWN).OnSpawnGroup">SPAWN.OnSpawnGroup</a>( <em>*function( SpawnedGroup ) end *</em> ) method, which takes a function as a parameter that you can define locally.
|
|
Whenever a new <a href="Group.html">Group</a> is spawned, the given function is called, and the <a href="Group.html">Group</a> 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 <a href="Group.html">Group</a> object.
|
|
A coding example is provided at the description of the <a href="##(SPAWN).OnSpawnGroup">SPAWN.OnSpawnGroup</a>( <em>*function( SpawnedGroup ) end *</em> ) method.</p>
|
|
|
|
<hr/>
|
|
|
|
<h1><strong>API CHANGE HISTORY</strong></h1>
|
|
|
|
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
|
|
|
<ul>
|
|
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
|
<li><em>Removed</em> parts are expressed in italic type face.</li>
|
|
</ul>
|
|
|
|
<p>Hereby the change log:</p>
|
|
|
|
<p>2017-02-04: SPAWN:InitUnControlled( <strong>UnControlled</strong> ) replaces SPAWN:InitUnControlled().</p>
|
|
|
|
<p>2017-01-24: SPAWN:<strong>InitAIOnOff( AIOnOff )</strong> added.</p>
|
|
|
|
<p>2017-01-24: SPAWN:<strong>InitAIOn()</strong> added.</p>
|
|
|
|
<p>2017-01-24: SPAWN:<strong>InitAIOff()</strong> added.</p>
|
|
|
|
<p>2016-08-15: SPAWN:<strong>InitCleanUp</strong>( SpawnCleanUpInterval ) replaces SPAWN:<em>CleanUp</em>( SpawnCleanUpInterval ).</p>
|
|
|
|
<p>2016-08-15: SPAWN:<strong>InitRandomizeZones( SpawnZones )</strong> added.</p>
|
|
|
|
<p>2016-08-14: SPAWN:<strong>OnSpawnGroup</strong>( SpawnCallBackFunction, ... ) replaces SPAWN:<em>SpawnFunction</em>( SpawnCallBackFunction, ... ).</p>
|
|
|
|
<p>2016-08-14: SPAWN.SpawnInZone( Zone, <strong>RandomizeGroup</strong>, SpawnIndex ) replaces SpawnInZone( Zone, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ).</p>
|
|
|
|
<p>2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
|
|
|
<p>2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
|
|
|
<p>2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ):</p>
|
|
|
|
<p>2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, <em>RandomizeUnits, OuterRadius, InnerRadius,</em> SpawnIndex ): </p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )</strong> added:</p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>Init</strong>Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN.<em>Limit</em>( SpawnMaxUnitsAlive, SpawnMaxGroups ):</p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>Init</strong>Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN.<em>Array</em>( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).</p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>Init</strong>RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN.<em>RandomizeRoute</em>( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).</p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>Init</strong>RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN.<em>RandomizeTemplate</em>( SpawnTemplatePrefixTable ).</p>
|
|
|
|
<p>2016-08-14: SPAWN.<strong>Init</strong>UnControlled() replaces SPAWN.<em>UnControlled</em>().</p>
|
|
|
|
<hr/>
|
|
|
|
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
|
|
|
<h3>Contributions:</h3>
|
|
|
|
<ul>
|
|
<li><strong>Aaron</strong>: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.</li>
|
|
<li><a href="https://forums.eagle.ru/member.php?u=111471"><strong>Entropy</strong></a>, <strong>Afinegan</strong>: Came up with the requirement for AIOnOff().</li>
|
|
</ul>
|
|
|
|
<h3>Authors:</h3>
|
|
|
|
<ul>
|
|
<li><strong>FlightControl</strong>: Design & Programming</li>
|
|
</ul>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#SPAWN">SPAWN</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(SPAWN)">Type <code>SPAWN</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AIOnOff">SPAWN.AIOnOff</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).AliveUnits">SPAWN.AliveUnits</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).ClassName">SPAWN.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).CleanUpScheduler">SPAWN.CleanUpScheduler</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetFirstAliveGroup">SPAWN:GetFirstAliveGroup()</a></td>
|
|
<td class="summary">
|
|
<p>Will find the first alive <a href="Group.html">Group</a> it has spawned, and return the alive <a href="Group.html">Group</a> object and the first Index where the first alive <a href="Group.html">Group</a> object has been found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetGroupFromIndex">SPAWN:GetGroupFromIndex(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Get the group from an index.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetLastAliveGroup">SPAWN:GetLastAliveGroup()</a></td>
|
|
<td class="summary">
|
|
<p>Will find the last alive <a href="Group.html">Group</a> object, and will return a reference to the last live <a href="Group.html">Group</a> object and the last Index where the last alive <a href="Group.html">Group</a> object has been found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetNextAliveGroup">SPAWN:GetNextAliveGroup(SpawnIndexStart)</a></td>
|
|
<td class="summary">
|
|
<p>Will find the next alive <a href="Group.html">Group</a> object from a given Index, and return a reference to the alive <a href="Group.html">Group</a> object and the next Index where the alive <a href="Group.html">Group</a> has been found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).GetSpawnIndexFromGroup">SPAWN:GetSpawnIndexFromGroup(SpawnGroup)</a></td>
|
|
<td class="summary">
|
|
<p>Get the index from a given group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOff">SPAWN:InitAIOff()</a></td>
|
|
<td class="summary">
|
|
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOn">SPAWN:InitAIOn()</a></td>
|
|
<td class="summary">
|
|
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitAIOnOff">SPAWN:InitAIOnOff(AIOnOff)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitArray">SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</a></td>
|
|
<td class="summary">
|
|
<p>Makes the groups visible before start (like a batallion).</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitCleanUp">SPAWN:InitCleanUp(SpawnCleanUpInterval)</a></td>
|
|
<td class="summary">
|
|
<p>CleanUp groups when they are still alive, but inactive.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitLimit">SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups)</a></td>
|
|
<td class="summary">
|
|
<p>Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRandomizeRoute">SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight)</a></td>
|
|
<td class="summary">
|
|
<p>Randomizes the defined route of the SpawnTemplatePrefix group in the ME.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRandomizeTemplate">SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable)</a></td>
|
|
<td class="summary">
|
|
<p>This method is rather complicated to understand.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRandomizeUnits">SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius)</a></td>
|
|
<td class="summary">
|
|
<p>Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRandomizeZones">SPAWN:InitRandomizeZones(SpawnZoneTable)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeat">SPAWN:InitRepeat()</a></td>
|
|
<td class="summary">
|
|
<p>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.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN:InitRepeatOnEngineShutDown()</a></td>
|
|
<td class="summary">
|
|
<p>Respawn after landing when its engines have shut down.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitRepeatOnLanding">SPAWN:InitRepeatOnLanding()</a></td>
|
|
<td class="summary">
|
|
<p>Respawn group after landing.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).InitUnControlled">SPAWN:InitUnControlled(UnControlled)</a></td>
|
|
<td class="summary">
|
|
<p>(<strong>AIR</strong>) Will spawn a plane group in UnControlled or Controlled mode...</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).MaxAliveGroups">SPAWN.MaxAliveGroups</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).MaxAliveUnits">SPAWN.MaxAliveUnits</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).New">SPAWN:New(SpawnTemplatePrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Creates the main object to spawn a <a href="Group.html">Group</a> defined in the DCS ME.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).NewWithAlias">SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).OnSpawnGroup">SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...)</a></td>
|
|
<td class="summary">
|
|
<p>Allows to place a CallFunction hook when a new group spawns.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).ReSpawn">SPAWN:ReSpawn(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will re-spawn a group based on a given index.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).Repeat">SPAWN.Repeat</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).Spawn">SPAWN:Spawn()</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group based on the internal index.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnAliasPrefix">SPAWN.SpawnAliasPrefix</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnCleanUpInterval">SPAWN.SpawnCleanUpInterval</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnCleanUpTimeStamps">SPAWN.SpawnCleanUpTimeStamps</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnCount">SPAWN.SpawnCount</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFromStatic">SPAWN:SpawnFromStatic(HostStatic, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group from a hosting static.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFromUnit">SPAWN:SpawnFromUnit(HostUnit, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group from a hosting unit.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFromVec2">SPAWN:SpawnFromVec2(Vec2, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group from a Vec2 in 3D space.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFromVec3">SPAWN:SpawnFromVec3(Vec3, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group from a Vec3 in 3D space.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFunctionArguments">SPAWN.SpawnFunctionArguments</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnFunctionHook">SPAWN.SpawnFunctionHook</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnGroupName">SPAWN:SpawnGroupName(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will return the SpawnGroupName either with with a specific count number or without any count.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnGroups">SPAWN.SpawnGroups</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInZone">SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a Group within a given <a href="Zone.html">Zone</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnIndex">SPAWN.SpawnIndex</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInnerRadius">SPAWN.SpawnInnerRadius</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnIsScheduled">SPAWN.SpawnIsScheduled</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnMaxGroups">SPAWN.SpawnMaxGroups</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnMaxUnitsAlive">SPAWN.SpawnMaxUnitsAlive</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnOuterRadius">SPAWN.SpawnOuterRadius</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomize">SPAWN.SpawnRandomize</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeRoute">SPAWN.SpawnRandomizeRoute</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeRouteEndPoint">SPAWN.SpawnRandomizeRouteEndPoint</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeRouteHeight">SPAWN.SpawnRandomizeRouteHeight</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeRouteRadius">SPAWN.SpawnRandomizeRouteRadius</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeRouteStartPoint">SPAWN.SpawnRandomizeRouteStartPoint</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeTemplate">SPAWN.SpawnRandomizeTemplate</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnRandomizeUnits">SPAWN.SpawnRandomizeUnits</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduleStart">SPAWN:SpawnScheduleStart()</a></td>
|
|
<td class="summary">
|
|
<p>Will re-start the spawning scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduleStop">SPAWN:SpawnScheduleStop()</a></td>
|
|
<td class="summary">
|
|
<p>Will stop the scheduled spawning scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduled">SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation)</a></td>
|
|
<td class="summary">
|
|
<p>Spawns new groups at varying time intervals.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnScheduler">SPAWN.SpawnScheduler</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnTemplate">SPAWN.SpawnTemplate</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnTemplatePrefix">SPAWN.SpawnTemplatePrefix</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnTemplatePrefixTable">SPAWN.SpawnTemplatePrefixTable</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnUnControlled">SPAWN.SpawnUnControlled</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnVisible">SPAWN.SpawnVisible</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnWithIndex">SPAWN:SpawnWithIndex(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Will spawn a group with a specified index number.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnZoneTable">SPAWN.SpawnZoneTable</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).UnControlled">SPAWN.UnControlled</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetGroupCategoryID">SPAWN:_GetGroupCategoryID(SpawnPrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Gets the CategoryID of the Group with the given SpawnPrefix</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetGroupCoalitionID">SPAWN:_GetGroupCoalitionID(SpawnPrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Gets the CoalitionID of the Group with the given SpawnPrefix</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetGroupCountryID">SPAWN:_GetGroupCountryID(SpawnPrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Gets the CountryID of the Group with the given SpawnPrefix</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetGroupFromDCSUnit">SPAWN:_GetGroupFromDCSUnit(DCSUnit)</a></td>
|
|
<td class="summary">
|
|
<p>Return the group within the SpawnGroups collection with input a DCSUnit.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetGroupIndexFromDCSUnit">SPAWN:_GetGroupIndexFromDCSUnit(DCSUnit)</a></td>
|
|
<td class="summary">
|
|
<p>Get the group index from a DCSUnit.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetLastIndex">SPAWN:_GetLastIndex()</a></td>
|
|
<td class="summary">
|
|
<p>Return the last maximum index that can be used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetPrefixFromDCSUnit">SPAWN:_GetPrefixFromDCSUnit(DCSUnit)</a></td>
|
|
<td class="summary">
|
|
<p>Return the prefix of a SpawnUnit.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetSpawnIndex">SPAWN:_GetSpawnIndex(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Get the next index of the groups to be spawned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._GetTemplate">SPAWN:_GetTemplate(SpawnTemplatePrefix)</a></td>
|
|
<td class="summary">
|
|
<p>Gets the Group Template from the ME environment definition.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._InitializeSpawnGroups">SPAWN:_InitializeSpawnGroups(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Initalize the SpawnGroups collection.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._OnBirth">SPAWN:_OnBirth(Event)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._OnDeadOrCrash">SPAWN:_OnDeadOrCrash(Event)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._OnEngineShutDown">SPAWN:_OnEngineShutDown(event)</a></td>
|
|
<td class="summary">
|
|
<p>Will detect AIR Units shutting down their engines ...</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._OnLand">SPAWN:_OnLand(event)</a></td>
|
|
<td class="summary">
|
|
<p>Will detect AIR Units landing...</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._OnTakeOff">SPAWN:_OnTakeOff(event)</a></td>
|
|
<td class="summary">
|
|
<p>Will detect AIR Units taking off...</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._Prepare">SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Prepares the new Group Template.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._RandomizeRoute">SPAWN:_RandomizeRoute(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Private method randomizing the routes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._RandomizeTemplate">SPAWN:_RandomizeTemplate(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Private method that randomizes the template of the group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._RandomizeZones">SPAWN:_RandomizeZones(SpawnIndex)</a></td>
|
|
<td class="summary">
|
|
<p>Private method that randomizes the <a href="Zone.html">Zone</a>s where the Group will be spawned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._Scheduler">SPAWN:_Scheduler()</a></td>
|
|
<td class="summary">
|
|
<p>This function is called automatically by the Spawning scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._SpawnCleanUpScheduler">SPAWN:_SpawnCleanUpScheduler()</a></td>
|
|
<td class="summary">
|
|
<p>Schedules the CleanUp of Groups</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(SPAWN)">#SPAWN</a></em>
|
|
<a id="SPAWN" >
|
|
<strong>SPAWN</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(Spawn)" >Type <code>Spawn</code></a></h2>
|
|
|
|
<h2><a id="#(SPAWN)" >Type <code>SPAWN</code></a></h2>
|
|
|
|
<p>SPAWN Class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).AIOnOff" >
|
|
<strong>SPAWN.AIOnOff</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> The AI is on by default when spawning a group.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SPAWN).AliveUnits" >
|
|
<strong>SPAWN.AliveUnits</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).ClassName" >
|
|
<strong>SPAWN.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).CleanUpScheduler" >
|
|
<strong>SPAWN.CleanUpScheduler</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p>self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).GetFirstAliveGroup" >
|
|
<strong>SPAWN:GetFirstAliveGroup()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will find the first alive <a href="Group.html">Group</a> it has spawned, and return the alive <a href="Group.html">Group</a> object and the first Index where the first alive <a href="Group.html">Group</a> object has been found.</p>
|
|
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>, #number:</em>
|
|
The <a href="Group.html">Group</a> object found, the new Index where the group was found.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil, #nil:</em>
|
|
When no group is found, #nil is returned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{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</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).GetGroupFromIndex" >
|
|
<strong>SPAWN:GetGroupFromIndex(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Get the group from an index.</p>
|
|
|
|
|
|
<p>Returns the group from the SpawnGroups list.
|
|
If no index is given, it will return the first group in the list.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
The index of the group to return.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).GetLastAliveGroup" >
|
|
<strong>SPAWN:GetLastAliveGroup()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will find the last alive <a href="Group.html">Group</a> object, and will return a reference to the last live <a href="Group.html">Group</a> object and the last Index where the last alive <a href="Group.html">Group</a> object has been found.</p>
|
|
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>, #number:</em>
|
|
The last alive <a href="Group.html">Group</a> object found, the last Index where the last alive <a href="Group.html">Group</a> object was found.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil, #nil:</em>
|
|
When no alive <a href="Group.html">Group</a> object is found, #nil is returned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Find the last alive @{Group} object of the SpawnPlanes SPAWN object @{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</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).GetNextAliveGroup" >
|
|
<strong>SPAWN:GetNextAliveGroup(SpawnIndexStart)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will find the next alive <a href="Group.html">Group</a> object from a given Index, and return a reference to the alive <a href="Group.html">Group</a> object and the next Index where the alive <a href="Group.html">Group</a> has been found.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndexStart </em></code>:
|
|
A Index holding the start position to search from. This method can also be used to find the first alive <a href="Group.html">Group</a> object from the given Index.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>, #number:</em>
|
|
The next alive <a href="Group.html">Group</a> object found, the next Index where the next alive <a href="Group.html">Group</a> object was found.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil, #nil:</em>
|
|
When no alive <a href="Group.html">Group</a> object is found from the start Index position, #nil is returned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{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</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).GetSpawnIndexFromGroup" >
|
|
<strong>SPAWN:GetSpawnIndexFromGroup(SpawnGroup)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Get the index from a given group.</p>
|
|
|
|
|
|
<p>The function will search the name of the group for a #, and will return the number behind the #-mark.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnGroup </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitAIOff" >
|
|
<strong>SPAWN:InitAIOff()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Turns the AI Off for the <a href="Group.html">Group</a> when spawning.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
The SPAWN object</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitAIOn" >
|
|
<strong>SPAWN:InitAIOn()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Turns the AI On for the <a href="Group.html">Group</a> when spawning.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
The SPAWN object</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitAIOnOff" >
|
|
<strong>SPAWN:InitAIOnOff(AIOnOff)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> AIOnOff </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitArray" >
|
|
<strong>SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Makes the groups visible before start (like a batallion).</p>
|
|
|
|
|
|
<p>The method will take the position of the group as the first position in the array.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnAngle </em></code>: </p>
|
|
<pre><code> The angle in degrees how the groups and each unit of the group will be positioned.
|
|
</code></pre>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnWidth </em></code>: </p>
|
|
<pre><code> The amount of Groups that will be positioned on the X axis.
|
|
</code></pre>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnDeltaX </em></code>: </p>
|
|
<pre><code> The space between each Group on the X-axis.
|
|
</code></pre>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnDeltaY </em></code>: </p>
|
|
<pre><code> The space between each Group on the Y-axis.
|
|
</code></pre>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Define an array of Groups.
|
|
Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):InitLimit( 2, 24 ):InitArray( 90, "Diamond", 10, 100, 50 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitCleanUp" >
|
|
<strong>SPAWN:InitCleanUp(SpawnCleanUpInterval)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>CleanUp groups when they are still alive, but inactive.</p>
|
|
|
|
|
|
<p>When groups are still alive and have become inactive due to damage and are unable to contribute anything, then this group will be removed at defined intervals in seconds.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnCleanUpInterval </em></code>:
|
|
The interval to check for inactive groups within seconds.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>Spawn_Helicopter:CleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitLimit" >
|
|
<strong>SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.</p>
|
|
|
|
|
|
<p>Note that this method is exceptionally important to balance the performance of the mission. Depending on the machine etc, a mission can only process a maximum amount of units.
|
|
If the time interval must be short, but there should not be more Units or Groups alive than a maximum amount of units, then this method should be used...
|
|
When a <a href="##(SPAWN).New">SPAWN.New</a> is executed and the limit of the amount of units alive is reached, then no new spawn will happen of the group, until some of these units of the spawn object will be destroyed.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnMaxUnitsAlive </em></code>:
|
|
The maximum amount of units that can be alive at runtime. </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnMaxGroups </em></code>:
|
|
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.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRandomizeRoute" >
|
|
<strong>SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Randomizes the defined route of the SpawnTemplatePrefix group in the ME.</p>
|
|
|
|
|
|
<p>This is very useful to define extra variation of the behaviour of groups.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnStartPoint </em></code>:
|
|
is the waypoint where the randomization begins.
|
|
Note that the StartPoint = 0 equaling the point where the group is spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnEndPoint </em></code>:
|
|
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.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnRadius </em></code>:
|
|
is the radius in meters in which the randomization of the new waypoints, with the original waypoint of the original template located in the middle ...</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnHeight </em></code>:
|
|
(optional) Specifies the <strong>additional</strong> height in meters that can be added to the base height specified at each waypoint in the ME.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRandomizeTemplate" >
|
|
<strong>SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>This method is rather complicated to understand.</p>
|
|
|
|
|
|
<p>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,
|
|
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.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnTemplatePrefixTable </em></code>:
|
|
A 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. </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
|
|
Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
|
|
Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRandomizeUnits" >
|
|
<strong>SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#boolean RandomizeUnits </em></code>:
|
|
If true, SPAWN will perform the randomization of the <a href="UNIT.html">UNIT</a>s position within the group between a given outer and inner radius. </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>:
|
|
(optional) The outer radius in meters where the new group will be spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>:
|
|
(optional) The inner radius in meters where the new group will NOT be spawned.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRandomizeZones" >
|
|
<strong>SPAWN:InitRandomizeZones(SpawnZoneTable)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p>TODO: Add example.
|
|
- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
|
|
@param #SPAWN self
|
|
@param #table SpawnZoneTable A table with <a href="Zone.html">Zone</a> objects. If this table is given, then each spawn will be executed within the given list of <a href="Zone.html">Zone</a>s objects.
|
|
@return #SPAWN
|
|
@usage
|
|
-- NATO Tank Platoons invading Gori.
|
|
-- Choose between 3 different zones for each new SPAWN the Group to be executed, regardless of the zone type. </p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnZoneTable </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRepeat" >
|
|
<strong>SPAWN:InitRepeat()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>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.</p>
|
|
|
|
|
|
<p>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.
|
|
So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- RU Su-34 - AI Ship Attack
|
|
-- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
|
|
SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():InitRandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRepeatOnEngineShutDown" >
|
|
<strong>SPAWN:InitRepeatOnEngineShutDown()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Respawn after landing when its engines have shut down.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitRepeatOnLanding" >
|
|
<strong>SPAWN:InitRepeatOnLanding()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Respawn group after landing.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).InitUnControlled" >
|
|
<strong>SPAWN:InitUnControlled(UnControlled)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>(<strong>AIR</strong>) Will spawn a plane group in UnControlled or Controlled mode...</p>
|
|
|
|
|
|
<p>This will be similar to the uncontrolled flag setting in the ME.
|
|
You can use UnControlled mode to simulate planes startup and ready for take-off but aren't moving (yet).
|
|
ReSpawn the plane in Controlled mode, and the plane will move...</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#boolean UnControlled </em></code>:
|
|
true if UnControlled, false if Controlled.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SPAWN).MaxAliveGroups" >
|
|
<strong>SPAWN.MaxAliveGroups</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SPAWN).MaxAliveUnits" >
|
|
<strong>SPAWN.MaxAliveUnits</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).New" >
|
|
<strong>SPAWN:New(SpawnTemplatePrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Creates the main object to spawn a <a href="Group.html">Group</a> defined in the DCS ME.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnTemplatePrefix </em></code>:
|
|
is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usages:</h3>
|
|
<ul>
|
|
<li><pre class="example"><code>-- NATO helicopters engaging in the battle field.
|
|
Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )</code></pre></li>
|
|
<li><pre class="example"><code>local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME.</code></pre></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).NewWithAlias" >
|
|
<strong>SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnTemplatePrefix </em></code>:
|
|
is the name of the Group in the ME that defines the Template.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnAliasPrefix </em></code>:
|
|
is the name that will be given to the Group at runtime.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usages:</h3>
|
|
<ul>
|
|
<li><pre class="example"><code>-- NATO helicopters engaging in the battle field.
|
|
Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )</code></pre></li>
|
|
<li><pre class="example"><code>local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME.</code></pre></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).OnSpawnGroup" >
|
|
<strong>SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Allows to place a CallFunction hook when a new group spawns.</p>
|
|
|
|
|
|
<p>The provided method will be called when a new group is spawned, including its given parameters.
|
|
The first parameter of the SpawnFunction is the <a href="Group.html##(GROUP)">Group#GROUP</a> that was spawned.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#function SpawnCallBackFunction </em></code>:
|
|
The function to be called when a group spawns.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnFunctionArguments </em></code>:
|
|
A random amount of arguments to be provided to the function when the group spawns.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> ... </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).ReSpawn" >
|
|
<strong>SPAWN:ReSpawn(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will re-spawn a group based on a given index.</p>
|
|
|
|
|
|
<p>Note: Uses <a href="DATABASE.html">DATABASE</a> module defined in MOOSE.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnIndex </em></code>:
|
|
The index of the group to be spawned.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
The group that was spawned. You can use this group for further actions.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).Repeat" >
|
|
<strong>SPAWN.Repeat</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).RepeatOnEngineShutDown" >
|
|
<strong>SPAWN.RepeatOnEngineShutDown</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).RepeatOnLanding" >
|
|
<strong>SPAWN.RepeatOnLanding</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).Spawn" >
|
|
<strong>SPAWN:Spawn()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group based on the internal index.</p>
|
|
|
|
|
|
<p>Note: Uses <a href="DATABASE.html">DATABASE</a> module defined in MOOSE.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
The group that was spawned. You can use this group for further actions.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(SPAWN).SpawnAliasPrefix" >
|
|
<strong>SPAWN.SpawnAliasPrefix</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnCleanUpInterval" >
|
|
<strong>SPAWN.SpawnCleanUpInterval</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnCleanUpTimeStamps" >
|
|
<strong>SPAWN.SpawnCleanUpTimeStamps</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SPAWN).SpawnCount" >
|
|
<strong>SPAWN.SpawnCount</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> The internal counter of the amount of spawning the has happened since SpawnStart.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnFromStatic" >
|
|
<strong>SPAWN:SpawnFromStatic(HostStatic, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group from a hosting static.</p>
|
|
|
|
|
|
<p>This method is mostly advisable to be used if you want to simulate spawning from buldings and structures (static buildings).
|
|
You can use the returned group to further define the route to be followed.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Static.html##(STATIC)">Wrapper.Static#STATIC</a> HostStatic </em></code>:
|
|
The static dropping or unloading the group.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
(optional) The index which group to spawn within the given zone.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
that was spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing was spawned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnFromUnit" >
|
|
<strong>SPAWN:SpawnFromUnit(HostUnit, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group from a hosting unit.</p>
|
|
|
|
|
|
<p>This method is mostly advisable to be used if you want to simulate spawning from air units, like helicopters, which are dropping infantry into a defined Landing Zone.
|
|
Note that each point in the route assigned to the spawning group is reset to the point of the spawn.
|
|
You can use the returned group to further define the route to be followed.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> HostUnit </em></code>:
|
|
The air or ground unit dropping or unloading the group.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
(optional) The index which group to spawn within the given zone.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
that was spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing was spawned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnFromVec2" >
|
|
<strong>SPAWN:SpawnFromVec2(Vec2, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group from a Vec2 in 3D space.</p>
|
|
|
|
|
|
<p>This method is mostly advisable to be used if you want to simulate spawning groups on the ground from air units, like vehicles.
|
|
Note that each point in the route assigned to the spawning group is reset to the point of the spawn.
|
|
You can use the returned group to further define the route to be followed.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a> Vec2 </em></code>:
|
|
The Vec2 coordinates where to spawn the group.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
(optional) The index which group to spawn within the given zone.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
that was spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing was spawned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnFromVec3" >
|
|
<strong>SPAWN:SpawnFromVec3(Vec3, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group from a Vec3 in 3D space.</p>
|
|
|
|
|
|
<p>This method is mostly advisable to be used if you want to simulate spawning units in the air, like helicopters or airplanes.
|
|
Note that each point in the route assigned to the spawning group is reset to the point of the spawn.
|
|
You can use the returned group to further define the route to be followed.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSTypes.html##(Vec3)">Dcs.DCSTypes#Vec3</a> Vec3 </em></code>:
|
|
The Vec3 coordinates where to spawn the group.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
(optional) The index which group to spawn within the given zone.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
that was spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing was spawned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnFunctionArguments" >
|
|
<strong>SPAWN.SpawnFunctionArguments</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnFunctionHook" >
|
|
<strong>SPAWN.SpawnFunctionHook</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnGroupName" >
|
|
<strong>SPAWN:SpawnGroupName(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will return the SpawnGroupName either with with a specific count number or without any count.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
Is the number of the Group that is to be spawned.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#string:</em>
|
|
SpawnGroupName</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnGroups" >
|
|
<strong>SPAWN.SpawnGroups</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Array containing the descriptions of each Group to be Spawned.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnInZone" >
|
|
<strong>SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a Group within a given <a href="Zone.html">Zone</a>.</p>
|
|
|
|
|
|
<p>The <a href="Zone.html">Zone</a> can be of any type derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>.
|
|
Once the <a href="Group.html">Group</a> is spawned within the zone, the <a href="Group.html">Group</a> will continue on its route.
|
|
The <strong>first waypoint</strong> (where the group is spawned) is replaced with the zone location coordinates.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> Zone </em></code>:
|
|
The zone where the group is to be spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#boolean RandomizeGroup </em></code>:
|
|
(optional) Randomization of the <a href="Group.html">Group</a> position in the zone.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
(optional) The index which group to spawn within the given zone.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
that was spawned.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
when nothing was spawned.</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SPAWN).SpawnIndex" >
|
|
<strong>SPAWN.SpawnIndex</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnInnerRadius" >
|
|
<strong>SPAWN.SpawnInnerRadius</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnIsScheduled" >
|
|
<strong>SPAWN.SpawnIsScheduled</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnMaxGroups" >
|
|
<strong>SPAWN.SpawnMaxGroups</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> The maximum amount of groups that can be spawned.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
|
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnOuterRadius" >
|
|
<strong>SPAWN.SpawnOuterRadius</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnRandomize" >
|
|
<strong>SPAWN.SpawnRandomize</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Sets the randomization flag of new Spawned units to false.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnRandomizeRoute" >
|
|
<strong>SPAWN.SpawnRandomizeRoute</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnRandomizeRouteEndPoint" >
|
|
<strong>SPAWN.SpawnRandomizeRouteEndPoint</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnRandomizeRouteHeight" >
|
|
<strong>SPAWN.SpawnRandomizeRouteHeight</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnRandomizeRouteRadius" >
|
|
<strong>SPAWN.SpawnRandomizeRouteRadius</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnRandomizeRouteStartPoint" >
|
|
<strong>SPAWN.SpawnRandomizeRouteStartPoint</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnRandomizeTemplate" >
|
|
<strong>SPAWN.SpawnRandomizeTemplate</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnRandomizeUnits" >
|
|
<strong>SPAWN.SpawnRandomizeUnits</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnScheduleStart" >
|
|
<strong>SPAWN:SpawnScheduleStart()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will re-start the spawning scheduler.</p>
|
|
|
|
|
|
<p>Note: This method is only required to be called when the schedule was stopped.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnScheduleStop" >
|
|
<strong>SPAWN:SpawnScheduleStop()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will stop the scheduled spawning scheduler.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnScheduled" >
|
|
<strong>SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Spawns new groups at varying time intervals.</p>
|
|
|
|
|
|
<p>This is useful if you want to have continuity within your missions of certain (AI) groups to be present (alive) within your missions.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnTime </em></code>:
|
|
The time interval defined in seconds between each new spawn of new groups.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnTimeVariation </em></code>:
|
|
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.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- 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
|
|
-- 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.
|
|
Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnScheduler" >
|
|
<strong>SPAWN.SpawnScheduler</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnTemplate" >
|
|
<strong>SPAWN.SpawnTemplate</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(SPAWN).SpawnTemplatePrefix" >
|
|
<strong>SPAWN.SpawnTemplatePrefix</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).SpawnTemplatePrefixTable" >
|
|
<strong>SPAWN.SpawnTemplatePrefixTable</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnUnControlled" >
|
|
<strong>SPAWN.SpawnUnControlled</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).SpawnVisible" >
|
|
<strong>SPAWN.SpawnVisible</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN).SpawnWithIndex" >
|
|
<strong>SPAWN:SpawnWithIndex(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will spawn a group with a specified index number.</p>
|
|
|
|
|
|
<p>Uses <a href="DATABASE.html">DATABASE</a> global object defined in MOOSE.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnIndex </em></code>:
|
|
The index of the group to be spawned.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
The group that was spawned. You can use this group for further actions.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(SPAWN.SpawnZoneTable)">#SPAWN.SpawnZoneTable</a></em>
|
|
<a id="#(SPAWN).SpawnZoneTable" >
|
|
<strong>SPAWN.SpawnZoneTable</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SPAWN).UnControlled" >
|
|
<strong>SPAWN.UnControlled</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetGroupCategoryID" >
|
|
<strong>SPAWN:_GetGroupCategoryID(SpawnPrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Gets the CategoryID of the Group with the given SpawnPrefix</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnPrefix </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetGroupCoalitionID" >
|
|
<strong>SPAWN:_GetGroupCoalitionID(SpawnPrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Gets the CoalitionID of the Group with the given SpawnPrefix</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnPrefix </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetGroupCountryID" >
|
|
<strong>SPAWN:_GetGroupCountryID(SpawnPrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Gets the CountryID of the Group with the given SpawnPrefix</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnPrefix </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetGroupFromDCSUnit" >
|
|
<strong>SPAWN:_GetGroupFromDCSUnit(DCSUnit)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Return the group within the SpawnGroups collection with input a DCSUnit.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSWrapper.Unit.html##(Unit)">Dcs.DCSWrapper.Unit#Unit</a> DCSUnit </em></code>:
|
|
The <a href="DCSUnit.html">DCSUnit</a> to be searched.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a>:</em>
|
|
The Group</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing found</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetGroupIndexFromDCSUnit" >
|
|
<strong>SPAWN:_GetGroupIndexFromDCSUnit(DCSUnit)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Get the group index from a DCSUnit.</p>
|
|
|
|
|
|
<p>The method will search for a #-mark, and will return the index behind the #-mark of the DCSUnit.
|
|
It will return nil of no prefix was found.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSWrapper.Unit.html##(Unit)">Dcs.DCSWrapper.Unit#Unit</a> DCSUnit </em></code>:
|
|
The <a href="DCSUnit.html">DCSUnit</a> to be searched.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em>#string:</em>
|
|
The prefix</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing found</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetLastIndex" >
|
|
<strong>SPAWN:_GetLastIndex()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Return the last maximum index that can be used.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetPrefixFromDCSUnit" >
|
|
<strong>SPAWN:_GetPrefixFromDCSUnit(DCSUnit)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Return the prefix of a SpawnUnit.</p>
|
|
|
|
|
|
<p>The method will search for a #-mark, and will return the text before the #-mark.
|
|
It will return nil of no prefix was found.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Dcs.DCSWrapper.Unit.html##(UNIT)">Dcs.DCSWrapper.Unit#UNIT</a> DCSUnit </em></code>:
|
|
The <a href="DCSUnit.html">DCSUnit</a> to be searched.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em>#string:</em>
|
|
The prefix</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
Nothing found</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetSpawnIndex" >
|
|
<strong>SPAWN:_GetSpawnIndex(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Get the next index of the groups to be spawned.</p>
|
|
|
|
|
|
<p>This method is complicated, as it is used at several spaces.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._GetTemplate" >
|
|
<strong>SPAWN:_GetTemplate(SpawnTemplatePrefix)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Gets the Group Template from the ME environment definition.</p>
|
|
|
|
|
|
<p>This method used the <a href="DATABASE.html">DATABASE</a> object, which contains ALL initial and new spawned object in MOOSE.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnTemplatePrefix </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
|
|
<p>@SPAWN self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._InitializeSpawnGroups" >
|
|
<strong>SPAWN:_InitializeSpawnGroups(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Initalize the SpawnGroups collection.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._OnBirth" >
|
|
<strong>SPAWN:_OnBirth(Event)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._OnDeadOrCrash" >
|
|
<strong>SPAWN:_OnDeadOrCrash(Event)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._OnEngineShutDown" >
|
|
<strong>SPAWN:_OnEngineShutDown(event)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will detect AIR Units shutting down their engines ...</p>
|
|
|
|
|
|
<p>When the event takes place, and the method <a href="RepeatOnEngineShutDown.html">RepeatOnEngineShutDown</a> was called, the spawned Group will Re-SPAWN.
|
|
But only when the Unit was registered to have landed.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> event </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._OnLand" >
|
|
<strong>SPAWN:_OnLand(event)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will detect AIR Units landing...</p>
|
|
|
|
|
|
<p>When the event takes place, the spawned Group is registered as landed.
|
|
This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> event </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._OnTakeOff" >
|
|
<strong>SPAWN:_OnTakeOff(event)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Will detect AIR Units taking off...</p>
|
|
|
|
|
|
<p>When the event takes place, the spawned Group is registered as airborne...
|
|
This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> event </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._Prepare" >
|
|
<strong>SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Prepares the new Group Template.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string SpawnTemplatePrefix </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._RandomizeRoute" >
|
|
<strong>SPAWN:_RandomizeRoute(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Private method randomizing the routes.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>:
|
|
The index of the group to be spawned.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em></p>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._RandomizeTemplate" >
|
|
<strong>SPAWN:_RandomizeTemplate(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Private method that randomizes the template of the group.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._RandomizeZones" >
|
|
<strong>SPAWN:_RandomizeZones(SpawnIndex)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Private method that randomizes the <a href="Zone.html">Zone</a>s where the Group will be spawned.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SPAWN)">#SPAWN</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._Scheduler" >
|
|
<strong>SPAWN:_Scheduler()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>This function is called automatically by the Spawning scheduler.</p>
|
|
|
|
|
|
<p>It is the internal worker method SPAWNing new Groups on the defined time intervals.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._SpawnCleanUpScheduler" >
|
|
<strong>SPAWN:_SpawnCleanUpScheduler()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Schedules the CleanUp of Groups</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#boolean:</em>
|
|
True = Continue Scheduler</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SPAWN)._TranslateRotate" >
|
|
<strong>SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> SpawnIndex </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnRootX </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnRootY </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnX </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnY </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> SpawnAngle </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SPAWN).uncontrolled" >
|
|
<strong>SPAWN.uncontrolled</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(SPAWN.SpawnZoneTable)" >Type <code>SPAWN.SpawnZoneTable</code></a></h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|