• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Playing a sound in a DialogAction

Messages
14
Country
belgium
SimVar provides a PROFILE command, which allows you – or FSX, to be precise – to remember things.

I made a mission that starts with a language menu: Dutch, French and English.
With the PROFILE command, I can place a number in a string. Dutch = 1, French = 2, English = 3
CusomAction : SimVar PROFILE Language SET 1
CusomAction : SimVar PROFILE Language SET 2
CusomAction : SimVar PROFILE Language SET 3
In the mission, I want to give information in one of the 3 languages.
Now I want to play a sound. Can I programm a DialogAction with the sound "$Language" + "-sound1.wav"
1-sound1.wav = a dutch speaking voice.
2-sound1.wav = a franch speaking voice.
3-sound1.wav = English speaking voice.

Can that be done?
 
I'm not sure that this is possible, even with SimVar - but I could be wrong. Have you tried the technique yourself, jairs?

Cheers - Dai.
 
That is a tough one and I am new to SimVar. I'm thinking more along the lines of "IF THEN" commands. I think (a little help here Dai) that with SimVar it can "remember" a status - so it can remember which button was selected…and for every time you want a Dialog action, you first go through a IF THEN series to select the correct Dialog action…that's a lot of code and I'm not are it would work.

Quite frankly it wold be easier to create the mission in your native language. The make two copies. FSXME has a nice function that lists all the dialogs and can be saved to a txt file. At that point you can use whatever method you like to change the languages, using the list as your guide, and plug the changes back into the respective missions. Yes you will have three missions but folks are just going to choose the one language they are most familiar with so…

The work is a bit tedious and there are some text to speech apps out there…but if its just the same voice in 3 languages, it shouldn't be too bad.
 
I'm from Belgium, and there they speak Duch and French. And for the others I use English.

I did the programming with the "if / then" CusomAction...
With the PROFILE command, I can place a number in a string. Dutch = 1, French = 2, English = 3
CusomAction : SimVar PROFILE Language SET 1
CusomAction : SimVar PROFILE Language SET 2
CusomAction : SimVar PROFILE Language SET 3
When I need a DialogAction:
CustomAction SimVar IF $Language = 1 then play a DialogAction with a dutch speaking voice.
CustomAction SimVar IF $Language = 2 then play a DialogAction with a French speaking voice.
CustomAction SimVar IF $Language = 3 then play a DialogAction with an English speaking voice.

The mission I made:
Start with the language menu -> Then I show a aircraft menu (You can Choose one of 3 aircrafts.)
-> Cessna : fly a circuit. You have 5 minutes
-> Extra 300: Give us a demonstration (smoke on above 20ft). You have 3 minutes.
-> Piper Cub: follow a delta flyer. You have 4.5 minutes. The deltaflyer is a recorded AirplanePlayback (*.FSR)
If the time is over, place back the plane on the starting point, jump to the language menu.

So this mission is not ending. But if someone crashes, the mission is reloaded.
 
Dai: LOL…"even a blind squirrel finds a nut sometimes":D

For Jaers, glad it worked. Sounds like an interesting mission–something different from the usual–I am intrigued. BTW I visited Belgium once-Brussels and then Mons…and then the airport to go home. A truly beautiful country.

Cheers!
Will
 
Back
Top