mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
1231 lines
34 KiB
HTML
1231 lines
34 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_A2A.html">AI_A2A</a></li>
|
|
<li><a href="AI_A2A_Cap.html">AI_A2A_Cap</a></li>
|
|
<li><a href="AI_A2A_Dispatcher.html">AI_A2A_Dispatcher</a></li>
|
|
<li><a href="AI_A2A_GCI.html">AI_A2A_GCI</a></li>
|
|
<li><a href="AI_A2A_Patrol.html">AI_A2A_Patrol</a></li>
|
|
<li><a href="AI_Bai.html">AI_Bai</a></li>
|
|
<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_Formation.html">AI_Formation</a></li>
|
|
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
|
<li><a href="ATC_Ground.html">ATC_Ground</a></li>
|
|
<li><a href="Account.html">Account</a></li>
|
|
<li><a href="Airbase.html">Airbase</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="DCSAirbase.html">DCSAirbase</a></li>
|
|
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
|
<li><a href="DCSCommand.html">DCSCommand</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="DCSVec3.html">DCSVec3</a></li>
|
|
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
|
<li><a href="DCSZone.html">DCSZone</a></li>
|
|
<li><a href="DCScountry.html">DCScountry</a></li>
|
|
<li><a href="DCStimer.html">DCStimer</a></li>
|
|
<li><a href="DCStrigger.html">DCStrigger</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Designate.html">Designate</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="Goal.html">Goal</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><a href="Mission.html">Mission</a></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="Protect.html">Protect</a></li>
|
|
<li>Radio</li>
|
|
<li><a href="Rat.html">Rat</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="Settings.html">Settings</a></li>
|
|
<li><a href="Smoke.html">Smoke</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
|
<li><a href="Spot.html">Spot</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="StaticObject.html">StaticObject</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="TaskZoneCapture.html">TaskZoneCapture</a></li>
|
|
<li><a href="Task_A2A.html">Task_A2A</a></li>
|
|
<li><a href="Task_A2A_Dispatcher.html">Task_A2A_Dispatcher</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
|
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="UserFlag.html">UserFlag</a></li>
|
|
<li><a href="UserSound.html">UserSound</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
<li><a href="Velocity.html">Velocity</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
|
|
<li><a href="ZoneGoal.html">ZoneGoal</a></li>
|
|
<li><a href="ZoneGoalCargo.html">ZoneGoalCargo</a></li>
|
|
<li><a href="ZoneGoalCoalition.html">ZoneGoalCoalition</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>Radio</code></h1>
|
|
|
|
<p><strong>Core</strong> -- The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...</p>
|
|
|
|
|
|
|
|
<p><img src="..\Presentations\RADIO\Dia1.JPG" alt="Banner Image"/></p>
|
|
|
|
<hr/>
|
|
|
|
<p>The Radio contains 2 classes : RADIO and BEACON</p>
|
|
|
|
<p>What are radio communications in DCS ?</p>
|
|
|
|
<ul>
|
|
<li>Radio transmissions consist of <strong>sound files</strong> that are broadcasted on a specific <strong>frequency</strong> (e.g. 115MHz) and <strong>modulation</strong> (e.g. AM),</li>
|
|
<li>They can be <strong>subtitled</strong> for a specific <strong>duration</strong>, the <strong>power</strong> in Watts of the transmiter's antenna can be set, and the transmission can be <strong>looped</strong>.</li>
|
|
</ul>
|
|
|
|
<p>How to supply DCS my own Sound Files ?</p>
|
|
|
|
<ul>
|
|
<li>Your sound files need to be encoded in <strong>.ogg</strong> or .wav,</li>
|
|
<li>Your sound files should be <strong>as tiny as possible</strong>. It is suggested you encode in .ogg with low bitrate and sampling settings,</li>
|
|
<li>They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),</li>
|
|
<li>For simplicty sake, you can <strong>let DCS' Mission Editor add the file</strong> itself, by creating a new Trigger with the action "Sound to Country", and choosing your sound file and a country you don't use in your mission.</li>
|
|
</ul>
|
|
|
|
<p>Due to weird DCS quirks, <strong>radio communications behave differently</strong> if sent by a <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a> or by any other <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a></p>
|
|
|
|
<ul>
|
|
<li>If the transmitter is a <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a>, DCS will set the power of the transmission automatically,</li>
|
|
<li>If the transmitter is any other <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>, the transmisison can't be subtitled or looped.</li>
|
|
</ul>
|
|
|
|
<p>Note that obviously, the <strong>frequency</strong> and the <strong>modulation</strong> of the transmission are important only if the players are piloting an <strong>Advanced System Modelling</strong> enabled aircraft,
|
|
like the A10C or the Mirage 2000C. They will <strong>hear the transmission</strong> if they are tuned on the <strong>right frequency and modulation</strong> (and if they are close enough - more on that below).
|
|
If a FC3 airacraft is used, it will <strong>hear every communication, whatever the frequency and the modulation</strong> is set to. The same is true for TACAN beacons. If your aircaft isn't compatible,
|
|
you won't hear/be able to use the TACAN beacon informations.</p>
|
|
|
|
<hr/>
|
|
|
|
<h3>Author: Hugues "Grey_Echo" Bousquet</h3>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#BEACON">BEACON</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#RADIO">RADIO</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(BEACON)">Type <code>BEACON</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).AATACAN">BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration)</a></td>
|
|
<td class="summary">
|
|
<p>Activates a TACAN BEACON on an Aircraft.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).ClassName">BEACON.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).New">BEACON:New(Positionable)</a></td>
|
|
<td class="summary">
|
|
<p>Create a new BEACON Object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).RadioBeacon">BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration)</a></td>
|
|
<td class="summary">
|
|
<p>Activates a general pupose Radio Beacon
|
|
This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).StopAATACAN">BEACON:StopAATACAN()</a></td>
|
|
<td class="summary">
|
|
<p>Stops the AA TACAN BEACON</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON).StopRadioBeacon">BEACON:StopRadioBeacon()</a></td>
|
|
<td class="summary">
|
|
<p>Stops the AA TACAN BEACON</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(BEACON)._TACANToFrequency">BEACON:_TACANToFrequency(TACANChannel, TACANMode)</a></td>
|
|
<td class="summary">
|
|
<p>Converts a TACAN Channel/Mode couple into a frequency in Hz</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a id="#(RADIO)">Type <code>RADIO</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Broadcast">RADIO:Broadcast()</a></td>
|
|
<td class="summary">
|
|
<p>Actually Broadcast the transmission
|
|
* The Radio has to be populated with the new transmission before broadcasting.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).ClassName">RADIO.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).FileName">RADIO.FileName</a></td>
|
|
<td class="summary">
|
|
<p>Name of the sound file</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Frequency">RADIO.Frequency</a></td>
|
|
<td class="summary">
|
|
<p>Frequency of the transmission in Hz</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Loop">RADIO.Loop</a></td>
|
|
<td class="summary">
|
|
<p>(default true)</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Modulation">RADIO.Modulation</a></td>
|
|
<td class="summary">
|
|
<p>Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).New">RADIO:New(Positionable)</a></td>
|
|
<td class="summary">
|
|
<p>Create a new RADIO Object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).NewGenericTransmission">RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop)</a></td>
|
|
<td class="summary">
|
|
<p>Create a new transmission, that is to say, populate the RADIO with relevant data
|
|
In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
|
|
but it will work with a UNIT or a GROUP anyway.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).NewUnitTransmission">RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop)</a></td>
|
|
<td class="summary">
|
|
<p>Create a new transmission, that is to say, populate the RADIO with relevant data
|
|
In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
|
|
but it will work for any <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Positionable">RADIO.Positionable</a></td>
|
|
<td class="summary">
|
|
<p>The transmiter</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Power">RADIO.Power</a></td>
|
|
<td class="summary">
|
|
<p>Power of the antenna is Watts</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetFileName">RADIO:SetFileName(FileName)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the filename passed and sets RADIO.FileName</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetFrequency">RADIO:SetFrequency(Frequency)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the frequency passed and sets RADIO.Frequency</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetLoop">RADIO:SetLoop(Loop)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the loop passed and sets RADIO.Loop</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetModulation">RADIO:SetModulation(Modulation)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the frequency passed and sets RADIO.Modulation</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetPower">RADIO:SetPower(Power)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the power passed and sets RADIO.Power</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SetSubtitle">RADIO:SetSubtitle(Subtitle, SubtitleDuration)</a></td>
|
|
<td class="summary">
|
|
<p>Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration
|
|
Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).StopBroadcast">RADIO:StopBroadcast()</a></td>
|
|
<td class="summary">
|
|
<p>Stops a transmission
|
|
This function is especially usefull to stop the broadcast of looped transmissions</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).Subtitle">RADIO.Subtitle</a></td>
|
|
<td class="summary">
|
|
<p>Subtitle of the transmission</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(RADIO).SubtitleDuration">RADIO.SubtitleDuration</a></td>
|
|
<td class="summary">
|
|
<p>Duration of the Subtitle in seconds</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(BEACON)">#BEACON</a></em>
|
|
<a id="BEACON" >
|
|
<strong>BEACON</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(RADIO)">#RADIO</a></em>
|
|
<a id="RADIO" >
|
|
<strong>RADIO</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(Radio)" >Type <code>Radio</code></a></h2>
|
|
|
|
<h2><a id="#(BEACON)" >Type <code>BEACON</code></a></h2>
|
|
|
|
<h1>BEACON class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
|
|
|
<p>After attaching a <a href="##(BEACON)">#BEACON</a> to your <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>, you need to select the right function to activate the kind of beacon you want.</p>
|
|
|
|
|
|
<p>There are two types of BEACONs available : the AA TACAN Beacon and the general purpose Radio Beacon.
|
|
Note that in both case, you can set an optional parameter : the <code>BeaconDuration</code>. This can be very usefull to simulate the battery time if your BEACON is
|
|
attach to a cargo crate, for exemple. </p>
|
|
|
|
<h2>AA TACAN Beacon usage</h2>
|
|
|
|
<p>This beacon only works with airborne <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a>. Use <a href="##(BEACON)">#BEACON</a>() to set the beacon parameters and start the beacon.
|
|
Use @#BEACON:StopAATACAN}() to stop it.</p>
|
|
|
|
<h2>General Purpose Radio Beacon usage</h2>
|
|
|
|
<p>This beacon will work with any <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>, but **it won't follow the <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>** ! This means that you should only use it with
|
|
<a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a> that don't move, or move very slowly. Use <a href="##(BEACON)">#BEACON</a>() to set the beacon parameters and start the beacon.
|
|
Use <a href="##(BEACON)">#BEACON</a>() to stop it.</p>
|
|
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON).AATACAN" >
|
|
<strong>BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Activates a TACAN BEACON on an Aircraft.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number TACANChannel </em></code>:
|
|
(the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Message </em></code>:
|
|
The Message that is going to be coded in Morse and broadcasted by the beacon</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#boolean Bearing </em></code>:
|
|
Can the BEACON be homed on ?</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number BeaconDuration </em></code>:
|
|
How long will the beacon last in seconds. Omit for forever.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(BEACON)">#BEACON</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Let's create a TACAN Beacon for a tanker
|
|
local myUnit = UNIT:FindByName("MyUnit")
|
|
local myBeacon = myUnit:GetBeacon() -- Creates the beacon
|
|
|
|
myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(BEACON).ClassName" >
|
|
<strong>BEACON.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON).New" >
|
|
<strong>BEACON:New(Positionable)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Create a new BEACON Object.</p>
|
|
|
|
|
|
<p>This doesn't activate the beacon, though, use <a href="##(BEACON).AATACAN">BEACON.AATACAN</a> or <a href="##(BEACON).Generic">BEACON.Generic</a>
|
|
If you want to create a BEACON, you probably should use <a href="Positionable.html##(POSITIONABLE).GetBeacon">Positionable#POSITIONABLE.GetBeacon</a>() instead.</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Positionable.html##(POSITIONABLE)">Wrapper.Positionable#POSITIONABLE</a> Positionable </em></code>:
|
|
The <a href="Positionable.html">Positionable</a> that will receive radio capabilities.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="##(BEACON)">#BEACON</a>:</em>
|
|
Beacon</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
If Positionable is invalid</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON).RadioBeacon" >
|
|
<strong>BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Activates a general pupose Radio Beacon
|
|
This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.</p>
|
|
|
|
|
|
<p>Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8.
|
|
They can home in on these specific frequencies :
|
|
<em> <strong>Mi8</strong>
|
|
</em> R-828 -> 20-60MHz
|
|
* ARKUD -> 100-150MHz (canal 1 : 114166, canal 2 : 114333, canal 3 : 114583, canal 4 : 121500, canal 5 : 123100, canal 6 : 124100) AM
|
|
* ARK9 -> 150-1300KHz
|
|
<em> <strong>Huey</strong>
|
|
</em> AN/ARC-131 -> 30-76 Mhz FM</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string FileName </em></code>:
|
|
The name of the audio file</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Frequency </em></code>:
|
|
in MHz</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Modulation </em></code>:
|
|
either radio.modulation.AM or radio.modulation.FM</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Power </em></code>:
|
|
in W</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number BeaconDuration </em></code>:
|
|
How long will the beacon last in seconds. Omit for forever.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(BEACON)">#BEACON</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- Let's create a beacon for a unit in distress.
|
|
-- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131)
|
|
-- The beacon they use is battery-powered, and only lasts for 5 min
|
|
local UnitInDistress = UNIT:FindByName("Unit1")
|
|
local UnitBeacon = UnitInDistress:GetBeacon()
|
|
|
|
-- Set the beacon and start it
|
|
UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60)</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON).StopAATACAN" >
|
|
<strong>BEACON:StopAATACAN()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Stops the AA TACAN BEACON</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(BEACON)">#BEACON</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON).StopRadioBeacon" >
|
|
<strong>BEACON:StopRadioBeacon()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Stops the AA TACAN BEACON</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(BEACON)">#BEACON</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(BEACON)._TACANToFrequency" >
|
|
<strong>BEACON:_TACANToFrequency(TACANChannel, TACANMode)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Converts a TACAN Channel/Mode couple into a frequency in Hz</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number TACANChannel </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string TACANMode </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em>#number:</em>
|
|
Frequecy</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
if parameters are invalid</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(RADIO)" >Type <code>RADIO</code></a></h2>
|
|
|
|
<h1>RADIO class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
|
|
|
<h2>RADIO usage</h2>
|
|
|
|
<p>There are 3 steps to a successful radio transmission.</p>
|
|
|
|
|
|
|
|
<ul>
|
|
<li>First, you need to **"add a <a href="##(RADIO)">#RADIO</a> object** to your <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>. This is done using the <a href="Positionable.html##(POSITIONABLE).GetRadio">Positionable#POSITIONABLE.GetRadio</a>() function,</li>
|
|
<li>Then, you will <strong>set the relevant parameters</strong> to the transmission (see below),</li>
|
|
<li>When done, you can actually <strong>broadcast the transmission</strong> (i.e. play the sound) with the <a href="RADIO.Broadcast.html">RADIO.Broadcast</a>() function.</li>
|
|
</ul>
|
|
|
|
<p>Methods to set relevant parameters for both a <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a> or any other <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a></p>
|
|
|
|
<ul>
|
|
<li><a href="##(RADIO).SetFileName">RADIO.SetFileName</a>() : Sets the file name of your sound file (e.g. "Noise.ogg"),</li>
|
|
<li><a href="##(RADIO).SetFrequency">RADIO.SetFrequency</a>() : Sets the frequency of your transmission.</li>
|
|
<li><a href="##(RADIO).SetModulation">RADIO.SetModulation</a>() : Sets the modulation of your transmission.</li>
|
|
<li><a href="##(RADIO).SetLoop">RADIO.SetLoop</a>() : Choose if you want the transmission to be looped. If you need your transmission to be looped, you might need a <a href="##(BEACON)">#BEACON</a> instead...</li>
|
|
</ul>
|
|
|
|
<p>Additional Methods to set relevant parameters if the transmiter is a <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a></p>
|
|
|
|
<ul>
|
|
<li><a href="##(RADIO).SetSubtitle">RADIO.SetSubtitle</a>() : Set both the subtitle and its duration,</li>
|
|
<li><a href="##(RADIO).NewUnitTransmission">RADIO.NewUnitTransmission</a>() : Shortcut to set all the relevant parameters in one method call</li>
|
|
</ul>
|
|
|
|
<p>Additional Methods to set relevant parameters if the transmiter is any other <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a></p>
|
|
|
|
<ul>
|
|
<li><a href="##(RADIO).SetPower">RADIO.SetPower</a>() : Sets the power of the antenna in Watts</li>
|
|
<li><a href="##(RADIO).NewGenericTransmission">RADIO.NewGenericTransmission</a>() : Shortcut to set all the relevant parameters in one method call</li>
|
|
</ul>
|
|
|
|
<p>What is this power thing ?</p>
|
|
|
|
<ul>
|
|
<li>If your transmission is sent by a <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a> other than a <a href="Unit.html##(UNIT)">Unit#UNIT</a> or a <a href="Group.html##(GROUP)">Group#GROUP</a>, you can set the power of the antenna,</li>
|
|
<li>Otherwise, DCS sets it automatically, depending on what's available on your Unit,</li>
|
|
<li>If the player gets <strong>too far</strong> from the transmiter, or if the antenna is <strong>too weak</strong>, the transmission will <strong>fade</strong> and <strong>become noisyer</strong>,</li>
|
|
<li>This an automated DCS calculation you have no say on,</li>
|
|
<li>For reference, a standard VOR station has a 100W antenna, a standard AA TACAN has a 120W antenna, and civilian ATC's antenna usually range between 300 and 500W,</li>
|
|
<li>Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).Broadcast" >
|
|
<strong>RADIO:Broadcast()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Actually Broadcast the transmission
|
|
* The Radio has to be populated with the new transmission before broadcasting.</p>
|
|
|
|
|
|
<ul>
|
|
<li>Please use RADIO setters or either <a href="Radio.html##(RADIO).NewGenericTransmission">Radio#RADIO.NewGenericTransmission</a> or <a href="Radio.html##(RADIO).NewUnitTransmission">Radio#RADIO.NewUnitTransmission</a></li>
|
|
<li>This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE</li>
|
|
<li>If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()</li>
|
|
<li>If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command</li>
|
|
<li>If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.</li>
|
|
<li>If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored</li>
|
|
</ul>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(RADIO).ClassName" >
|
|
<strong>RADIO.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(RADIO).FileName" >
|
|
<strong>RADIO.FileName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Name of the sound file</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(RADIO).Frequency" >
|
|
<strong>RADIO.Frequency</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Frequency of the transmission in Hz</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(RADIO).Loop" >
|
|
<strong>RADIO.Loop</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>(default true)</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(RADIO).Modulation" >
|
|
<strong>RADIO.Modulation</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).New" >
|
|
<strong>RADIO:New(Positionable)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Create a new RADIO Object.</p>
|
|
|
|
|
|
<p>This doesn't broadcast a transmission, though, use <a href="##(RADIO).Broadcast">RADIO.Broadcast</a> to actually broadcast
|
|
If you want to create a RADIO, you probably should use <a href="Positionable.html##(POSITIONABLE).GetRadio">Positionable#POSITIONABLE.GetRadio</a>() instead</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Positionable.html##(POSITIONABLE)">Wrapper.Positionable#POSITIONABLE</a> Positionable </em></code>:
|
|
The <a href="Positionable.html">Positionable</a> that will receive radio capabilities.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return values</h3>
|
|
<ol>
|
|
<li>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
Radio</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><em>#nil:</em>
|
|
If Positionable is invalid</p>
|
|
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).NewGenericTransmission" >
|
|
<strong>RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Create a new transmission, that is to say, populate the RADIO with relevant data
|
|
In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
|
|
but it will work with a UNIT or a GROUP anyway.</p>
|
|
|
|
|
|
<p>Only the #RADIO and the Filename are mandatory</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string FileName </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Frequency </em></code>:
|
|
in MHz</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Modulation </em></code>:
|
|
either radio.modulation.AM or radio.modulation.FM</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Power </em></code>:
|
|
in W</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Loop </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).NewUnitTransmission" >
|
|
<strong>RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Create a new transmission, that is to say, populate the RADIO with relevant data
|
|
In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
|
|
but it will work for any <a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a>.</p>
|
|
|
|
|
|
<p>Only the RADIO and the Filename are mandatory.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string FileName </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#string Subtitle </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SubtitleDuration </em></code>:
|
|
in s</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Frequency </em></code>:
|
|
in MHz</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number Modulation </em></code>:
|
|
either radio.modulation.AM or radio.modulation.FM</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#boolean Loop </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="Positionable.html##(POSITIONABLE)">Positionable#POSITIONABLE</a></em>
|
|
<a id="#(RADIO).Positionable" >
|
|
<strong>RADIO.Positionable</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>The transmiter</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(RADIO).Power" >
|
|
<strong>RADIO.Power</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Power of the antenna is Watts</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetFileName" >
|
|
<strong>RADIO:SetFileName(FileName)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the filename passed and sets RADIO.FileName</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string FileName </em></code>:
|
|
File name of the sound file (i.e. "Noise.ogg")</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetFrequency" >
|
|
<strong>RADIO:SetFrequency(Frequency)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the frequency passed and sets RADIO.Frequency</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Frequency </em></code>:
|
|
in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetLoop" >
|
|
<strong>RADIO:SetLoop(Loop)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the loop passed and sets RADIO.Loop</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#boolean Loop </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code></code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetModulation" >
|
|
<strong>RADIO:SetModulation(Modulation)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the frequency passed and sets RADIO.Modulation</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Modulation </em></code>:
|
|
either radio.modulation.AM or radio.modulation.FM</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetPower" >
|
|
<strong>RADIO:SetPower(Power)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the power passed and sets RADIO.Power</p>
|
|
|
|
<h3>Parameter</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#number Power </em></code>:
|
|
in W</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).SetSubtitle" >
|
|
<strong>RADIO:SetSubtitle(Subtitle, SubtitleDuration)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration
|
|
Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#string Subtitle </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number SubtitleDuration </em></code>:
|
|
in s</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code>-- create the broadcaster and attaches it a RADIO
|
|
local MyUnit = UNIT:FindByName("MyUnit")
|
|
local MyUnitRadio = MyUnit:GetRadio()
|
|
|
|
-- add a subtitle for the next transmission, which will be up for 10s
|
|
MyUnitRadio:SetSubtitle("My Subtitle, 10)</code></pre>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(RADIO).StopBroadcast" >
|
|
<strong>RADIO:StopBroadcast()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Stops a transmission
|
|
This function is especially usefull to stop the broadcast of looped transmissions</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(RADIO).Subtitle" >
|
|
<strong>RADIO.Subtitle</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Subtitle of the transmission</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(RADIO).SubtitleDuration" >
|
|
<strong>RADIO.SubtitleDuration</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Duration of the Subtitle in seconds</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|