mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts: # Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua # Moose Mission Setup/Moose.lua
This commit is contained in:
commit
f91d8fd07d
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc:}/Moose Mission Setup/Moose Mission Update\Moose_Update_Missions.bat"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=""${project_loc:}/Moose Test Missions""/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc:}/Moose Mission Setup/Moose Mission Update"/>
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc:}/Moose Mission Setup/Moose Mission Update\Moose_Update_Missions.bat"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=""${resource_loc:}""/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc:}/Moose Mission Setup/Moose Mission Update"/>
|
||||
</launchConfiguration>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc:}/Moose Mission Setup/Moose Mission Update\Moose_Update_Missions.bat"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=""${selected_resource_loc}""/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc:}/Moose Mission Setup/Moose Mission Update"/>
|
||||
</launchConfiguration>
|
||||
@ -785,6 +785,11 @@ function EVENT:onEvent( Event )
|
||||
if Event.weapon then
|
||||
Event.Weapon = Event.weapon
|
||||
Event.WeaponName = Event.Weapon:getTypeName()
|
||||
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
|
||||
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon:getPlayerName()
|
||||
Event.WeaponCoalition = Event.WeaponUNIT and Event.Weapon:getCoalition()
|
||||
Event.WeaponCategory = Event.WeaponUNIT and Event.Weapon:getDesc().category
|
||||
Event.WeaponTypeName = Event.WeaponUNIT and Event.Weapon:getTypeName()
|
||||
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
|
||||
end
|
||||
|
||||
@ -949,7 +954,7 @@ function EVENT:onEvent( Event )
|
||||
|
||||
-- If the EventData is not bound to a specific unit, then call the EventClass EventFunction.
|
||||
-- Note that here the EventFunction will need to implement and determine the logic for the relevant source- or target unit, or weapon.
|
||||
if Event.IniDCSUnit and not EventData.EventUnit then
|
||||
if (Event.IniDCSUnit or Event.WeaponUNIT) and not EventData.EventUnit then
|
||||
|
||||
if EventClass == EventData.EventClass then
|
||||
|
||||
|
||||
311
Moose Development/Moose/Core/Radio.lua
Normal file
311
Moose Development/Moose/Core/Radio.lua
Normal file
@ -0,0 +1,311 @@
|
||||
--- **Core** - The RADIO class is responsible for **transmitting radio communications**.
|
||||
--
|
||||
-- --- bitmap
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- What are radio communications in DCS ?
|
||||
--
|
||||
-- * Radio transmissions consist of **sound files** that are broadcasted on a specific **frequency** (e.g. 115MHz) and **modulation** (e.g. AM),
|
||||
-- * They can be **subtitled** for a specific **duration**, the **power** in Watts of the transmiter's antenna can be set, and the transmission can be **looped**.
|
||||
--
|
||||
-- How to supply DCS my own Sound Files ?
|
||||
--
|
||||
-- * Your sound files need to be encoded in **.ogg** or .wav,
|
||||
-- * Your sound files should be **as tiny as possible**. It is suggested you encode in .ogg with low bitrate and sampling settings,
|
||||
-- * They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),
|
||||
-- * For simplicty sake, you can **let DCS' Mission Editor add the file** 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.
|
||||
--
|
||||
-- Due to weird DCS quirks, **radio communications behave differently** if sent by a @{Unit#UNIT} or a @{Group#GROUP} or by any other @{Positionable#POSITIONABLE}
|
||||
--
|
||||
-- * If the transmitter is a @{Unit#UNIT} or a @{Group#GROUP}, DCS will set the power of the transmission automatically,
|
||||
-- * If the transmitter is any other @{Positionable#POSITIONABLE}, the transmisison can't be subtitled or looped.
|
||||
--
|
||||
-- Note that obviously, the **frequency** and the **modulation** of the transmission are important only if the players are piloting an **Advanced System Modelling** enabled aircraft,
|
||||
-- like the A10C or the Mirage 2000C. They will **hear the transmission** if they are tuned on the **right frequency and modulation** (and if they are close enough - more on that below).
|
||||
-- If a FC3 airacraft is used, it will **hear every communication, whatever the frequency and the modulation** is set to.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Authors: Hugues "Grey_Echo" Bousquet
|
||||
--
|
||||
-- @module Radio
|
||||
|
||||
--- # 1) RADIO class, extends @{Base#BASE}
|
||||
--
|
||||
-- ## 1.1) RADIO usage
|
||||
--
|
||||
-- There are 3 steps to a successful radio transmission.
|
||||
--
|
||||
-- * First, you need to **"add" a @{#RADIO} object** to your @{Positionable#POSITIONABLE}. This is done using the @{Positionable#POSITIONABLE.GetRadio}() function,
|
||||
-- * Then, you will **set the relevant parameters** to the transmission (see below),
|
||||
-- * When done, you can actually **broadcast the transmission** (i.e. play the sound) with the @{Positionable#POSITIONABLE.Broadcast}() function.
|
||||
--
|
||||
-- Methods to set relevant parameters for both a @{Unit#UNIT} or a @{Group#GROUP} or any other @{Positionable#POSITIONABLE}
|
||||
--
|
||||
-- * @{#RADIO.SetFileName}() : Sets the file name of your sound file (e.g. "Noise.ogg"),
|
||||
-- * @{#RADIO.SetFrequency}() : Sets the frequency of your transmission,
|
||||
-- * @{#RADIO.SetModulation}() : Sets the modulation of your transmission.
|
||||
--
|
||||
-- Additional Methods to set relevant parameters if the transmiter is a @{Unit#UNIT} or a @{Group#GROUP}
|
||||
--
|
||||
-- * @{#RADIO.SetLoop}() : Choose if you want the transmission to be looped,
|
||||
-- * @{#RADIO.SetSubtitle}() : Set both the subtitle and its duration,
|
||||
-- * @{#RADIO.NewUnitTransmission}() : Shortcut to set all the relevant parameters in one method call
|
||||
--
|
||||
-- Additional Methods to set relevant parameters if the transmiter is any other @{Wrapper.Positionable#POSITIONABLE}
|
||||
--
|
||||
-- * @{#RADIO.SetPower}() : Sets the power of the antenna in Watts
|
||||
-- * @{#RADIO.NewGenericTransmission}() : Shortcut to set all the relevant parameters in one method call
|
||||
--
|
||||
-- What is this power thing ?
|
||||
--
|
||||
-- * If your transmission is sent by a @{Positionable#POSITIONABLE} other than a @{Unit#UNIT} or a @{Group#GROUP}, you can set the power of the antenna,
|
||||
-- * Otherwise, DCS sets it automatically, depending on what's available on your Unit,
|
||||
-- * If the player gets **too far** from the transmiter, or if the antenna is **too weak**, the transmission will **fade** and **become noisyer**,
|
||||
-- * This an automated DCS calculation you have no say on,
|
||||
-- * 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,
|
||||
-- * Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission.
|
||||
--
|
||||
-- @type RADIO
|
||||
-- @field Wrapper.Positionable#POSITIONABLE Positionable The transmiter
|
||||
-- @field #string FileName Name of the sound file
|
||||
-- @field #number Frequency Frequency of the transmission in Hz
|
||||
-- @field #number Modulation Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)
|
||||
-- @field #string Subtitle Subtitle of the transmission
|
||||
-- @field #number SubtitleDuration Duration of the Subtitle in seconds
|
||||
-- @field #number Power Power of the antenna is Watts
|
||||
-- @field #boolean Loop
|
||||
-- @extends Core.Base#BASE
|
||||
RADIO = {
|
||||
ClassName = "RADIO",
|
||||
FileName = "",
|
||||
Frequency = 0,
|
||||
Modulation = radio.modulation.AM,
|
||||
Subtitle = "",
|
||||
SubtitleDuration = 0,
|
||||
Power = 100,
|
||||
Loop = 0,
|
||||
}
|
||||
|
||||
--- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{#RADIO.Broadcast} to actually broadcast
|
||||
-- @param #RADIO self
|
||||
-- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities.
|
||||
-- @return #RADIO Radio
|
||||
-- @return #nil If Positionable is invalid
|
||||
-- @usage
|
||||
-- -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead
|
||||
function RADIO:New(Positionable)
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- Core.Radio#RADIO
|
||||
|
||||
self:F(Positionable)
|
||||
|
||||
if Positionable:GetPointVec2() ~= nil then -- It's stupid, but the only way I found to make sure positionable is valid
|
||||
self.Positionable = Positionable
|
||||
return self
|
||||
end
|
||||
|
||||
self:E({"The passed positionable is invalid, no RADIO created", Positionable})
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Check validity of the filename passed and sets RADIO.FileName
|
||||
-- @param #RADIO self
|
||||
-- @param #string FileName File name of the sound file (i.e. "Noise.ogg")
|
||||
-- @return #RADIO self
|
||||
function RADIO:SetFileName(FileName)
|
||||
self:F2(FileName)
|
||||
|
||||
if type(FileName) == "string" then
|
||||
if FileName:find(".ogg") ~= nil or FileName:find(".wav") ~= nil then
|
||||
if FileName:find("l10n/DEFAULT/") == nil then
|
||||
FileName = "l10n/DEFAULT/" .. FileName
|
||||
end
|
||||
self.FileName = FileName
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
self:E({"File name invalid. Maybe something wrong with the extension ?", self.FileName})
|
||||
return self
|
||||
end
|
||||
|
||||
--- Check validity of the frequency passed and sets RADIO.Frequency
|
||||
-- @param #RADIO self
|
||||
-- @param #number Frequency in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)
|
||||
-- @return #RADIO self
|
||||
function RADIO:SetFrequency(Frequency)
|
||||
self:F2(Frequency)
|
||||
if type(Frequency) == "number" then
|
||||
-- If frequency is in range
|
||||
if (Frequency >= 30 and Frequency < 88) or (Frequency >= 108 and Frequency < 152) or (Frequency >= 225 and Frequency < 400) then
|
||||
self.Frequency = Frequency * 1000000 -- Conversion in Hz
|
||||
-- If the RADIO is attached to a UNIT or a GROUP, we need to send the DCS Command "SetFrequency" to change the UNIT or GROUP frequency
|
||||
if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then
|
||||
self.Positionable:GetDCSObject():getController():setCommand({
|
||||
id = "SetFrequency",
|
||||
params = {
|
||||
frequency = self.Frequency,
|
||||
modulation = self.Modulation,
|
||||
}
|
||||
})
|
||||
end
|
||||
return self
|
||||
end
|
||||
end
|
||||
self:E({"Frequency is outside of DCS Frequency ranges (30-80, 108-152, 225-400). Frequency unchanged.", self.Frequency})
|
||||
return self
|
||||
end
|
||||
|
||||
--- Check validity of the frequency passed and sets RADIO.Modulation
|
||||
-- @param #RADIO self
|
||||
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
|
||||
-- @return #RADIO self
|
||||
function RADIO:SetModulation(Modulation)
|
||||
self:F2(Modulation)
|
||||
if type(Modulation) == "number" then
|
||||
if Modulation == radio.modulation.AM or Modulation == radio.modulation.FM then --TODO Maybe make this future proof if ED decides to add an other modulation ?
|
||||
self.Modulation = Modulation
|
||||
return self
|
||||
end
|
||||
end
|
||||
self:E({"Modulation is invalid. Use DCS's enum radio.modulation. Modulation unchanged.", self.Modulation})
|
||||
return self
|
||||
end
|
||||
|
||||
--- Check validity of the power passed and sets RADIO.Power
|
||||
-- @param #RADIO self
|
||||
-- @param #number Power in W
|
||||
-- @return #RADIO self
|
||||
function RADIO:SetPower(Power)
|
||||
self:F2(Power)
|
||||
if type(Power) == "number" then
|
||||
self.Power = math.floor(math.abs(Power)) --TODO Find what is the maximum power allowed by DCS and limit power to that
|
||||
return self
|
||||
end
|
||||
self:E({"Power is invalid. Power unchanged.", self.Power})
|
||||
return self
|
||||
end
|
||||
|
||||
--- Check validity of the loop passed and sets RADIO.Loop
|
||||
-- @param #RADIO self
|
||||
-- @param #boolean Loop
|
||||
-- @return #RADIO self
|
||||
-- @usage
|
||||
function RADIO:SetLoop(Loop)
|
||||
self:F2(Loop)
|
||||
if type(Loop) == "boolean" then
|
||||
self.Loop = Loop
|
||||
return self
|
||||
end
|
||||
self:E({"Loop is invalid. Loop unchanged.", self.Loop})
|
||||
return self
|
||||
end
|
||||
|
||||
--- Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration
|
||||
-- @param #RADIO self
|
||||
-- @param #string Subtitle
|
||||
-- @param #number SubtitleDuration in s
|
||||
-- @return #RADIO self
|
||||
-- @usage
|
||||
-- -- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration
|
||||
function RADIO:SetSubtitle(Subtitle, SubtitleDuration)
|
||||
self:F2({Subtitle, SubtitleDuration})
|
||||
if type(Subtitle) == "string" then
|
||||
self.Subtitle = Subtitle
|
||||
else
|
||||
self.Subtitle = ""
|
||||
self:E({"Subtitle is invalid. Subtitle reset.", self.Subtitle})
|
||||
end
|
||||
if type(SubtitleDuration) == "number" then
|
||||
if math.floor(math.abs(SubtitleDuration)) == SubtitleDuration then
|
||||
self.SubtitleDuration = SubtitleDuration
|
||||
return self
|
||||
end
|
||||
end
|
||||
self.SubtitleDuration = 0
|
||||
self:E({"SubtitleDuration is invalid. SubtitleDuration reset.", self.SubtitleDuration})
|
||||
end
|
||||
|
||||
--- Create a new transmission, that is to say, populate the RADIO with relevant data
|
||||
-- @param #RADIO self
|
||||
-- @param #string FileName
|
||||
-- @param #number Frequency in MHz
|
||||
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
|
||||
-- @param #number Power in W
|
||||
-- @return #RADIO self
|
||||
-- @usage
|
||||
-- -- 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
|
||||
-- -- Only the RADIO and the Filename are mandatory
|
||||
function RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power)
|
||||
self:F({FileName, Frequency, Modulation, Power})
|
||||
|
||||
self:SetFileName(FileName)
|
||||
if Frequency then self:SetFrequency(Frequency) end
|
||||
if Modulation then self:SetModulation(Modulation) end
|
||||
if Power then self:SetPower(Power) end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Create a new transmission, that is to say, populate the RADIO with relevant data
|
||||
-- @param #RADIO self
|
||||
-- @param #string FileName
|
||||
-- @param #string Subtitle
|
||||
-- @param #number SubtitleDuration in s
|
||||
-- @param #number Frequency in MHz
|
||||
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
|
||||
-- @param #boolean Loop
|
||||
-- @return #RADIO self
|
||||
-- @usage
|
||||
-- -- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
|
||||
-- but it will work for any POSITIONABLE
|
||||
-- -- Only the RADIO and the Filename are mandatory
|
||||
function RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop)
|
||||
self:F({FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop})
|
||||
|
||||
self:SetFileName(FileName)
|
||||
if Subtitle then self:SetSubtitle(Subtitle) end
|
||||
if SubtitleDuration then self:SetSubtitleDuration(SubtitleDuration) end
|
||||
if Frequency then self:SetFrequency(Frequency) end
|
||||
if Modulation then self:SetModulation(Modulation) end
|
||||
if Loop then self:SetLoop(Loop) end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Actually Broadcast the transmission
|
||||
-- @param #RADIO self
|
||||
-- @return #RADIO self
|
||||
-- @usage
|
||||
-- -- The Radio has to be populated with the new transmission before broadcasting.
|
||||
-- -- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
|
||||
-- -- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
|
||||
-- -- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
|
||||
-- -- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
|
||||
-- -- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
|
||||
-- -- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored
|
||||
function RADIO:Broadcast()
|
||||
self:F()
|
||||
-- If the POSITIONABLE is actually a Unit or a Group, use the more complicated DCS command system
|
||||
if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then
|
||||
self:T2("Broadcasting from a UNIT or a GROUP")
|
||||
self.Positionable:GetDCSObject():getController():setCommand({
|
||||
id = "TransmitMessage",
|
||||
params = {
|
||||
file = self.FileName,
|
||||
duration = self.SubtitleDuration,
|
||||
subtitle = self.Subtitle,
|
||||
loop = self.Loop,
|
||||
}
|
||||
})
|
||||
else
|
||||
-- If the POSITIONABLE is anything else, we revert to the general singleton function
|
||||
self:T2("Broadcasting from a POSITIONABLE")
|
||||
trigger.action.radioTransmission(self.FileName, self.Positionable:GetPositionVec3(), self.Modulation, false, self.Frequency, self.Power)
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
@ -5,8 +5,6 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # 1) @{Scoring#SCORING} class, extends @{Base#BASE}
|
||||
--
|
||||
-- The @{#SCORING} class administers the scoring of player achievements,
|
||||
-- and creates a CSV file logging the scoring events and results for use at team or squadron websites.
|
||||
--
|
||||
@ -57,6 +55,8 @@
|
||||
-- Use the radio menu F10 to consult the scores while running the mission.
|
||||
-- Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission.
|
||||
--
|
||||
-- # 1) @{Scoring#SCORING} class, extends @{Base#BASE}
|
||||
--
|
||||
-- ## 1.1) Set the destroy score or penalty scale
|
||||
--
|
||||
-- Score scales can be set for scores granted when enemies or friendlies are destroyed.
|
||||
@ -86,8 +86,6 @@
|
||||
-- For example, this can be done as follows:
|
||||
--
|
||||
-- Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) )
|
||||
--
|
||||
--
|
||||
--
|
||||
-- ## 1.3) Define destruction zones that will give extra scores.
|
||||
--
|
||||
@ -546,6 +544,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
local UnitCategory = UnitDesc.category
|
||||
local UnitCoalition = UnitData:GetCoalition()
|
||||
local UnitTypeName = UnitData:GetTypeName()
|
||||
local UnitThreatLevel, UnitThreatType = UnitData:GetThreatLevel()
|
||||
|
||||
self:T( { PlayerName, UnitName, UnitCategory, UnitCoalition, UnitTypeName } )
|
||||
|
||||
@ -586,6 +585,8 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
self.Players[PlayerName].UnitCategory = UnitCategory
|
||||
self.Players[PlayerName].UnitType = UnitTypeName
|
||||
self.Players[PlayerName].UNIT = UnitData
|
||||
self.Players[PlayerName].ThreatLevel = UnitThreatLevel
|
||||
self.Players[PlayerName].ThreatType = UnitThreatType
|
||||
|
||||
if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then
|
||||
if self.Players[PlayerName].PenaltyWarning < 1 then
|
||||
@ -844,6 +845,7 @@ function SCORING:_EventOnHit( Event )
|
||||
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0
|
||||
PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0
|
||||
PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT
|
||||
PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel()
|
||||
|
||||
-- Only grant hit scores if there was more than one second between the last hit.
|
||||
if timer.getTime() - PlayerHit.TimeStamp > 1 then
|
||||
@ -882,7 +884,7 @@ function SCORING:_EventOnHit( Event )
|
||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||
end
|
||||
self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -25, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
Player.Score = Player.Score + 1
|
||||
PlayerHit.Score = PlayerHit.Score + 1
|
||||
@ -915,7 +917,7 @@ function SCORING:_EventOnHit( Event )
|
||||
)
|
||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( InitPlayerName, "", "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, "", "Scenery", TargetUnitType )
|
||||
self:ScoreCSV( InitPlayerName, "", "HIT_SCORE", 1, 0, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, "", "Scenery", TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -923,6 +925,89 @@ function SCORING:_EventOnHit( Event )
|
||||
elseif InitPlayerName == nil then -- It is an AI hitting a player???
|
||||
|
||||
end
|
||||
|
||||
-- It is a weapon initiated by a player, that is hitting something
|
||||
-- This seems to occur only with scenery and static objects.
|
||||
if Event.WeaponPlayerName ~= nil then
|
||||
self:_AddPlayerFromUnit( Event.WeaponUNIT )
|
||||
if self.Players[Event.WeaponPlayerName] then -- This should normally not happen, but i'll test it anyway.
|
||||
if TargetPlayerName ~= nil then -- It is a player hitting another player ...
|
||||
self:_AddPlayerFromUnit( TargetUNIT )
|
||||
end
|
||||
|
||||
self:T( "Hitting Scenery" )
|
||||
|
||||
-- What is he hitting?
|
||||
if TargetCategory then
|
||||
|
||||
-- A scenery or static got hit, score it.
|
||||
-- Player contains the score data from self.Players[WeaponPlayerName]
|
||||
local Player = self.Players[Event.WeaponPlayerName]
|
||||
|
||||
-- Ensure there is a hit table per TargetCategory and TargetUnitName.
|
||||
Player.Hit[TargetCategory] = Player.Hit[TargetCategory] or {}
|
||||
Player.Hit[TargetCategory][TargetUnitName] = Player.Hit[TargetCategory][TargetUnitName] or {}
|
||||
|
||||
-- PlayerHit contains the score counters and data per unit that was hit.
|
||||
local PlayerHit = Player.Hit[TargetCategory][TargetUnitName]
|
||||
|
||||
PlayerHit.Score = PlayerHit.Score or 0
|
||||
PlayerHit.Penalty = PlayerHit.Penalty or 0
|
||||
PlayerHit.ScoreHit = PlayerHit.ScoreHit or 0
|
||||
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0
|
||||
PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0
|
||||
PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT
|
||||
PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel()
|
||||
|
||||
-- Only grant hit scores if there was more than one second between the last hit.
|
||||
if timer.getTime() - PlayerHit.TimeStamp > 1 then
|
||||
PlayerHit.TimeStamp = timer.getTime()
|
||||
|
||||
local Score = 0
|
||||
|
||||
if InitCoalition then -- A coalition object was hit, probably a static.
|
||||
if InitCoalition == TargetCoalition then
|
||||
-- TODO: Penalty according scale
|
||||
Player.Penalty = Player.Penalty + 10
|
||||
PlayerHit.Penalty = PlayerHit.Penalty + 10
|
||||
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1
|
||||
|
||||
MESSAGE
|
||||
:New( "Player '" .. Event.WeaponPlayerName .. "' hit a friendly target " ..
|
||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
|
||||
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
||||
2
|
||||
)
|
||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( Event.WeaponCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( Event.WeaponPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, Event.WeaponName, Event.WeaponCoalition, Event.WeaponCategory, Event.WeaponTypeName, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
Player.Score = Player.Score + 1
|
||||
PlayerHit.Score = PlayerHit.Score + 1
|
||||
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
|
||||
MESSAGE
|
||||
:New( "Player '" .. Event.WeaponPlayerName .. "' hit an enemy target " ..
|
||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
|
||||
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
|
||||
2
|
||||
)
|
||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( Event.WeaponCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( Event.WeaponPlayerName, TargetPlayerName, "HIT_SCORE", 1, 1, Event.WeaponName, Event.WeaponCoalition, Event.WeaponCategory, Event.WeaponTypeName, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
end
|
||||
else -- A scenery object was hit.
|
||||
MESSAGE
|
||||
:New( "Player '" .. Event.WeaponPlayerName .. "' hit a scenery object.",
|
||||
2
|
||||
)
|
||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( Event.WeaponPlayerName, "", "HIT_SCORE", 1, 0, Event.WeaponName, Event.WeaponCoalition, Event.WeaponCategory, Event.WeaponTypeName, TargetUnitName, "", "Scenery", TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Track DEAD or CRASH events for the scoring.
|
||||
@ -979,8 +1064,13 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
|
||||
self:T( { InitUnitName, InitUnitType, InitUnitCoalition, InitCoalition, InitUnitCategory, InitCategory } )
|
||||
|
||||
local Destroyed = false
|
||||
|
||||
-- What is the player destroying?
|
||||
if Player and Player.Hit and Player.Hit[TargetCategory] and Player.Hit[TargetCategory][TargetUnitName] then -- Was there a hit for this unit for this player before registered???
|
||||
if Player and Player.Hit and Player.Hit[TargetCategory] and Player.Hit[TargetCategory][TargetUnitName] and Player.Hit[TargetCategory][TargetUnitName].TimeStamp ~= 0 then -- Was there a hit for this unit for this player before registered???
|
||||
|
||||
local TargetThreatLevel = Player.Hit[TargetCategory][TargetUnitName].ThreatLevel
|
||||
local TargetThreatType = Player.Hit[TargetCategory][TargetUnitName].ThreatType
|
||||
|
||||
Player.Destroy[TargetCategory] = Player.Destroy[TargetCategory] or {}
|
||||
Player.Destroy[TargetCategory][TargetType] = Player.Destroy[TargetCategory][TargetType] or {}
|
||||
@ -994,8 +1084,9 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
|
||||
if TargetCoalition then
|
||||
if InitCoalition == TargetCoalition then
|
||||
local ThreatLevelTarget, ThreatTypeTarget = TargetUnit:GetThreatLevel()
|
||||
local ThreatLevelPlayer = Player.UNIT:GetThreatLevel() / 10 + 1
|
||||
local ThreatLevelTarget = TargetThreatLevel
|
||||
local ThreatTypeTarget = TargetThreatType
|
||||
local ThreatLevelPlayer = Player.ThreatLevel / 10 + 1
|
||||
local ThreatPenalty = math.ceil( ( ThreatLevelTarget / ThreatLevelPlayer ) * self.ScaleDestroyPenalty / 10 )
|
||||
self:E( { ThreatLevel = ThreatPenalty, ThreatLevelTarget = ThreatLevelTarget, ThreatTypeTarget = ThreatTypeTarget, ThreatLevelPlayer = ThreatLevelPlayer } )
|
||||
|
||||
@ -1023,11 +1114,13 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
||||
end
|
||||
|
||||
Destroyed = true
|
||||
self:ScoreCSV( PlayerName, TargetPlayerName, "DESTROY_PENALTY", 1, ThreatPenalty, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
|
||||
local ThreatLevelTarget, ThreatTypeTarget = TargetUnit:GetThreatLevel()
|
||||
local ThreatLevelPlayer = Player.UNIT:GetThreatLevel() / 10 + 1
|
||||
local ThreatLevelTarget = TargetThreatLevel
|
||||
local ThreatTypeTarget = TargetThreatType
|
||||
local ThreatLevelPlayer = Player.ThreatLevel / 10 + 1
|
||||
local ThreatScore = math.ceil( ( ThreatLevelTarget / ThreatLevelPlayer ) * self.ScaleDestroyScore / 10 )
|
||||
|
||||
self:E( { ThreatLevel = ThreatScore, ThreatLevelTarget = ThreatLevelTarget, ThreatTypeTarget = ThreatTypeTarget, ThreatLevelPlayer = ThreatLevelPlayer } )
|
||||
@ -1054,6 +1147,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
||||
end
|
||||
Destroyed = true
|
||||
self:ScoreCSV( PlayerName, TargetPlayerName, "DESTROY_SCORE", 1, ThreatScore, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
|
||||
local UnitName = TargetUnit:GetName()
|
||||
@ -1069,6 +1163,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
:ToAllIf( self:IfMessagesScore() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesScore() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( PlayerName, TargetPlayerName, "DESTROY_SCORE", 1, Score, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
Destroyed = true
|
||||
end
|
||||
|
||||
-- Check if there are Zones where the destruction happened.
|
||||
@ -1087,6 +1182,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
:ToAllIf( self:IfMessagesZone() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesZone() and self:IfMessagesToCoalition() )
|
||||
self:ScoreCSV( PlayerName, TargetPlayerName, "DESTROY_SCORE", 1, Score, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
Destroyed = true
|
||||
end
|
||||
end
|
||||
|
||||
@ -1108,10 +1204,18 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
||||
)
|
||||
:ToAllIf( self:IfMessagesZone() and self:IfMessagesToAll() )
|
||||
:ToCoalitionIf( InitCoalition, self:IfMessagesZone() and self:IfMessagesToCoalition() )
|
||||
Destroyed = true
|
||||
self:ScoreCSV( PlayerName, "", "DESTROY_SCORE", 1, Score, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, "", "Scenery", TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Delete now the hit cache if the target was destroyed.
|
||||
-- Otherwise points will be granted every time a target gets killed by the players that hit that target.
|
||||
-- This is only relevant for player to player destroys.
|
||||
if Destroyed then
|
||||
Player.Hit[TargetCategory][TargetUnitName].TimeStamp = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -17,6 +17,7 @@ Include.File( "Core/Set" )
|
||||
Include.File( "Core/Point" )
|
||||
Include.File( "Core/Message" )
|
||||
Include.File( "Core/Fsm" )
|
||||
Include.File( "Core/Radio" )
|
||||
|
||||
--- Wrapper Classes
|
||||
Include.File( "Wrapper/Object" )
|
||||
|
||||
@ -73,7 +73,7 @@ CLIENT = {
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
|
||||
-- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
|
||||
function CLIENT:Find( DCSUnit )
|
||||
function CLIENT:Find( DCSUnit, Error )
|
||||
local ClientName = DCSUnit:getName()
|
||||
local ClientFound = _DATABASE:FindClient( ClientName )
|
||||
|
||||
@ -82,7 +82,9 @@ function CLIENT:Find( DCSUnit )
|
||||
return ClientFound
|
||||
end
|
||||
|
||||
error( "CLIENT not found for: " .. ClientName )
|
||||
if not Error then
|
||||
error( "CLIENT not found for: " .. ClientName )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -432,7 +432,11 @@ function POSITIONABLE:Message( Message, Duration, Name )
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE.
|
||||
-- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #RADIO Radio
|
||||
function POSITIONABLE:GetRadio()
|
||||
self:F2(self)
|
||||
return RADIO:New(self)
|
||||
end
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- This test mission demonstrates the RADIO class, particularily when the transmiter is anything but a UNIT or a GROUP (a STATIC in this case)
|
||||
-- The Player is in a Su25T parked on Batumi, and a Russian command center named "Russian Command Center" is placed 12km east of Batumi.
|
||||
|
||||
-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important.
|
||||
-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here)
|
||||
|
||||
CommandCenter = STATIC:FindByName("Russian Command Center")
|
||||
|
||||
-- Let's get a reference to the Command Center's RADIO
|
||||
CommandCenterRadio = CommandCenter:GetRadio()
|
||||
|
||||
-- Now, we'll set up the next transmission
|
||||
CommandCenterRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound,
|
||||
CommandCenterRadio:SetFrequency(108) -- then a frequency in MHz,
|
||||
CommandCenterRadio:SetModulation(radio.modulation.AM) -- a modulation (we use DCS' enumartion, this way we don't have to type numbers)...
|
||||
CommandCenterRadio:SetPower(100) -- and finally a power in Watts. A "normal" ground TACAN station has a power of 120W.
|
||||
|
||||
-- We have finished tinkering with our transmission, now is the time to broadcast it !
|
||||
CommandCenterRadio:Broadcast()
|
||||
Binary file not shown.
@ -0,0 +1,25 @@
|
||||
-- This test mission demonstrates the RADIO class, particularily when the transmiter is a UNIT or a GROUP
|
||||
-- The Player is in a Su25T parked on Batumi, and a Russian MiG-29 creatively named "Sergey" is placed above Kobuleti and is
|
||||
-- inbound for a landing on Batumi
|
||||
|
||||
-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important.
|
||||
-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here)
|
||||
|
||||
Sergey = UNIT:FindByName("Sergey")
|
||||
|
||||
-- Let's get a reference to Sergey's RADIO
|
||||
SergeyRadio = Sergey:GetRadio()
|
||||
|
||||
-- Now, we'll set up the next transmission
|
||||
SergeyRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound,
|
||||
SergeyRadio:SetFrequency(108) -- then a frequency in MHz,
|
||||
SergeyRadio:SetModulation(radio.modulation.AM) -- and a modulation (we use DCS' enumartion, this way we don't have to type numbers).
|
||||
|
||||
-- Since Sergey is a UNIT, we can add a subtitle (displayed on the top left) to the transmission, and loop the transmission
|
||||
SergeyRadio:SetSubtitle("Hey, hear that noise ?", 5) -- The subtitle "Noise" will be displayed for 5 secs
|
||||
SergeyRadio:SetLoop(false)
|
||||
|
||||
-- Notice that we didn't have to imput a power ? If the broadcater is a UNIT or a GROUP, DCS automatically guesses the power to use depending on the type of UNIT or GROUP
|
||||
|
||||
-- We have finished tinkering with our transmission, now is the time to broadcast it !
|
||||
SergeyRadio:Broadcast()
|
||||
Binary file not shown.
@ -0,0 +1,91 @@
|
||||
-- This test mission demonstrates the RADIO class in a practical scenario.
|
||||
-- It also focuses on how to create transmissions faster and more efficiently
|
||||
-- Please Read both RAD-000 and RAD-001, as well as SCH-000 code first.
|
||||
|
||||
-- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important.
|
||||
-- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (115AM here)
|
||||
|
||||
-- The Player is in a Su25T parked on Batumi, and a Russian command center named "Batumi Tower" placed near Batumi will act as Batumi's Radio Tower.
|
||||
-- This mission also features the "Viktor" flight, a Russian Su25, who is inbound for landing on Batumi.
|
||||
-- The goal of this script is to manage the dialog between Viktor and Batumi Tower.
|
||||
|
||||
-- The (short) conversation between Viktor and Batumi Tower will happen on 115 AM
|
||||
-- Time 0 : Batumi Tower "Viktor flight, this is Batumi Tower, enter left base runway one two five, report 5 kilometers final. Over."
|
||||
-- Time 10 : Viktor "Report 5 kilometers final, one two five, viktor"
|
||||
-- Time 145 : Viktor "Batumi Tower, Viktor is 5 kilomters final, request landing clearance. Over?"
|
||||
-- Time 154 : Batumi Tower "Viktor flight, you are claer to land, runway one two five. Check gear down."
|
||||
-- Time 160 : Viktor "Clear to land, One two five, Viktor"
|
||||
-- Time 210 : Viktor "Viktor, touchdown"
|
||||
-- Time 215 : Batumi Tower "Viktor, confirmed touchdown, taxi to parking area, Batumi Tower out."
|
||||
|
||||
|
||||
BatumiRadio = STATIC:FindByName("Batumi Tower"):GetRadio()
|
||||
ViktorRadio = UNIT:FindByName("Viktor"):GetRadio()
|
||||
|
||||
-- Let's first explore different shortcuts to setup a transmission before broadcastiong it
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- First, the long way.
|
||||
BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg")
|
||||
BatumiRadio:SetFrequency(115)
|
||||
BatumiRadio:SetModulation(radio.modulation.AM)
|
||||
BatumiRadio:SetPower(100)
|
||||
|
||||
-- Every RADIO.SetXXX() function returns the radio, so we can rewrite the code above this way :
|
||||
BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):SetPower(100)
|
||||
|
||||
-- We can also use the shortcut RADIO:NewGenericTransmission() to set multiple parameters in one function call
|
||||
-- If our broadcaster was a UNIT or a GROUP, the more appropriate shortcut to use would have been NewUnitTransmission()
|
||||
-- it works for both UNIT and GROUP, despite its name !
|
||||
BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115, radio.modulation.AM, 100)
|
||||
|
||||
-- If you already set some parameters previously, you don't have to redo it !
|
||||
-- NewGenericTransmission's paramter have to be set in order
|
||||
BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115) -- Modulation is still AM and power is still 100 (set previously)
|
||||
|
||||
--If you want to change only the sound file, the frequency and the power for exemple, you can still use the appropriate Set function
|
||||
BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115):SetPower(100)
|
||||
|
||||
-- We have finished tinkering with our transmission, now is the time to broadcast it !
|
||||
BatumiRadio:Broadcast()
|
||||
|
||||
-- Now, if Viktor answered imedately, the two radio broadcasts would overlap. We need to delay Viktor's answer.
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
ViktorRadio:SetFileName("Viktor - Enter left base ack.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):Broadcast() -- We don't specify a subtitle since we don't want one
|
||||
end, {}, 10 -- 10s delay
|
||||
)
|
||||
|
||||
-- Viktor takes 145s to be 5km final, and need to contact Batumi Tower.
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
ViktorRadio:SetFileName("Viktor - Request landing clearance.ogg"):Broadcast() --We only specify the new file name, since frequency and modulation didn't change
|
||||
end, {}, 145
|
||||
)
|
||||
|
||||
-- Now that you understand everything about the RADIO class, the rest is pretty trivial
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
BatumiRadio:SetFileName("Batumi Tower - Clear to land.ogg"):Broadcast()
|
||||
end, {}, 154
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
ViktorRadio:SetFileName("Viktor - Clear to land ack.ogg"):Broadcast()
|
||||
end, {}, 160
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
ViktorRadio:SetFileName("Viktor - Touchdown.ogg"):Broadcast()
|
||||
end, {}, 210
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
BatumiRadio:SetFileName("Batumi Tower - Taxi to parking.ogg"):Broadcast()
|
||||
end, {}, 215
|
||||
)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<li>Positionable</li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li><a href="Radio.html">Radio</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>
|
||||
@ -164,6 +165,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetPositionVec3">POSITIONABLE:GetPositionVec3()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the <a href="DCSTypes.html##(Position3)">DCSTypes#Position3</a> position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetRadio">POSITIONABLE:GetRadio()</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -491,6 +498,27 @@ The POSITIONABLE is not existing or alive. </p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetRadio" >
|
||||
<strong>POSITIONABLE:GetRadio()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p>
|
||||
|
||||
|
||||
<p>Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
||||
Radio</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POSITIONABLE).GetRandomVec3" >
|
||||
<strong>POSITIONABLE:GetRandomVec3(Radius)</strong>
|
||||
</a>
|
||||
@ -1014,6 +1042,8 @@ self</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(RADIO)" >Type <code>RADIO</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<li><a href="Positionable.html">Positionable</a></li>
|
||||
<li>Process_JTAC</li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li><a href="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<li><a href="Positionable.html">Positionable</a></li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li>Process_Pickup</li>
|
||||
<li><a href="Radio.html">Radio</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>
|
||||
|
||||
803
docs/Documentation/Radio.html
Normal file
803
docs/Documentation/Radio.html
Normal file
@ -0,0 +1,803 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
||||
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
||||
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
||||
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
||||
<li><a href="Account.html">Account</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
||||
<li><a href="Assign.html">Assign</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="Cargo.html">Cargo</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
||||
<li><a href="Controllable.html">Controllable</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Detection.html">Detection</a></li>
|
||||
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="Fsm.html">Fsm</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="Identifiable.html">Identifiable</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="Mission.html">Mission</a></li>
|
||||
<li><a href="Object.html">Object</a></li>
|
||||
<li><a href="Point.html">Point</a></li>
|
||||
<li><a href="Positionable.html">Positionable</a></li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li>Radio</li>
|
||||
<li><a href="Route.html">Route</a></li>
|
||||
<li><a href="Scenery.html">Scenery</a></li>
|
||||
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><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>Radio</code></h1>
|
||||
|
||||
<p><strong>Core</strong> - The RADIO class is responsible for <strong>transmitting radio communications</strong>.</p>
|
||||
|
||||
|
||||
|
||||
<p>--- bitmap</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<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.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h3>Authors: Hugues "Grey_Echo" Bousquet</h3>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#RADIO">RADIO</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</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</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">
|
||||
|
||||
</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, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Create a new transmission, that is to say, populate the RADIO with relevant data</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</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</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="##(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="#(RADIO)" >Type <code>RADIO</code></a></h2>
|
||||
|
||||
<h1>1) RADIO class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<h2>1.1) 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="Positionable.html##(POSITIONABLE).Broadcast">Positionable#POSITIONABLE.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>
|
||||
</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).SetLoop">RADIO.SetLoop</a>() : Choose if you want the transmission to be looped,</li>
|
||||
<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="Wrapper.Positionable.html##(POSITIONABLE)">Wrapper.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</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(RADIO)">#RADIO</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- The Radio has to be populated with the new transmission before broadcasting.
|
||||
-- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
|
||||
-- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
|
||||
-- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
|
||||
-- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
|
||||
-- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
|
||||
-- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored</code></pre>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</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</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>
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(RADIO).NewGenericTransmission" >
|
||||
<strong>RADIO:NewGenericTransmission(Filename, Frequency, Modulation, Power, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Create a new transmission, that is to say, populate the RADIO with relevant data</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> ... </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>-- 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
|
||||
-- Only the RADIO and the Filename are mandatory</code></pre>
|
||||
|
||||
</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</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>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </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>-- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
|
||||
but it will work for any POSITIONABLE
|
||||
-- Only the RADIO and the Filename are mandatory</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Wrapper.Positionable.html##(POSITIONABLE)">Wrapper.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</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>-- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration</code></pre>
|
||||
|
||||
</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>
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</a></li>
|
||||
<li>Route</li>
|
||||
<li><a href="Scenery.html">Scenery</a></li>
|
||||
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</a></li>
|
||||
<li><a href="Route.html">Route</a></li>
|
||||
<li>Scenery</li>
|
||||
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</a></li>
|
||||
<li><a href="Route.html">Route</a></li>
|
||||
<li><a href="Scenery.html">Scenery</a></li>
|
||||
<li>ScheduleDispatcher</li>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
@ -1870,9 +1871,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
@ -310,6 +311,12 @@ are design patterns allowing efficient (long-lasting) processes and workflows.</
|
||||
<td class="name" nowrap="nowrap"><a href="Process_Pickup.html">Process_Pickup</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Radio.html">Radio</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Core</strong> - The RADIO class is responsible for <strong>transmitting radio communications</strong>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
<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="Radio.html">Radio</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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user