December 23, 200916 yr Hello everyone:Well, those wipers are completely done...I now have them as a set, one on each side, swiping in opposed directions...and they work perfectly! If anyone wants the whole set, images and all, let me know and I'll package it up for you. Or post it on here if I knew how, which I don't.=================================================================Next issue: I'd guess that most of you guys probably know what a Jacobs Engine Brake is for 18-wheel trucks; typically called Jake Brake. When engaged, they generate a very noisy, "blatty" sound whenever the driver takes his foot off the gas pedal. I found a Jake-Brake sound file on YouTube, and I'm trying to incorporate it into this log truck project (see the control circled in yellow on the attached image). Again, the way it works is that the driver activates the control, and from then on whenever he takes his foot off the gas the thing fires off. I've got it working (sort of) with the following code, but poorly; you gotta be quick on the draw to catch it and fire the sound file. Reason for that is because I'm using [AP_DISENGAGE_SOUND] as the trigger. And the reason for that is because I'm stuck using default triggers...I know it's possible to create a specific sound file in th SOUND folder, declare it in the .CFG file, and fire it in XML, but I don't know the process.Anyway, here's the code I'm using. In Flight Sim langauge, this is how it should work: The gauge can be "activated" at any time, but the sound file should fire off only when...(1) The gauge has been activated, AND (2) When Airspeed is greater than 5 knots, AND (3) When Throttle Position Percent is at zero. In human language: He activates the gauge; he drives along, and when he takes his foot off the gas the sound file kicks off. When he steps on the gas again, everything clears and it's ready for the next time he cuts the throttle. <Gauge Name="Jake Brake Gauge"><Image Name="JakeGauge-Backing.bmp"/><Element> <Select> <Value>(A:AIRSPEED INDICATED, knot) 5 < s0 (A:AUTOPILOT MASTER,bool) 0 >= l0 + 2 == if{ (>K:AUTOPILOT_ON) }</Value> </Select></Element>(=== Remember that I'm using AP-OFF to kick the sound file...above is where I turn AP ON at startup===)<Element> <Position X="52" Y="40"/> <Select> <Value>(A:Autopilot master, bool)</Value> <Case Value="0"> <Image Name="Jake-Off.bmp" ImageSizes="39,30"/> </Case> <Case Value="1"> <Image Name="Jake-On.bmp" ImageSizes="39,30"/> </Case> </Select> </Element> <Mouse> <Area Left="0" Top="30" Width="65" Height="40"> <Visible>(A:AIRSPEED INDICATED,knot) 10 > + (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 5 < + 2 ==</Visible> <Cursor Type="Hand"/> <Click Event="AUTOPILOT_OFF"/> </Area> </Mouse></Gauge>If any of you guys have a better approach than this butcher-job of mine, I'd be very grateful. And if anyone wants a copy of the whole truck to play with, let me know and you'll get it.Thanks,Garry
December 23, 200916 yr Garry, Here is some code that may help. A simpler way to reset the autopilot on load, the use of a custom variable for "user" control of the Jake & background code to control the AP when the Jake is on and activated.. ( AP Off )Happy HolidaysRoman Gauge Name="Jake Brake Gauge"><Image Name="JakeGauge-Backing.bmp"/><Update><!-- ON INITIAL LOAD TURN ON AP -->(G:Var1) 0 == if{ 1 (>G:Var1) (>K:AUTOPILOT_ON) }<!-- JAKE ACTIVATION CONTROL -->(A:AUTOPILOT MASTER,bool) 1 == (L:JAKE_SWITCH, bool) 1 == (A:AIRSPEED INDICATED, knot) 5 > (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 5 < & & & if{ (>K:AUTOPILOT_OFF) }<!-- RESET AP (ON) IF UNDER 5 KNOTS OR GIVEN 'ER SOME GAS OR JAKE IS TURNED OFF AND AP IS OFF -->(A:AUTOPILOT MASTER,bool) 0 == (L:JAKE_SWITCH, bool) 0 == (A:AIRSPEED INDICATED, knot) 5 < (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 5 > || || & if{ (>K:AUTOPILOT_ON) }</Update><Element><Position X="52" Y="40"/><Select><Value>(L:JAKE_SWITCH, bool)</Value><Case Value="0"><Image Name="Jake-Off.bmp" ImageSizes="39,30"/></Case><Case Value="1"><Image Name="Jake-On.bmp" ImageSizes="39,30"/></Case></Select></Element><Mouse> <Area Left="0" Top="30" Width="65" Height="40"><Cursor Type="Hand"/><Click>(L:JAKE_SWITCH, bool) ! (>L:JAKE_SWITCH, bool)</Area> </Mouse></Gauge> FS RTWR SHRS F-111 JoinFS Little Navmap
December 23, 200916 yr Garry, I see you are already here in the forum and this post... I modified it while you where here.. Refresh and check it again, sorry.Roman FS RTWR SHRS F-111 JoinFS Little Navmap
December 23, 200916 yr Hmmm...Can't seem to make this code work, Roman. I stacked it neatly and carefully, and checked as thoroughly as I know how; everything below the "Update" line seems okay. Probably just dumb-me missing something small, but there's stuff in that "Update" line that's new to me...if something is amiss, I wouldn't know it. Result is that nothing at all comes up in Flight Sim.Any ideas what I might look for?Thanks, and Happy Holidays right back to you, as well,Garry
December 23, 200916 yr Garry, Sorry me bad, very first line..I hadGauge Name="Jake Brake Gauge">Should be<Gauge Name="Jake Brake Gauge">Hope it works, cannot help anymore for another 8 hours :-)Roman FS RTWR SHRS F-111 JoinFS Little Navmap
December 24, 200916 yr Garry, Here's a totally revised set of code. Realized i missed another tag that I forgot to close... Again sorry, didn't test this at all.. wrote it on a whim.. An hour later I forgot the part missing.My mistakes, so far hopefully no more.... :1. A "<" on the first line2. A closing </Click> following the the first <Click>3. An opening <Gauge> tag "should" include a Version attribute I.E.<Gauge Name="Jake Brake Gauge" Version="1.0">Not tested or proven, but is shown required by the SDK format info, so why not do it. Otherwise it "should" work..........Syntax is the key to XML,, a missing space, a missing tag, wrong syntax etc... will make it all go bad.I hope this can work, even if you donot use the whole code.Using <Update>STUFF TO DO LOGICALLY</Update> is just about the same as having a logic only statement nested in an: <Element><Select> <Value>STUFF TO DO LOGICALLY</Value></Select></Element>Again, I hope you didn't pull all of hair out !! LOLRoman <Gauge Name="Jake Brake Gauge" Version="1.0"><Image Name="JakeGauge-Backing.bmp"/><Update><!-- ON INITIAL LOAD TURN ON AP -->(G:Var1) 0 == if{ 1 (>G:Var1) (>K:AUTOPILOT_ON) }<!-- JAKE ACTIVATION CONTROL -->(A:AUTOPILOT MASTER,bool) 1 == (L:JAKE_SWITCH, bool) 1 == (A:AIRSPEED INDICATED, knot) 5 > (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 5 < & & & if{ (>K:AUTOPILOT_OFF) }<!-- TURN AP ON IF UNDER 5 KNOTS OR GIVEN 'ER SOME GAS OR JAKE IS TURNED OFF AND AP IS OFF -->(A:AUTOPILOT MASTER,bool) 0 == (L:JAKE_SWITCH, bool) 0 == (A:AIRSPEED INDICATED, knot) 5 < (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 5 > || || & if{ (>K:AUTOPILOT_ON) }</Update><Element><Position X="52" Y="40"/><Select><Value>(L:JAKE_SWITCH, bool)</Value><Case Value="0"><Image Name="Jake-Off.bmp" ImageSizes="39,30"/></Case><Case Value="1"><Image Name="Jake-On.bmp" ImageSizes="39,30"/></Case></Select></Element><Mouse> <Area Left="0" Top="30" Width="65" Height="40"><Cursor Type="Hand"/><Click>(L:JAKE_SWITCH, bool) ! (>L:JAKE_SWITCH, bool)</Click></Area> </Mouse></Gauge> FS RTWR SHRS F-111 JoinFS Little Navmap
December 24, 200916 yr Hi Roman:Pat yourself on the back, partner...this thing works GREAT! Exactly what I wanted it to do!No problem with the small bugs; I already found 'em and fixed 'em right away, and the thing came up like a dream. Yeah, I know what you mean about XML...if ANYTHING is not absolutely perfect in the syntax, you simply get nothing at all. I'm not complaining; it's free and it's great that we have it to create FS gauges...but it surely is not the most friendly language I've ever worked with. The biggest problem is that it doesn't tell you anything if you screw up....the whole gauge simply disappears.Okay, I want you to witness the fruits of your labors: I put the whole truck up on the LewisAire website for download. Everything it needs is in the download folder...just unzip it and install it into Flight Simulator 9/Aircraft folder, like you would any other aircraft, and run it. In fact, anyone else reading this is welcome to grab it, play with it, and PLEASE give me some feedback. This is brand new, there could be a few small bugs I didn't catch. Be sure to roam around the panel...lots of clickable stuff on there.http://www.lewisaire.com/LogTruck.html (In Flight Sim, it will show up as LewisAire under Aircraft Manufacturer, and as Log Truck under Aircraft Model)Thanks a million, Roman...great piece of work, and you can be sure that my guys will appreciate it.Garry
December 24, 200916 yr Garry, When a problem comes up doing XML gauges Quote- The biggest problem is that it doesn't tell you anything if you screw up....the whole gauge simply disappears...Take your .XML file (complete file itself, no bitmaps ) and drag into a Windows Internet Explorer window, it will "try" to parse it and give "some" info on where to start looking for the error, it will give line #s and a probable cause. Just a tip... XML is a native web language.. And yes, thanx FS for offering this possibility over C for gauges! Glad it worked for you, will try to start truckin 'n' check er out :-)Happy Holidays,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
December 24, 200916 yr Happy Holidays right back, Roman...Thanks for the editing tip, I'll have to give that a try. And most definitely thanks very much for the XML help! Back to a question on sound files: Do you possibly know of a blurp somewhere on the process for triggering non-system sound files with xml? Meaning...not Flaps, Gear, etc. Some time back I had a plane (don't recall if it was a download or payware plane) that had a bunch of different sound files accessed from the panel, and they were not system triggers. They were called out in the Sound.cfg as different things and being triggered in XML with different functions on the panel. One I remember specifically was a coffee dispenser, with the sound of coffee running into a cup when you triggered it. But now I can't find the plane, and I don't remember the process they used. Take care...Garry
December 24, 200916 yr Garry, There is an add-on gauge (dsd_xml_sound3.zip) here in the library. - http://library.avsim.net/esearch.php?DLID=95460At first it is NOT any easy gauge to setup, but once you get it running adding sounds to a particular aircraft/truck is easy by using XML and modifying a sound.ini file.An easier step by step set of instructions is here. - http://forums1.avsim.net/index.php?showtopic=242896&hl=Read, Re-read, the manual, repeat... The gauge was made with many options in mind, an excellent creation! Thanx Doug!Happy Holidays,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
December 24, 200916 yr Thanks again, Roman...I'll grab it and read-read-read before I blow something. Then I'll probably blow something up nyway.Well, the Big Night is nearly upon us...I hope Santa is good to you this year. If he needs testimony that you've been a good boy, have him call me; you'll get a glowing report from here, I assure you!Take, and Merry Christmas once again.Garry
Create an account or sign in to comment