mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
550 lines
15 KiB
HTML
550 lines
15 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="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="DCSAirbase.html">DCSAirbase</a></li>
|
|
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
|
<li><a href="DCSController.html">DCSController</a></li>
|
|
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
|
<li><a href="DCSObject.html">DCSObject</a></li>
|
|
<li><a href="DCSTask.html">DCSTask</a></li>
|
|
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
|
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
|
<li><a href="DCStimer.html">DCStimer</a></li>
|
|
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
|
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
|
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
|
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
|
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
|
<li><a href="Group.html">Group</a></li>
|
|
<li><a href="MISSION.html">MISSION</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
|
<li><a href="Menu.html">Menu</a></li>
|
|
<li>Message</li>
|
|
<li><a href="NOTASK.html">NOTASK</a></li>
|
|
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
|
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
|
<li><a href="STAGE.html">STAGE</a></li>
|
|
<li><a href="Sead.html">Sead</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="StaticObject.html">StaticObject</a></li>
|
|
<li><a href="TASK.html">TASK</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="env.html">env</a></li>
|
|
<li><a href="land.html">land</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>Message</code></h1>
|
|
|
|
<p>Message System to display Messages for Clients and Coalitions or All.</p>
|
|
|
|
|
|
<p>Messages are grouped on the display panel per Category to improve readability for the players.
|
|
Messages are shown on the display panel for an amount of seconds, and will then disappear.
|
|
Messages are identified by an ID. The messages with the same ID belonging to the same category will be overwritten if they were still being displayed on the display panel.
|
|
Messages are created with MESSAGE:<a href="New.html">New</a>().
|
|
Messages are sent to Clients with MESSAGE:<a href="ToClient.html">ToClient</a>().
|
|
Messages are sent to Coalitions with MESSAGE:<a href="ToCoalition.html">ToCoalition</a>().
|
|
Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().</p>
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MESSAGE">MESSAGE</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MESSAGEQUEUE">MESSAGEQUEUE</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(MESSAGE)">Type <code>MESSAGE</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ClassName">MESSAGE.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).MessageCategory">MESSAGE.MessageCategory</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).MessageID">MESSAGE.MessageID</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).New">MESSAGE:New(MessageText, MessageCategory, MessageDuration, MessageID)</a></td>
|
|
<td class="summary">
|
|
<p>Creates a new MESSAGE object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToAll">MESSAGE:ToAll()</a></td>
|
|
<td class="summary">
|
|
<p>Sends a MESSAGE to all players. </p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToBlue">MESSAGE:ToBlue()</a></td>
|
|
<td class="summary">
|
|
<p>Sends a MESSAGE to the Blue coalition.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToClient">MESSAGE:ToClient(Client)</a></td>
|
|
<td class="summary">
|
|
<p>Sends a MESSAGE to a Client Group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToCoalition">MESSAGE:ToCoalition(CoalitionSide)</a></td>
|
|
<td class="summary">
|
|
<p>Sends a MESSAGE to a Coalition. </p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToRed">MESSAGE:ToRed()</a></td>
|
|
<td class="summary">
|
|
<p>Sends a MESSAGE to the Red Coalition. </p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a id="#(MESSAGEQUEUE)">Type <code>MESSAGEQUEUE</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).ClientGroups">MESSAGEQUEUE.ClientGroups</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).CoalitionSides">MESSAGEQUEUE.CoalitionSides</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).New">MESSAGEQUEUE:New(RefreshInterval)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE)._DisplayMessages">MESSAGEQUEUE:_DisplayMessages()</a></td>
|
|
<td class="summary">
|
|
<p>This function is called automatically by the MESSAGEQUEUE scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(MESSAGE)">#MESSAGE</a></em>
|
|
<a id="MESSAGE" >
|
|
<strong>MESSAGE</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(MESSAGEQUEUE)">#MESSAGEQUEUE</a></em>
|
|
<a id="MESSAGEQUEUE" >
|
|
<strong>MESSAGEQUEUE</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(Message)" >Type <code>Message</code></a></h2>
|
|
|
|
<h2><a id="#(MESSAGE)" >Type <code>MESSAGE</code></a></h2>
|
|
|
|
<p>The MESSAGE class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MESSAGE).ClassName" >
|
|
<strong>MESSAGE.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(MESSAGE).MessageCategory" >
|
|
<strong>MESSAGE.MessageCategory</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(MESSAGE).MessageID" >
|
|
<strong>MESSAGE.MessageID</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).New" >
|
|
<strong>MESSAGE:New(MessageText, MessageCategory, MessageDuration, MessageID)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Creates a new MESSAGE object.</p>
|
|
|
|
|
|
<p>Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions <a href="ToClient.html">ToClient</a> or <a href="ToCoalition.html">ToCoalition</a> or <a href="ToAll.html">ToAll</a> to send these Messages to the respective recipients.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string MessageText </em></code>:
|
|
is the text of the Message.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string MessageCategory </em></code>:
|
|
is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number MessageDuration </em></code>:
|
|
is a number in seconds of how long the MESSAGE should be shown on the display panel.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string MessageID </em></code>:
|
|
is a string expressing the ID of the Message.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Create a series of new Messages.
|
|
-- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
|
|
-- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
|
|
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
|
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
|
MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
|
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
|
MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
|
|
MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).ToAll" >
|
|
<strong>MESSAGE:ToAll()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sends a MESSAGE to all players. </p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Send a message created to all players.
|
|
MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
|
|
or
|
|
MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
|
|
or
|
|
MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
|
|
MessageAll:ToAll()</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).ToBlue" >
|
|
<strong>MESSAGE:ToBlue()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sends a MESSAGE to the Blue coalition.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Send a message created with the @{New} method to the BLUE coalition.
|
|
MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
|
|
or
|
|
MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
|
|
or
|
|
MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
|
MessageBLUE:ToBlue()</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).ToClient" >
|
|
<strong>MESSAGE:ToClient(Client)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sends a MESSAGE to a Client Group.</p>
|
|
|
|
|
|
<p>Note that the Group needs to be defined within the ME with the skillset "Client" or "Player".</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Client.html##(CLIENT)">Client#CLIENT</a> Client </em></code>:
|
|
is the Group of the Client.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Send the 2 messages created with the @{New} method to the Client Group.
|
|
-- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
|
|
ClientGroup = Group.getByName( "ClientGroup" )
|
|
|
|
MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
|
|
MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
|
|
or
|
|
MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
|
|
MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
|
|
or
|
|
MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
|
|
MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
|
|
MessageClient1:ToClient( ClientGroup )
|
|
MessageClient2:ToClient( ClientGroup )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).ToCoalition" >
|
|
<strong>MESSAGE:ToCoalition(CoalitionSide)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sends a MESSAGE to a Coalition. </p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> CoalitionSide </em></code>:
|
|
needs to be filled out by the defined structure of the standard scripting engine <a href="coalition.side.html">coalition.side</a>. </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Send a message created with the @{New} method to the RED coalition.
|
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
|
|
or
|
|
MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
|
|
or
|
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
|
MessageRED:ToCoalition( coalition.side.RED )</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGE).ToRed" >
|
|
<strong>MESSAGE:ToRed()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Sends a MESSAGE to the Red Coalition. </p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MESSAGE)">#MESSAGE</a>:</em></p>
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Send a message created with the @{New} method to the RED coalition.
|
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
|
|
or
|
|
MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
|
|
or
|
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
|
MessageRED:ToRed()</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MESSAGEQUEUE)" >Type <code>MESSAGEQUEUE</code></a></h2>
|
|
|
|
<p>The MESSAGEQUEUE class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MESSAGEQUEUE).ClientGroups" >
|
|
<strong>MESSAGEQUEUE.ClientGroups</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MESSAGEQUEUE).CoalitionSides" >
|
|
<strong>MESSAGEQUEUE.CoalitionSides</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGEQUEUE).New" >
|
|
<strong>MESSAGEQUEUE:New(RefreshInterval)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> RefreshInterval </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MESSAGEQUEUE)._DisplayMessages" >
|
|
<strong>MESSAGEQUEUE:_DisplayMessages()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>This function is called automatically by the MESSAGEQUEUE scheduler.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|