Message Queue Script - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-27-2017, 06:11 AM   #1
MasterZelgadis
Member
 
MasterZelgadis's Avatar
 
Join Date: Oct 2010
Location: Ahaus, Germany
Posts: 854
Default Message Queue Script

DCS - SQS

What is this?
At the moment the only option to send voiceovers so that CA players can hear them is "Sound to [All/Coalition]". This is because the CA player has no access to radio equipment, even worse if he is not steering a vehicle, then even "Sound to Country" does not work.

This is not a big problem, unless you have a very dynamic mission, with voiceovers based on actions the players do rather than voiceovers that play after a specific timetable. But in a dynamic mission, situations can occur, when two voiceovers have to be played directly each after another. DCS doesn't buffer those sounds, so the second sound will be played even if the first was not completed, which makes the first one stop. This is especially annoying, when you want to give mission critical information via voiceover

SQS - Sound Queue System

With this script you can send sounds into a queue instead of sending them directly. If a voiceover is added to the queue while another voiceover is still playing, it gets queued up until the first voiceover has ended. Then the next voiceover in the queue is played.

How to use
On mission start load the "sqs.lua" script via "Do Sript File" trigger. You can do this at mission start or after a few seconds. To add a voiceover instead of using the "Sound to.." trigger, use the "sqs.AddSoundToCoalition" function.

Code:
sqs.AddSoundToCoalition(Coalition, SoundFile, Duration)
The coalition has to be a value of 0 (Neutral), 1 (Red), 2 (Blue). Soundfile has to be the filename of a soundfile added to the .miz file. You can do this via your preferred zip tool or by adding a trigger "Sound to ..." which is never actually triggered. Duration is the length of the sound file in seconds. For example:

Code:
sqs.AddSoundToCoalition(2, "MissionBriefing.ogg", 36)
That's all!

Be advised: At the moment only "Sound to Coalition" is supported. I will try to add other ways to send sounds, but that will be more complicated. And because I need the "Sound to Coalition" for my current work in progress mission, I implemented that first

Prerequesites
None. Not even MIST SQS is a mission based script. You can implement it into your mission. Clients do not have to install any mods or scripts.

Incompatibilities
None that I know about. Maybe if a script uses the namespace "sqs".

Performance impact
None that I know about. If you encounter performance issues maybe you can increase the loop interval. Have too little lua experience to give some reliable info about this.

Link
You can find the script with an example mission at my github https://github.com/MasterZelgadis/DCS-SQS
__________________

"Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler."
http://www.space-view.net

Last edited by MasterZelgadis; 03-01-2017 at 05:24 AM.
MasterZelgadis is online now   Reply With Quote
Old 03-01-2017, 05:26 AM   #2
MasterZelgadis
Member
 
MasterZelgadis's Avatar
 
Join Date: Oct 2010
Location: Ahaus, Germany
Posts: 854
Default

Just made a small script regarding this problem here
__________________

"Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler."
http://www.space-view.net
MasterZelgadis is online now   Reply With Quote
Old 05-02-2018, 02:30 PM   #3
falken76
Member
 
Join Date: Mar 2018
Posts: 159
Default

I'm learning how to use the Mission editor right now. I ran into this problem just recently. Is there a way to play another sound ON TOP of one that is playing as opposed to queing it as the next file to play? I have music set to play going to play all to coalition. But I also have event triggers set to go off when certain aircraft are shot down and when that happens it triggers new aircraft to take off from a base and play a sound when the enemy AI dies. When it plays the sound it cancels the music track and plays the enemy ai death sound. Can I stack these on top of each other somehow? The death cry can't be added into the music soundtrack because it needs to remain dynamic since the enemy AI could be shot down at any time or not at all.

Can LUA code be used to actualy break the mechanics of the game to allow this to happen?
falken76 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:24 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.