Jump to content

Sound for .xml gauge-NOT!


jsaviator

Recommended Posts

I´ve been beating my head bloody for the past two days on this, and I need some help-- I am adding an inertia starter sound to a gauge [which is a simple toggle switch to kick in before hitting the starter-- unless someone has a better idea ;) ], and I have a sound to add to it. The switch itself works, but no sound. I have set up the .ini file to the best of my understanding per examples on various forums, but even with those there are variances (notably in underscores, which I don't know if I need or not, and if so, where)... I am sure it is, at the least, a syntax error, so if anyone could take a look at what I have and correct it for me, I´d appreciate it-- I understand **very basically** what is going on with the commands in it, but writing them correctly is beyond me...

 

The .XML (SwitchInertiaStarter)

*****************************

(L:Inertia starter switch, bool)

Inertia Starter Switch (%((L:Inertia starter switch, bool))%{if}%((L:Electrical external power available, bool))%{if}ON%{else}NOT AVAILABLE%{end}%{else}OFF%{end})

(L:Inertia starter switch, bool) ! d (>L:Inertia starter switch, bool) if{ 1 (>L:Sound inertia, enum) } els{ 1 (>L:Sound toggle switch off, enum) }

**************************************

(I would like it better if it were a spring-loaded toggle switch that would play all of the 5-second .wav file even after it springs to the off position, but I have no idea how...)

 

The .ini file (dsd_switches_sound):

***********************************

[Config]

MaxSounds=1

LvarStop=dsd_stop_sounds

 

[sounds]

Sound00=./Sound/dsd/Inertia.wav

 

[LVars]

Lvar00=InertiaStarterSwitch

***************************

(For the moment I only have the one switch sound, but when I have an idea of the conventions for this, I will be able to add more as needed)

 

Anyway... if someone would be so kind as to make corrections for me so I have a good working example to go by, I would be greatly appreciative! Thanks...

 

 

Scott Anderson

[sIGPIC][/sIGPIC]

Scott Anderson

First Officer, Air Mail Division (BGAM 006)

Bluegrass Airlines (VA)

Link to comment
Share on other sites

Oh, also-- the panel.cfg entries:

*********************************

gauge66=Inertia_Starter!SwitchInertiaStarter, 156,689,22,53

 

gauge50=Inertia_Starter!dsd_xml_sound3, 2,2,5,5,.\Gauges\dsd_switches_sound.ini

 

...and the reason I have a separate switch for the inertia starter is because it's supposed to work like a B-17: first you hit the inertia starter, the you engage the engine (if anyone wonders what I'm up to)...

[sIGPIC][/sIGPIC]

Scott Anderson

First Officer, Air Mail Division (BGAM 006)

Bluegrass Airlines (VA)

Link to comment
Share on other sites

A suggestion for a workaround. I can't follow this code completely and recing on phone so won't advise on that now.

 

Workaround. It seems like you have your switch turn on the sound. You then want to have it play 5 secs.

 

From a brief look I think you have the sound play as result of your L:var.

But the lvar turns 0 again on the next gauge cycle. So the sound turns off.

 

For a possible fix for that. See my 'speed gauge' thread lower down. Last post in it, I explain how i made a gauge do 3 cycles before resetting an L:var.

 

But, maybe there's a better option.

Thinking, make the sound play as result of the sim's starter engine that you switch on. Find if possible what A:var changes when using your switch.

 

Imagining

your switch

starter engine (sim does 5 seconds anyway)

sound on as starter engine is on

2 secs later your switch again

starter enging cranks again

sound also restarts automatically

after 5 secs starter engine off

sound off automatically.

 

Sorry for being all over the place. In a hurry. Good luck on it.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

gauge50=Inertia_Starter!dsd_xml_sound3, 2,2,5,5,.\Gauges\dsd_switches_sound.ini

I am far from being a pro at gauges, but I noticed one thing that is a problem with your panel entry shown above.

The MUST be a space between the last , (comma), and the ./ part.

IE: You must make it gauge50=Inertia_Starter!dsd_xml_sound3, 2,2,5,5, .\Gauges\dsd_switches_sound.ini .

Notice now there is a space between 2,2,5,5, and the .\Gauges\dsd_switches_sound.ini parts.

Is that the entire problem? I can't say, but it is A problem.

 

Hope this helps a teensy bit...

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Just to be sure, I should have specified that there needs to be A space. Just one. Not more, not less. I recall that from a discussion we had about that sort of thing from the FSFT forum. I'll see if I can dig up the posts having to do with it...

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Pat, I think I found one for you.

I'll link to the post that is about adding a sound using a gauge.

 

The thread itself is a good read. -Warning, it's a long one-

We were helping someone add an existing addon gauge. The altitude-alerter gauge. Almost every possible install error was explained.

https://www.flightsim.com/vbfs/showthread.php?292262-Adjustable-altitude-callout&p=1936721#post1936721

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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