Jump to content

Random radio transmission


simo-dj

Recommended Posts

Hello everybody

I created a mission where there is the possibility to tune to a music radio while in the base. So, tuning in the proper radio frequency and then selecting F10 on the radio menu you can listen to some music while your awaiting to end the ramp start and taxiing to runway.

What i'd like to achieve is that, on each mission start, you get always different song. I guess "SET RANDOM FLAG VALUE" is involved, but still i am unable to "simulate" a real music radio.

Can someone help?

Thanks

 

"If you low&slow you're BBQing, if you hot&fast you're grilling, if you low&fast you're flying an Apache"

Link to comment
Share on other sites

Posted (edited)

Note: This isn't really a 'wish list' feature for DCS (which is the point of this forum). I think your question would best have been asked in the main Mission Editor section. This is supposed to be a forum channel for things we WISH were in the M.E. / Scripting Engine. 

Audio playback in DCS is virtually useless. The few meagre options we've been given (in the ME and scripting) i.e. SOUND TO xxxx are terrible and very limited in use. They've been designed as a barebones as possible and are very inflexible. 

There are lots of options you have. Only one is really worth the effort IMHO. 

I believe if you want to go 3rd party route, that the new freeware SRS has a the ability to playback media on a specified frequency and have playlists / shuffle etc. You could check that, but like almost all 3rd party option, all your clients will need to have it setup (not always easy with SRS) to make it work. 

You could (as I have done) ignore all of ED's sound playback and write your own using LUA scripting and metadata and have that included in the mission. That will give you the most flexibilities but it does mean every possible audio file will have to be loaded into the mission on MISSION START as a SOUND TO COALITION NEUTRAL to get them into the .miz - the ability for us to manually insert into the .miz has unfortunately been removed by ED for some reason.

One thought about your 'random flag value' option, is how are you playing the playlist now? How many possible tracks do you need to shuffle? Because ED didn't bother to make playing multiple audio files SEQUENTIAL and instead, unhelpfully, plays them all at once, the only way to make a 'playlist' in the ME is to know the audio length of each track and delay the next one by the total time elapsed before that track should play. Therefore, if you want a random shuffle (which I *think* is what you're asking for) and for example lets say you have 10 songs, you're going to need 3,628,800 playlists - manually created in the Mission Editor to cover all shuffled possibilities with each playlist having tracks in a unique order and you have to work out all the possible time delays for each track yourself - that you would spend the rest of your life making them. 

Needless to say, that's not the solution, unless you hate life.

You could have a choice of say 3 songs for the FIRST song in the playlist, but all 3 songs would need to be the same song length so it wouldn't screw up the timings for all the subsequent tracks. You could then use your random variable to pick from the 3 before the same 'rest' of the songs would play. 

If people are only listening to music pre taxi, then maybe it's not worth all this effort and they can just play music on their own iPad / other device with their mics off?

Or simplify it, and duplicate your currently (working?) ME triggers and just have the random variable pick from one of a small number say 3, so it cuts down the workload. 

That's all I can think of right now, good luck. 


Edited by TEMPEST.114
Link to comment
Share on other sites

16 ore fa, TEMPEST.114 ha scritto:

Note: This isn't really a 'wish list' feature for DCS (which is the point of this forum). I think your question would best have been asked in the main Mission Editor section. This is supposed to be a forum channel for things we WISH were in the M.E. / Scripting Engine. 

 

 

@TEMPEST.114 As you can see my skills are less than limited! I thought i posted in the main ME section, and, apologies to everyone. Maybe one of the moderators can shift this thread in the right section (apologies again) :bash::wallbash:

And forgive me because i wasn't as clear as i would.

I created a mission in which ramp start the plane/helicopter and, when systems come to life the pilot can tune in a music radio and listening to a song while completing start-up procedures.

Basically the steps are:

-mission start

-pilot start the vehicle

-when radio come to life (my settings are NO EASY COMMS) he/she can choose to tune on a radio playing a song by entering freq and via F10 menu while completing start up

I have a pool of 3/4 songs, no more. I'd like to hear a different song randomly chosen between these 3/4 songs..

IE i start a mission once and i hear a hard rock song, another start and i hear country and so on.

I hope i cleared all this stuff. English is not my language.

And @TEMPEST.114 thank again for your helpful answer and your kindness.

 

 

"If you low&slow you're BBQing, if you hot&fast you're grilling, if you low&fast you're flying an Apache"

Link to comment
Share on other sites

Posted (edited)
2 hours ago, simo-dj said:

-mission start

-pilot start the vehicle

-when radio come to life (my settings are NO EASY COMMS) he/she can choose to tune on a radio playing a song by entering freq and via F10 menu while completing start up

I'm guessing that you implement this by placing a vehicle somewhere close by and have that vehicle add a Advanced Waypoint Action to start sending a transmission (sound file) over your preferred frequency (Perform Command-->Set Frequency, followed by Perform Command-->Transmit Message). 

Now, one way I can imagine you can randomize this within ME is to have a couple of vehicles (each in their own group) that all play a different song file, all set to the same frequency. Now, initially, they would talk over each other, and that would be bad. So, to prevent them from appearing and playing their song over your frequency, you set them all to 'Late Activation'. 

Now, none of them plays music over your frequency.

And now comes the obvious next step: using trigger rules, you randomly choose one - and only one - of them, and activate only that vehicle. It appears, starts broadcasting the song over the chosen frequency, and every time that your mission starts, a song (vehicle) is chosen randomly from the number of songs (vehicles) that you have included with the mission.

I see no way to play audio that was not included in the mission.


Edited by cfrag
  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...