mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2025-08-15 10:37:46 +00:00
Added Sound/MSRS/003-PlayTextFile
This commit is contained in:
parent
24df4c4bf7
commit
e56116941d
25
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.lua
Normal file
25
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.lua
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
-- This demo mission will play an external audio file.
|
||||||
|
-- This is a file which is not part of the .miz file.
|
||||||
|
-- Save the file Hello-world.ogg to your Missions folder,
|
||||||
|
-- e.g. C:\Users\<YourUserName>\Saved Games\DCS.openbeta\Missions
|
||||||
|
-- Enter the A-10CII and listen to the radio.
|
||||||
|
-- If you don't own A-10CII you have to change the mission to use another aircraft.
|
||||||
|
|
||||||
|
-- Check dcs.log if something is not working:
|
||||||
|
BASE:TraceClass("MSRS")
|
||||||
|
BASE:TraceLevel(3)
|
||||||
|
BASE:TraceOnOff( true )
|
||||||
|
|
||||||
|
-- Force to use SRSEXE and WINDOWS TTS, no matter what is defined in Moose_MSRS.lua
|
||||||
|
local msrs=MSRS:New()
|
||||||
|
msrs:SetBackendSRSEXE()
|
||||||
|
msrs:SetProvider(MSRS.Provider.WINDOWS)
|
||||||
|
msrs:SetFrequencies(251)
|
||||||
|
|
||||||
|
local fileName = "MSRS-003-PlayTextFile.txt"
|
||||||
|
local folderPath = lfs.writedir() .. 'Missions'
|
||||||
|
local delay = 5
|
||||||
|
|
||||||
|
-- Broadcast text after 5 seconds.
|
||||||
|
MESSAGE:New( "I try to play the external text file now!" ):ToAll():ToLog()
|
||||||
|
msrs:PlayTextFile(string.format("%s\\%s", folderPath, fileName), delay)
|
||||||
BIN
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz
Normal file
BIN
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.miz
Normal file
Binary file not shown.
3
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.txt
Normal file
3
Sound/MSRS/003-PlayTextFile/MSRS-003-PlayTextFile.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Hello World, this is the Moose simple radio text-to-speech class speaking.
|
||||||
|
I'am reading this text file.
|
||||||
|
This is insane, right?
|
||||||
Loading…
x
Reference in New Issue
Block a user