mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Set AI On or Off when spawning
-- Added AI On or Off functions for SPAWN -- Added AI On or Off functions for GROUP
This commit is contained in:
@@ -105,69 +105,8 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
|
||||
</ul>
|
||||
|
||||
<h2>1.2) GROUP task methods</h2>
|
||||
<p>Several group task methods are available that help you to prepare tasks.
|
||||
These methods return a string consisting of the task description, which can then be given to either a <br/>
|
||||
<a href="Wrapper.Controllable.html##(CONTROLLABLE).PushTask">Wrapper.Controllable#CONTROLLABLE.PushTask</a> or <a href="Wrapper.Controllable.html##(CONTROLLABLE).SetTask">Wrapper.Controllable#CONTROLLABLE.SetTask</a> method to assign the task to the GROUP.
|
||||
Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND.
|
||||
Each task description where applicable indicates for which group category the task is valid.
|
||||
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.</p>
|
||||
|
||||
<h3>1.2.1) Assigned task methods</h3>
|
||||
|
||||
<p>Assigned task methods make the group execute the task where the location of the (possible) targets of the task are known before being detected.
|
||||
This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.</p>
|
||||
|
||||
<p>Find below a list of the <strong>assigned task</strong> methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackGroup">Wrapper.Controllable#CONTROLLABLE.TaskAttackGroup</a>: (AIR) Attack a Group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackMapObject">Wrapper.Controllable#CONTROLLABLE.TaskAttackMapObject</a>: (AIR) Attacking the map object (building, structure, e.t.c).</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskAttackUnit">Wrapper.Controllable#CONTROLLABLE.TaskAttackUnit</a>: (AIR) Attack the Unit.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskBombing">Wrapper.Controllable#CONTROLLABLE.TaskBombing</a>: (Wrapper.Controllable#CONTROLLABLEDelivering weapon at the point on the ground.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskBombingRunway">Wrapper.Controllable#CONTROLLABLE.TaskBombingRunway</a>: (AIR) Delivering weapon on the runway.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEmbarking">Wrapper.Controllable#CONTROLLABLE.TaskEmbarking</a>: (AIR) Move the group to a Vec2 Point, wait for a defined duration and embark a group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEmbarkToTransport">Wrapper.Controllable#CONTROLLABLE.TaskEmbarkToTransport</a>: (GROUND) Embark to a Transport landed at a location.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskEscort">Wrapper.Controllable#CONTROLLABLE.TaskEscort</a>: (AIR) Escort another airborne group. </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFAC_AttackGroup">Wrapper.Controllable#CONTROLLABLE.TaskFAC_AttackGroup</a>: (AIR + GROUND) The task makes the group/unit a FAC and orders the FAC to control the target (enemy ground group) destruction.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFireAtPoint">Wrapper.Controllable#CONTROLLABLE.TaskFireAtPoint</a>: (GROUND) Fire at a VEC2 point until ammunition is finished.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskFollow">Wrapper.Controllable#CONTROLLABLE.TaskFollow</a>: (AIR) Following another airborne group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskHold">Wrapper.Controllable#CONTROLLABLE.TaskHold</a>: (GROUND) Hold ground group from moving.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskHoldPosition">Wrapper.Controllable#CONTROLLABLE.TaskHoldPosition</a>: (AIR) Hold position at the current position of the first unit of the group.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskLand">Wrapper.Controllable#CONTROLLABLE.TaskLand</a>: (AIR HELICOPTER) Landing at the ground. For helicopters only.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskLandAtZone">Wrapper.Controllable#CONTROLLABLE.TaskLandAtZone</a>: (AIR) Land the group at a <a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskOrbitCircle">Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircle</a>: (AIR) Orbit at the current position of the first unit of the group at a specified alititude.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskOrbitCircleAtVec2">Wrapper.Controllable#CONTROLLABLE.TaskOrbitCircleAtVec2</a>: (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRefueling">Wrapper.Controllable#CONTROLLABLE.TaskRefueling</a>: (AIR) Refueling from the nearest tanker. No parameters.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRoute">Wrapper.Controllable#CONTROLLABLE.TaskRoute</a>: (AIR + GROUND) Return a Misson task to follow a given route defined by Points.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToVec2">Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec2</a>: (AIR + GROUND) Make the Group move to a given point.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToVec3">Wrapper.Controllable#CONTROLLABLE.TaskRouteToVec3</a>: (AIR + GROUND) Make the Group move to a given point.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskRouteToZone">Wrapper.Controllable#CONTROLLABLE.TaskRouteToZone</a>: (AIR + GROUND) Route the group to a given zone.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskReturnToBase">Wrapper.Controllable#CONTROLLABLE.TaskReturnToBase</a>: (AIR) Route the group to an airbase.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.2) EnRoute task methods</h3>
|
||||
|
||||
<p>EnRoute tasks require the targets of the task need to be detected by the group (using its sensors) before the task can be executed:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskAWACS">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskAWACS</a>: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEngageGroup">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageGroup</a>: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEngageTargets">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageTargets</a>: (AIR) Engaging targets of defined types.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskEWR">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEWR</a>: (AIR) Attack the Unit.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskFAC">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskFAC</a>: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskFAC_EngageGroup">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskFAC_EngageGroup</a>: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose the target (enemy ground group) as well as other assigned targets.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).EnRouteTaskTanker">Wrapper.Controllable#CONTROLLABLE.EnRouteTaskTanker</a>: (AIR) Aircraft will act as a tanker for friendly units. No parameters.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.2.3) Preparation task methods</h3>
|
||||
|
||||
<p>There are certain task methods that allow to tailor the task behaviour:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskWrappedAction">Wrapper.Controllable#CONTROLLABLE.TaskWrappedAction</a>: Return a WrappedAction Task taking a Command.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskCombo">Wrapper.Controllable#CONTROLLABLE.TaskCombo</a>: Return a Combo Task taking an array of Tasks.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskCondition">Wrapper.Controllable#CONTROLLABLE.TaskCondition</a>: Return a condition section for a controlled task.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).TaskControlled">Wrapper.Controllable#CONTROLLABLE.TaskControlled</a>: Return a Controlled Task taking a Task and a TaskCondition.</li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> task methods section for a description of the task methods.</p>
|
||||
|
||||
<h3>1.2.4) Obtain the mission from group templates</h3>
|
||||
|
||||
@@ -178,53 +117,15 @@ This is different from the EnRoute tasks, where the targets of the task need to
|
||||
</ul>
|
||||
|
||||
<h2>1.3) GROUP Command methods</h2>
|
||||
<p>Group <strong>command methods</strong> prepare the execution of commands using the <a href="Wrapper.Controllable.html##(CONTROLLABLE).SetCommand">Wrapper.Controllable#CONTROLLABLE.SetCommand</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).CommandDoScript">Wrapper.Controllable#CONTROLLABLE.CommandDoScript</a>: Do Script command.</li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).CommandSwitchWayPoint">Wrapper.Controllable#CONTROLLABLE.CommandSwitchWayPoint</a>: Perform a switch waypoint command.</li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> command methods section for a description of the command methods.</p>
|
||||
|
||||
<h2>1.4) GROUP Option methods</h2>
|
||||
<p>Group <strong>Option methods</strong> change the behaviour of the Group while being alive.</p>
|
||||
<h2>1.4) GROUP option methods</h2>
|
||||
|
||||
<h3>1.4.1) Rule of Engagement:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFree">Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFree</a> </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEOpenFire">Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEReturnFire">Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEEvadeFire">Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFire</a></li>
|
||||
</ul>
|
||||
|
||||
<p>To check whether an ROE option is valid for a specific group, use:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFreePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEWeaponFreePossible</a> </li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEOpenFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEOpenFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEReturnFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEReturnFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROEEvadeFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROEEvadeFirePossible</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>1.4.2) Rule on thread:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTNoReaction">Wrapper.Controllable#CONTROLLABLE.OptionROTNoReaction</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTPassiveDefense">Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefense</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTEvadeFire">Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFire</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTVertical">Wrapper.Controllable#CONTROLLABLE.OptionROTVertical</a></li>
|
||||
</ul>
|
||||
|
||||
<p>To test whether an ROT option is valid for a specific group, use:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTNoReactionPossible">Wrapper.Controllable#CONTROLLABLE.OptionROTNoReactionPossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTPassiveDefensePossible">Wrapper.Controllable#CONTROLLABLE.OptionROTPassiveDefensePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTEvadeFirePossible">Wrapper.Controllable#CONTROLLABLE.OptionROTEvadeFirePossible</a></li>
|
||||
<li><a href="Wrapper.Controllable.html##(CONTROLLABLE).OptionROTVerticalPossible">Wrapper.Controllable#CONTROLLABLE.OptionROTVerticalPossible</a></li>
|
||||
</ul>
|
||||
<p>A GROUP is a <a href="Controllable.html">Controllable</a>. See the <a href="Controllable.html">Controllable</a> option methods section for a description of the option methods.</p>
|
||||
|
||||
<h2>1.5) GROUP Zone validation methods</h2>
|
||||
|
||||
<p>The group can be validated whether it is completely, partly or not within a <a href="Zone.html">Zone</a>.
|
||||
Use the following Zone validation methods on the group:</p>
|
||||
|
||||
@@ -236,6 +137,16 @@ Use the following Zone validation methods on the group:</p>
|
||||
|
||||
<p>The zone can be of any <a href="Zone.html">Zone</a> class derived from <a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a>. So, these methods are polymorphic to the zones tested on.</p>
|
||||
|
||||
<h2>1.6) GROUP AI methods</h2>
|
||||
|
||||
<p>A GROUP has AI methods to control the AI activation.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(GROUP).SetAIOnOff">GROUP.SetAIOnOff</a>(): Turns the GROUP AI On or Off.</li>
|
||||
<li><a href="##(GROUP).SetAIOn">GROUP.SetAIOn</a>(): Turns the GROUP AI On.</li>
|
||||
<li><a href="##(GROUP).SetAIOff">GROUP.SetAIOff</a>(): Turns the GROUP AI Off.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -506,6 +417,24 @@ Use the following Zone validation methods on the group:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).Respawn">GROUP:Respawn(Template)</a></td>
|
||||
<td class="summary">
|
||||
<p>Respawn the <a href="GROUP.html">GROUP</a> using a (tweaked) template of the Group.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOff">GROUP:SetAIOff()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI Off for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOn">GROUP:SetAIOn()</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI On for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(GROUP).SetAIOnOff">GROUP:SetAIOnOff(OnOff)</a></td>
|
||||
<td class="summary">
|
||||
<p>Turns the AI On or Off for the GROUP.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1493,6 +1422,69 @@ The template of the Group retrieved with GROUP:GetTemplate()</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOff" >
|
||||
<strong>GROUP:SetAIOff()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI Off for the GROUP.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOn" >
|
||||
<strong>GROUP:SetAIOn()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI On for the GROUP.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetAIOnOff" >
|
||||
<strong>GROUP:SetAIOnOff(OnOff)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Turns the AI On or Off for the GROUP.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#boolean OnOff </em></code>:
|
||||
The value true turns the AI On, the value false turns the AI Off.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(GROUP)">#GROUP</a>:</em>
|
||||
The GROUP.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(GROUP).SetTemplateCoalition" >
|
||||
<strong>GROUP:SetTemplateCoalition(CoalitionID, Template)</strong>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user