MOOSE/docs/Documentation/Mission.html
FlightControl 62b668029b Updates
2017-02-14 08:49:59 +01:00

2340 lines
50 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="Menu.html">Menu</a></li>
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li>Mission</li>
<li><a href="Movement.html">Movement</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="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><a href="Spawn.html">Spawn</a></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>Mission</code></h1>
<p>A MISSION is the main owner of a Mission orchestration within MOOSE .</p>
<p>The Mission framework orchestrates <a href="CLIENT.html">CLIENT</a>s, <a href="TASK.html">TASK</a>s, <a href="STAGE.html">STAGE</a>s etc.
A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MISSION.html">MISSION</a> through the function <a href="AddClient.html">AddClient</a>. A <a href="TASK.html">TASK</a> needs to be registered within the <a href="MISSION.html">MISSION</a> through the function <a href="AddTask.html">AddTask</a>.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#MISSION">MISSION</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MISSIONSCHEDULER">MISSIONSCHEDULER</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#_TransportExecuteStage">_TransportExecuteStage</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(MISSION)">Type <code>MISSION</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).AbortUnit">MISSION:AbortUnit(PlayerUnit)</a></td>
<td class="summary">
<p>Aborts a PlayerUnit from the Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).AddClient">MISSION.AddClient(CLIENT, self, Client)</a></td>
<td class="summary">
<p>Register a new <a href="CLIENT.html">CLIENT</a> to participate within the mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).AddGoalFunction">MISSION.AddGoalFunction(function, self, GoalFunction)</a></td>
<td class="summary">
<p>Add a goal function to a MISSION.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).AddScoring">MISSION:AddScoring(Scoring)</a></td>
<td class="summary">
<p>Add a scoring to the mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).AddTask">MISSION:AddTask(Task)</a></td>
<td class="summary">
<p>Register a <a href="Task.html">Task</a> to be completed within the <a href="Mission.html">Mission</a>.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ClassName">MISSION.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ClearMissionMenu">MISSION:ClearMissionMenu()</a></td>
<td class="summary">
<p>Clears the mission menu for the coalition.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Completed">MISSION:Completed()</a></td>
<td class="summary">
<p>Set a Mission to completed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).CrashUnit">MISSION:CrashUnit(PlayerUnit)</a></td>
<td class="summary">
<p>Handles a crash of a PlayerUnit from the Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).FAILED">MISSION.FAILED</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Failed">MISSION:Failed()</a></td>
<td class="summary">
<p>Set a Mission to failed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).FindClient">MISSION.FindClient(CLIENT, self, ClientName)</a></td>
<td class="summary">
<p>Find a <a href="CLIENT.html">CLIENT</a> object within the <a href="MISSION.html">MISSION</a> by its ClientName.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetCommandCenter">MISSION:GetCommandCenter()</a></td>
<td class="summary">
<p>Gets the COMMANDCENTER.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetGroups">MISSION:GetGroups()</a></td>
<td class="summary">
<p>Get the groups for which TASKS are given in the mission</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetMissionMenu">MISSION:GetMissionMenu(TaskGroup)</a></td>
<td class="summary">
<p>Gets the mission menu for the coalition.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetName">MISSION:GetName()</a></td>
<td class="summary">
<p>Gets the mission name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetNextTaskID">MISSION:GetNextTaskID(Task)</a></td>
<td class="summary">
<p>Return the next <a href="Task.html">Task</a> ID to be completed within the <a href="Mission.html">Mission</a>. </p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetScoring">MISSION:GetScoring()</a></td>
<td class="summary">
<p>Get the scoring object of a mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetTask">MISSION.GetTask(TaskName, self)</a></td>
<td class="summary">
<p>Get the TASK identified by the TaskNumber from the Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GetTasks">MISSION:GetTasks()</a></td>
<td class="summary">
<p>Get all the TASKs from the Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).GoalFunction">MISSION.GoalFunction</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).HasGroup">MISSION:HasGroup(TaskGroup)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).IsCompleted">MISSION:IsCompleted()</a></td>
<td class="summary">
<p>Returns if a Mission has completed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).IsFailed">MISSION:IsFailed()</a></td>
<td class="summary">
<p>Returns if a Mission has failed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).IsOngoing">MISSION:IsOngoing()</a></td>
<td class="summary">
<p>Returns if a Mission is ongoing.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).IsPending">MISSION:IsPending()</a></td>
<td class="summary">
<p>Returns if a Mission is pending.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).JoinUnit">MISSION:JoinUnit(PlayerUnit, PlayerGroup)</a></td>
<td class="summary">
<p>Add a Unit to join the Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionBriefing">MISSION.MissionBriefing</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionCoalition">MISSION.MissionCoalition</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionMenu">MISSION.MissionMenu</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionProgressTrigger">MISSION.MissionProgressTrigger</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionReportFlash">MISSION.MissionReportFlash</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionReportShow">MISSION.MissionReportShow</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionReportTrigger">MISSION.MissionReportTrigger</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionStatus">MISSION.MissionStatus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionTimeInterval">MISSION.MissionTimeInterval</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Name">MISSION.Name</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).New">MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition)</a></td>
<td class="summary">
<p>This is the main MISSION declaration method.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Ongoing">MISSION:Ongoing()</a></td>
<td class="summary">
<p>Set a Mission to ongoing.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Pending">MISSION:Pending()</a></td>
<td class="summary">
<p>Set a Mission to pending.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).REPEAT">MISSION.REPEAT</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).RemoveMenu">MISSION:RemoveMenu()</a></td>
<td class="summary">
<p>Removes the Planned Task menu.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).RemoveTask">MISSION:RemoveTask(Task)</a></td>
<td class="summary">
<p>Removes a <a href="Task.html">Task</a> to be completed within the <a href="Mission.html">Mission</a>.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).RemoveTaskMenu">MISSION:RemoveTaskMenu(Task)</a></td>
<td class="summary">
<p>Removes a Task menu.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ReportDetails">MISSION:ReportDetails()</a></td>
<td class="summary">
<p>Create a detailed report of the Mission, listing all the details of the Task.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ReportOverview">MISSION:ReportOverview()</a></td>
<td class="summary">
<p>Create a overview report of the Mission (multiple lines).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ReportSummary">MISSION:ReportSummary()</a></td>
<td class="summary">
<p>Create a summary report of the Mission (one line).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).ReportToAll">MISSION:ReportToAll()</a></td>
<td class="summary">
<p>Report the status of all MISSIONs to all active Clients.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).SUCCESS">MISSION.SUCCESS</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).Scoring">MISSION.Scoring</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).SetAssignedMenu">MISSION:SetAssignedMenu(Task, MenuText)</a></td>
<td class="summary">
<p>Sets the Assigned Task menu.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).SetMenu">MISSION:SetMenu()</a></td>
<td class="summary">
<p>Sets the Planned Task menu.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).StatusToClients">MISSION:StatusToClients()</a></td>
<td class="summary">
<p>Send the status of the MISSION to all Clients.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).TaskCategoryMenus">MISSION.TaskCategoryMenus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).TaskMenus">MISSION.TaskMenus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).TaskTypeMenus">MISSION.TaskTypeMenus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION)._ActiveTasks">MISSION._ActiveTasks</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION)._Clients">MISSION._Clients</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION)._GoalTasks">MISSION._GoalTasks</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).onbeforeComplete">MISSION:onbeforeComplete(Event, From, To)</a></td>
<td class="summary">
<p>FSM function for a MISSION</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).onenterCompleted">MISSION:onenterCompleted(Event, From, To)</a></td>
<td class="summary">
<p>FSM function for a MISSION</p>
</td>
</tr>
</table>
<h2><a id="#(MISSIONSCHEDULER)">Type <code>MISSIONSCHEDULER</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).AddMission">MISSIONSCHEDULER.AddMission(Mission)</a></td>
<td class="summary">
<p>This is the main MISSION declaration method.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).FindMission">MISSIONSCHEDULER.FindMission(MissionName)</a></td>
<td class="summary">
<p>Find a MISSION within the MISSIONSCHEDULER.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).MissionCount">MISSIONSCHEDULER.MissionCount</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Missions">MISSIONSCHEDULER.Missions</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).RemoveMission">MISSIONSCHEDULER.RemoveMission(MissionName)</a></td>
<td class="summary">
<p>Remove a MISSION from the MISSIONSCHEDULER.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).ReportMenu">MISSIONSCHEDULER.ReportMenu()</a></td>
<td class="summary">
<p>Enables a MENU option in the communications menu under F10 to control the status of the active missions.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).ReportMissionsFlash">MISSIONSCHEDULER.ReportMissionsFlash(TimeInterval)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).ReportMissionsHide">MISSIONSCHEDULER.ReportMissionsHide(Prm)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).ReportMissionsShow">MISSIONSCHEDULER.ReportMissionsShow()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Scheduler">MISSIONSCHEDULER.Scheduler()</a></td>
<td class="summary">
<p>This is the main MISSIONSCHEDULER Scheduler function.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).SchedulerId">MISSIONSCHEDULER.SchedulerId</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Scoring">MISSIONSCHEDULER:Scoring(Scoring)</a></td>
<td class="summary">
<p>Adds a mission scoring to the game.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Start">MISSIONSCHEDULER.Start()</a></td>
<td class="summary">
<p>Start the MISSIONSCHEDULER.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Stop">MISSIONSCHEDULER.Stop()</a></td>
<td class="summary">
<p>Stop the MISSIONSCHEDULER.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Time">MISSIONSCHEDULER:Time(TimeSeconds, TimeIntervalShow, TimeShow)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).TimeIntervalCount">MISSIONSCHEDULER.TimeIntervalCount</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).TimeIntervalShow">MISSIONSCHEDULER.TimeIntervalShow</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).TimeSeconds">MISSIONSCHEDULER.TimeSeconds</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).TimeShow">MISSIONSCHEDULER.TimeShow</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(MISSION)">#MISSION</a></em>
<a id="MISSION" >
<strong>MISSION</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MISSIONSCHEDULER)">#MISSIONSCHEDULER</a></em>
<a id="MISSIONSCHEDULER" >
<strong>MISSIONSCHEDULER</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="_TransportExecuteStage" >
<strong>_TransportExecuteStage</strong>
</a>
</dt>
<dd>
<p> _TransportExecuteStage: Defines the different stages of Transport unload/load execution. This table is internal and is used to control the validity of Transport load/unload timing.</p>
<ul>
<li>_TransportExecuteStage.EXECUTING</li>
<li>_TransportExecuteStage.SUCCESS</li>
<li>_TransportExecuteStage.FAILED</li>
</ul>
<p>--</p>
</dd>
</dl>
<h2><a id="#(Mission)" >Type <code>Mission</code></a></h2>
<h2><a id="#(MISSION)" >Type <code>MISSION</code></a></h2>
<p>The MISSION class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MISSION).AbortUnit" >
<strong>MISSION:AbortUnit(PlayerUnit)</strong>
</a>
</dt>
<dd>
<p>Aborts a PlayerUnit from the Mission.</p>
<p>For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned.
If the Unit was not part of a Task in the Mission, false is returned.
If the Unit is part of a Task in the Mission, true is returned.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> PlayerUnit </em></code>:
The CLIENT or UNIT of the Player joining the Mission.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true if Unit is part of a Task in the Mission.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).AddClient" >
<strong>MISSION.AddClient(CLIENT, self, Client)</strong>
</a>
</dt>
<dd>
<p>Register a new <a href="CLIENT.html">CLIENT</a> to participate within the mission.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> CLIENT </em></code>:
Client is the <a href="CLIENT.html">CLIENT</a> object. The object must have been instantiated with <a href="CLIENT.html">CLIENT</a>.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> Client </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>CLIENT</p>
<h3>Usage:</h3>
<pre class="example"><code>Add a number of Client objects to the Mission.
Mission:AddClient( CLIENT:FindByName( 'US UH-1H*HOT-Deploy Troops 1', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() )
Mission:AddClient( CLIENT:FindByName( 'US UH-1H*RAMP-Deploy Troops 3', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() )
Mission:AddClient( CLIENT:FindByName( 'US UH-1H*HOT-Deploy Troops 2', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() )
Mission:AddClient( CLIENT:FindByName( 'US UH-1H*RAMP-Deploy Troops 4', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).AddGoalFunction" >
<strong>MISSION.AddGoalFunction(function, self, GoalFunction)</strong>
</a>
</dt>
<dd>
<p>Add a goal function to a MISSION.</p>
<p>Goal functions are called when a <a href="TASK.html">TASK</a> within a mission has been completed.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> function </em></code>:
GoalFunction is the function defined by the mission designer to evaluate whether a certain goal has been reached after a <a href="TASK.html">TASK</a> finishes within the <a href="MISSION.html">MISSION</a>. A GoalFunction must accept 2 parameters: Mission, Client, which contains the current MISSION object and the current CLIENT object respectively.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> GoalFunction </em></code>: </p>
</li>
</ul>
<h3>Usage:</h3>
<pre class="example"><code> PatriotActivation = {
{ "US SAM Patriot Zerti", false },
{ "US SAM Patriot Zegduleti", false },
{ "US SAM Patriot Gvleti", false }
}
function DeployPatriotTroopsGoal( Mission, Client )
-- Check if the cargo is all deployed for mission success.
for CargoID, CargoData in pairs( Mission._Cargos ) do
if Group.getByName( CargoData.CargoGroupName ) then
CargoGroup = Group.getByName( CargoData.CargoGroupName )
if CargoGroup then
-- Check if the cargo is ready to activate
CurrentLandingZoneID = routines.IsUnitInZones( CargoGroup:getUnits()[1], Mission:GetTask( 2 ).LandingZones ) -- The second task is the Deploytask to measure mission success upon
if CurrentLandingZoneID then
if PatriotActivation[CurrentLandingZoneID][2] == false then
-- Now check if this is a new Mission Task to be completed...
trigger.action.setGroupAIOn( Group.getByName( PatriotActivation[CurrentLandingZoneID][1] ) )
PatriotActivation[CurrentLandingZoneID][2] = true
MessageToBlue( "Mission Command: Message to all airborne units! The " .. PatriotActivation[CurrentLandingZoneID][1] .. " is armed. Our air defenses are now stronger.", 60, "BLUE/PatriotDefense" )
MessageToRed( "Mission Command: Our satellite systems are detecting additional NATO air defenses. To all airborne units: Take care!!!", 60, "RED/PatriotDefense" )
Mission:GetTask( 2 ):AddGoalCompletion( "Patriots activated", PatriotActivation[CurrentLandingZoneID][1], 1 ) -- Register Patriot activation as part of mission goal.
end
end
end
end
end
end
local Mission = MISSIONSCHEDULER.AddMission( 'NATO Transport Troops', 'Operational', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.', 'NATO' )
Mission:AddGoalFunction( DeployPatriotTroopsGoal )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).AddScoring" >
<strong>MISSION:AddScoring(Scoring)</strong>
</a>
</dt>
<dd>
<p>Add a scoring to the mission.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Scoring </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).AddTask" >
<strong>MISSION:AddTask(Task)</strong>
</a>
</dt>
<dd>
<p>Register a <a href="Task.html">Task</a> to be completed within the <a href="Mission.html">Mission</a>.</p>
<p>Note that there can be multiple <a href="Task.html">Task</a>s registered to be completed.
Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a> Task </em></code>:
is the <a href="Task.html">Task</a> object.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a>:</em>
The task added.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MISSION).ClassName" >
<strong>MISSION.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).ClearMissionMenu" >
<strong>MISSION:ClearMissionMenu()</strong>
</a>
</dt>
<dd>
<p>Clears the mission menu for the coalition.</p>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).Completed" >
<strong>MISSION:Completed()</strong>
</a>
</dt>
<dd>
<p>Set a Mission to completed.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).CrashUnit" >
<strong>MISSION:CrashUnit(PlayerUnit)</strong>
</a>
</dt>
<dd>
<p>Handles a crash of a PlayerUnit from the Mission.</p>
<p>For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned.
If the Unit was not part of a Task in the Mission, false is returned.
If the Unit is part of a Task in the Mission, true is returned.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> PlayerUnit </em></code>:
The CLIENT or UNIT of the Player crashing.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true if Unit is part of a Task in the Mission.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).FAILED" >
<strong>MISSION.FAILED</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).Failed" >
<strong>MISSION:Failed()</strong>
</a>
</dt>
<dd>
<p>Set a Mission to failed.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).FindClient" >
<strong>MISSION.FindClient(CLIENT, self, ClientName)</strong>
</a>
</dt>
<dd>
<p>Find a <a href="CLIENT.html">CLIENT</a> object within the <a href="MISSION.html">MISSION</a> by its ClientName.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> CLIENT </em></code>:
ClientName is a string defining the Client Group as defined within the ME.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> ClientName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>CLIENT</p>
<h3>Usage:</h3>
<pre class="example"><code>-- Seach for Client "Bomber" within the Mission.
local BomberClient = Mission:FindClient( "Bomber" )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetCommandCenter" >
<strong>MISSION:GetCommandCenter()</strong>
</a>
</dt>
<dd>
<p>Gets the COMMANDCENTER.</p>
<h3>Return value</h3>
<p><em><a href="Tasking.CommandCenter.html##(COMMANDCENTER)">Tasking.CommandCenter#COMMANDCENTER</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetGroups" >
<strong>MISSION:GetGroups()</strong>
</a>
</dt>
<dd>
<p>Get the groups for which TASKS are given in the mission</p>
<h3>Return value</h3>
<p><em><a href="Core.Set.html##(SET_GROUP)">Core.Set#SET_GROUP</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetMissionMenu" >
<strong>MISSION:GetMissionMenu(TaskGroup)</strong>
</a>
</dt>
<dd>
<p>Gets the mission menu for the coalition.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> TaskGroup </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Menu.html##(MENU_COALITION)">Core.Menu#MENU_COALITION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetName" >
<strong>MISSION:GetName()</strong>
</a>
</dt>
<dd>
<p>Gets the mission name.</p>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetNextTaskID" >
<strong>MISSION:GetNextTaskID(Task)</strong>
</a>
</dt>
<dd>
<p>Return the next <a href="Task.html">Task</a> ID to be completed within the <a href="Mission.html">Mission</a>. </p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a> Task </em></code>:
is the <a href="Task.html">Task</a> object.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a>:</em>
The task added.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetScoring" >
<strong>MISSION:GetScoring()</strong>
</a>
</dt>
<dd>
<p>Get the scoring object of a mission.</p>
<h3>Return value</h3>
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
Scoring</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetTask" >
<strong>MISSION.GetTask(TaskName, self)</strong>
</a>
</dt>
<dd>
<p>Get the TASK identified by the TaskNumber from the Mission.</p>
<p>This function is useful in GoalFunctions.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string TaskName </em></code>:
The Name of the <a href="Task.html">Task</a> within the <a href="Mission.html">Mission</a>.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a>:</em>
The Task</p>
</li>
<li>
<p><em>#nil:</em>
Returns nil if no task was found.</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GetTasks" >
<strong>MISSION:GetTasks()</strong>
</a>
</dt>
<dd>
<p>Get all the TASKs from the Mission.</p>
<p>This function is useful in GoalFunctions.</p>
<h3>Return value</h3>
<p>{TASK,...} Structure of TASKS with the <a href="TASK.html">TASK</a> number as the key.</p>
<h3>Usage:</h3>
<pre class="example"><code>-- Get Tasks from the Mission.
Tasks = Mission:GetTasks()
env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).GoalFunction" >
<strong>MISSION.GoalFunction</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).HasGroup" >
<strong>MISSION:HasGroup(TaskGroup)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> TaskGroup </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).IsCompleted" >
<strong>MISSION:IsCompleted()</strong>
</a>
</dt>
<dd>
<p>Returns if a Mission has completed.</p>
<h3>Return value</h3>
<p>bool</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).IsFailed" >
<strong>MISSION:IsFailed()</strong>
</a>
</dt>
<dd>
<p>Returns if a Mission has failed.</p>
<p>treturn bool</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).IsOngoing" >
<strong>MISSION:IsOngoing()</strong>
</a>
</dt>
<dd>
<p>Returns if a Mission is ongoing.</p>
<p>treturn bool</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).IsPending" >
<strong>MISSION:IsPending()</strong>
</a>
</dt>
<dd>
<p>Returns if a Mission is pending.</p>
<p>treturn bool</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).JoinUnit" >
<strong>MISSION:JoinUnit(PlayerUnit, PlayerGroup)</strong>
</a>
</dt>
<dd>
<p>Add a Unit to join the Mission.</p>
<p>For each Task within the Mission, the Unit is joined with the Task.
If the Unit was not part of a Task in the Mission, false is returned.
If the Unit is part of a Task in the Mission, true is returned.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> PlayerUnit </em></code>:
The CLIENT or UNIT of the Player joining the Mission.</p>
</li>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> PlayerGroup </em></code>:
The GROUP of the player joining the Mission.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true if Unit is part of a Task in the Mission.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MISSION).MissionBriefing" >
<strong>MISSION.MissionBriefing</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MISSION).MissionCoalition" >
<strong>MISSION.MissionCoalition</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Core.Menu.html##(MENU_COALITION)">Core.Menu#MENU_COALITION</a></em>
<a id="#(MISSION).MissionMenu" >
<strong>MISSION.MissionMenu</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).MissionProgressTrigger" >
<strong>MISSION.MissionProgressTrigger</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(MISSION).MissionReportFlash" >
<strong>MISSION.MissionReportFlash</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(MISSION).MissionReportShow" >
<strong>MISSION.MissionReportShow</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).MissionReportTrigger" >
<strong>MISSION.MissionReportTrigger</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MISSION).MissionStatus" >
<strong>MISSION.MissionStatus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).MissionTimeInterval" >
<strong>MISSION.MissionTimeInterval</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MISSION).Name" >
<strong>MISSION.Name</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).New" >
<strong>MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition)</strong>
</a>
</dt>
<dd>
<p>This is the main MISSION declaration method.</p>
<p>Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Tasking.CommandCenter.html##(COMMANDCENTER)">Tasking.CommandCenter#COMMANDCENTER</a> CommandCenter </em></code>: </p>
</li>
<li>
<p><code><em>#string MissionName </em></code>:
is the name of the mission. This name will be used to reference the status of each mission by the players.</p>
</li>
<li>
<p><code><em>#string MissionPriority </em></code>:
is a string indicating the "priority" of the Mission. f.e. "Primary", "Secondary" or "First", "Second". It is free format and up to the Mission designer to choose. There are no rules behind this field.</p>
</li>
<li>
<p><code><em>#string MissionBriefing </em></code>:
is a string indicating the mission briefing to be shown when a player joins a <a href="CLIENT.html">CLIENT</a>.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSCoalitionWrapper.Object.html##(coalition)">Dcs.DCSCoalitionWrapper.Object#coalition</a> MissionCoalition </em></code>:
is a string indicating the coalition or party to which this mission belongs to. It is free format and can be chosen freely by the mission designer. Note that this field is not to be confused with the coalition concept of the ME. Examples of a Mission Coalition could be "NATO", "CCCP", "Intruders", "Terrorists"...</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).Ongoing" >
<strong>MISSION:Ongoing()</strong>
</a>
</dt>
<dd>
<p>Set a Mission to ongoing.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).Pending" >
<strong>MISSION:Pending()</strong>
</a>
</dt>
<dd>
<p>Set a Mission to pending.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).REPEAT" >
<strong>MISSION.REPEAT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).RemoveMenu" >
<strong>MISSION:RemoveMenu()</strong>
</a>
</dt>
<dd>
<p>Removes the Planned Task menu.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).RemoveTask" >
<strong>MISSION:RemoveTask(Task)</strong>
</a>
</dt>
<dd>
<p>Removes a <a href="Task.html">Task</a> to be completed within the <a href="Mission.html">Mission</a>.</p>
<p>Note that there can be multiple <a href="Task.html">Task</a>s registered to be completed.
Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a> Task </em></code>:
is the <a href="Task.html">Task</a> object.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em>
The cleaned Task reference.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).RemoveTaskMenu" >
<strong>MISSION:RemoveTaskMenu(Task)</strong>
</a>
</dt>
<dd>
<p>Removes a Task menu.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a> Task </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).ReportDetails" >
<strong>MISSION:ReportDetails()</strong>
</a>
</dt>
<dd>
<p>Create a detailed report of the Mission, listing all the details of the Task.</p>
<h3>Return value</h3>
<p><em>#string:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).ReportOverview" >
<strong>MISSION:ReportOverview()</strong>
</a>
</dt>
<dd>
<p>Create a overview report of the Mission (multiple lines).</p>
<h3>Return value</h3>
<p><em>#string:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).ReportSummary" >
<strong>MISSION:ReportSummary()</strong>
</a>
</dt>
<dd>
<p>Create a summary report of the Mission (one line).</p>
<h3>Return value</h3>
<p><em>#string:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).ReportToAll" >
<strong>MISSION:ReportToAll()</strong>
</a>
</dt>
<dd>
<p>Report the status of all MISSIONs to all active Clients.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSION).SUCCESS" >
<strong>MISSION.SUCCESS</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION).Scoring" >
<strong>MISSION.Scoring</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).SetAssignedMenu" >
<strong>MISSION:SetAssignedMenu(Task, MenuText)</strong>
</a>
</dt>
<dd>
<p>Sets the Assigned Task menu.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Tasking.Task.html##(TASK)">Tasking.Task#TASK</a> Task </em></code>: </p>
</li>
<li>
<p><code><em>#string MenuText </em></code>:
The menu text.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MISSION)">#MISSION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).SetMenu" >
<strong>MISSION:SetMenu()</strong>
</a>
</dt>
<dd>
<p>Sets the Planned Task menu.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).StatusToClients" >
<strong>MISSION:StatusToClients()</strong>
</a>
</dt>
<dd>
<p>Send the status of the MISSION to all Clients.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION).TaskCategoryMenus" >
<strong>MISSION.TaskCategoryMenus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION).TaskMenus" >
<strong>MISSION.TaskMenus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION).TaskTypeMenus" >
<strong>MISSION.TaskTypeMenus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION)._ActiveTasks" >
<strong>MISSION._ActiveTasks</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MISSION.Clients)">#MISSION.Clients</a></em>
<a id="#(MISSION)._Clients" >
<strong>MISSION._Clients</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSION)._GoalTasks" >
<strong>MISSION._GoalTasks</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).onbeforeComplete" >
<strong>MISSION:onbeforeComplete(Event, From, To)</strong>
</a>
</dt>
<dd>
<p>FSM function for a MISSION</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).onenterCompleted" >
<strong>MISSION:onenterCompleted(Event, From, To)</strong>
</a>
</dt>
<dd>
<p>FSM function for a MISSION</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(MISSION.Clients)" >Type <code>MISSION.Clients</code></a></h2>
<h2><a id="#(MISSIONSCHEDULER)" >Type <code>MISSIONSCHEDULER</code></a></h2>
<p>The MISSIONSCHEDULER is an OBJECT and is the main scheduler of ALL active MISSIONs registered within this scheduler.</p>
<p>It's workings are considered internal and is automatically created when the Mission.lua file is included.</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).AddMission" >
<strong>MISSIONSCHEDULER.AddMission(Mission)</strong>
</a>
</dt>
<dd>
<p>This is the main MISSION declaration method.</p>
<p>Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Mission </em></code>:
is the MISSION object instantiated by <a href="MISSION.html">MISSION</a>.</p>
</li>
</ul>
<h3>Return value</h3>
<p>MISSION</p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Declare a mission.
Mission = MISSION:New( 'Russia Transport Troops SA-6',
'Operational',
'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.',
'Russia' )
MISSIONSCHEDULER:AddMission( Mission )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).FindMission" >
<strong>MISSIONSCHEDULER.FindMission(MissionName)</strong>
</a>
</dt>
<dd>
<p>Find a MISSION within the MISSIONSCHEDULER.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> MissionName </em></code>:
is the name of the MISSION given at declaration using <a href="AddMission.html">AddMission</a>.</p>
</li>
</ul>
<h3>Return value</h3>
<p>MISSION</p>
<h3>Usage:</h3>
<pre class="example"><code>-- Declare a mission.
Mission = MISSION:New( 'Russia Transport Troops SA-6',
'Operational',
'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.',
'Russia' )
MISSIONSCHEDULER:AddMission( Mission )
-- Now find the Mission.
MissionFind = MISSIONSCHEDULER:FindMission( 'Russia Transport Troops SA-6' )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSIONSCHEDULER).MissionCount" >
<strong>MISSIONSCHEDULER.MissionCount</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MISSIONSCHEDULER.MISSIONS)">#MISSIONSCHEDULER.MISSIONS</a></em>
<a id="#(MISSIONSCHEDULER).Missions" >
<strong>MISSIONSCHEDULER.Missions</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).RemoveMission" >
<strong>MISSIONSCHEDULER.RemoveMission(MissionName)</strong>
</a>
</dt>
<dd>
<p>Remove a MISSION from the MISSIONSCHEDULER.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> MissionName </em></code>:
is the name of the MISSION given at declaration using <a href="AddMission.html">AddMission</a>.</p>
</li>
</ul>
<h3>Usage:</h3>
<pre class="example"><code>-- Declare a mission.
Mission = MISSION:New( 'Russia Transport Troops SA-6',
'Operational',
'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.',
'Russia' )
MISSIONSCHEDULER:AddMission( Mission )
-- Now remove the Mission.
MISSIONSCHEDULER:RemoveMission( 'Russia Transport Troops SA-6' )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).ReportMenu" >
<strong>MISSIONSCHEDULER.ReportMenu()</strong>
</a>
</dt>
<dd>
<p>Enables a MENU option in the communications menu under F10 to control the status of the active missions.</p>
<p>This function should be called only once when starting the MISSIONSCHEDULER.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).ReportMissionsFlash" >
<strong>MISSIONSCHEDULER.ReportMissionsFlash(TimeInterval)</strong>
</a>
</dt>
<dd>
<p> Internal function used by the MISSIONSCHEDULER menu.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> TimeInterval </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).ReportMissionsHide" >
<strong>MISSIONSCHEDULER.ReportMissionsHide(Prm)</strong>
</a>
</dt>
<dd>
<p> Internal function used by the MISSIONSCHEDULER menu.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Prm </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).ReportMissionsShow" >
<strong>MISSIONSCHEDULER.ReportMissionsShow()</strong>
</a>
</dt>
<dd>
<p> Internal function used by the MISSIONSCHEDULER menu.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).Scheduler" >
<strong>MISSIONSCHEDULER.Scheduler()</strong>
</a>
</dt>
<dd>
<p>This is the main MISSIONSCHEDULER Scheduler function.</p>
<p>It is considered internal and is automatically created when the Mission.lua file is included.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MISSIONSCHEDULER).SchedulerId" >
<strong>MISSIONSCHEDULER.SchedulerId</strong>
</a>
</dt>
<dd>
<p>MISSIONSCHEDULER.SchedulerId = routines.scheduleFunction( MISSIONSCHEDULER.Scheduler, { }, 0, 2 )</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).Scoring" >
<strong>MISSIONSCHEDULER:Scoring(Scoring)</strong>
</a>
</dt>
<dd>
<p>Adds a mission scoring to the game.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Scoring </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).Start" >
<strong>MISSIONSCHEDULER.Start()</strong>
</a>
</dt>
<dd>
<p>Start the MISSIONSCHEDULER.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).Stop" >
<strong>MISSIONSCHEDULER.Stop()</strong>
</a>
</dt>
<dd>
<p>Stop the MISSIONSCHEDULER.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSIONSCHEDULER).Time" >
<strong>MISSIONSCHEDULER:Time(TimeSeconds, TimeIntervalShow, TimeShow)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> TimeSeconds </em></code>: </p>
</li>
<li>
<p><code><em> TimeIntervalShow </em></code>: </p>
</li>
<li>
<p><code><em> TimeShow </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSIONSCHEDULER).TimeIntervalCount" >
<strong>MISSIONSCHEDULER.TimeIntervalCount</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSIONSCHEDULER).TimeIntervalShow" >
<strong>MISSIONSCHEDULER.TimeIntervalShow</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSIONSCHEDULER).TimeSeconds" >
<strong>MISSIONSCHEDULER.TimeSeconds</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MISSIONSCHEDULER).TimeShow" >
<strong>MISSIONSCHEDULER.TimeShow</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(MISSIONSCHEDULER.MISSIONS)" >Type <code>MISSIONSCHEDULER.MISSIONS</code></a></h2>
<h2><a id="#(SCORING)" >Type <code>SCORING</code></a></h2>
</div>
</div>
</body>
</html>