December 24, 200916 yr To Engell (DVA4110) and Fr. Bill (N4GIX):I'd like to wish both you a wonderful Holiday season from myself and the gang at LewisAire, and I extend personal thanks for your help and direction with that wiper-gauge code; I would never have been able to accomplish it otherwise.If you wish to see the fruits of your efforts first-hand, I've put the whole package (18-wheel log truck) up on the LewisAire website for download. It's all inclusive (meaning everything it needs is in the download folder...it doesn't refer to or require anything else). Just download it, unzip, and install it in your Flight Simulator 9/Aircraft folder like any other plane...and run it. In Flight Sim, it will show up as under Aircraft Manufacturer as LewisAire, and under Aircraft Model as Log Truck.http://www.lewisaire.com/LogTruck.htmlTake care, gents, and best wishes to both of you!Garry
December 24, 200916 yr Merry Christmas right back from all of us, David...Glad you grabbed that contraption, and thanks for the nice words. It has been a challenging project that's a far cry from perfect. But I guess we do the best we can, and building that thing was fun all the way. And, of course, you know that some of the great guys on this forum are directly responsible for some of those cool features.Have fun...don't wreck it because there's no insurance on it yet! :( Later,Garry
December 25, 200916 yr Merry Christmas right back from all of us, David...Glad you grabbed that contraption, and thanks for the nice words. It has been a challenging project that's a far cry from perfect. But I guess we do the best we can, and building that thing was fun all the way. And, of course, you know that some of the great guys on this forum are directly responsible for some of those cool features.Have fun...don't wreck it because there's no insurance on it yet! :( Later,GarryJust a little feedback Gary..........I did a little experimenting to see if the Log Truck would work as an AI Vehicle. Got it to display properly but when it started to taxi it would not follow the taxiway - just continued on straight ahead. Never seen that before.No big deal - but I sometimes like to have AI cars or trucks moving about in some scenery I have put together.Just thought I would pass this along - in case you want to do some detective work and find out why it will not follow a taxi route.Happy New Year !!
December 26, 200916 yr Hello David:Far as I know, none of the LewisAire guys use AI, so I didn't give it any consideration in the design process. But I'll have a peek at it one day and see if I can spot something obvious. I designed it in FSDS 3.0 using the Cessna 182S as the aircraft model...don't know wht it doesn't track; I'm sure the C-182 does. Maybe some kind of small quirk in FSDS (?). Anyway, there's an updated version up there on the website for download, if you're interested. Just some cleanup stuff and a little tweaking on this and that. Gave the parking brake some slower action, added an On/Off switch on the Heater Control panel for that little ventillation fan in the top-left corner...stuff like that.Thanks for the feedback, David...catch you later,Garry Just a little feedback Gary..........I did a little experimenting to see if the Log Truck would work as an AI Vehicle. Got it to display properly but when it started to taxi it would not follow the taxiway - just continued on straight ahead. Never seen that before.No big deal - but I sometimes like to have AI cars or trucks moving about in some scenery I have put together.Just thought I would pass this along - in case you want to do some detective work and find out why it will not follow a taxi route.Happy New Year !!
December 27, 200916 yr Just tried the updated Log Truck - gets better all the time.If the fan supposed to rotate? When I hit the switch it moves a little bit but does not roate as I thought it might. Just curious.
December 27, 200916 yr Thanks David:Yes, it rotates when the truck moves and the switch is on. But poorly. I'm using engine RPM as the variable to rotate it, and apparently RPM doesn't refresh constantly like I thought it would.I have some ideas for a fix...watch for it in the next version :-)Later,Garry
December 27, 200916 yr Moderator If FS9 model, use "Tick18" for constant animation.If FSX model, use "NonRandomAmbient..." for constant animation. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
December 27, 200916 yr Thanks Fr. Bill:Right...I'm familiar with Tick18; it's what I used in FSDS to make the wheels rotate when the vehicle moves. This is an XML gauge, though; not done in modeling. I probably need something akin to what Roman did with those wipers, but without the oscillation into the negative value...a variable that keeps incrementing when the switch is activated, and the proper way to read it in the Fan code itself.My hacking fingers are going crazy here, but so far I haven't come up with just the right thing. This is funny: I tried hacking Roman's wiper-code, and you shoulda seen what happened: The fan spun, sort of...and left a zillion little pieces of fan-blades in its trail! Oh well...Thanks again,Garry
December 27, 200916 yr Moderator This is an XML gauge, though; not done in modeling. I probably need something akin to what Roman did with those wipers, but without the oscillation into the negative value...a variable that keeps incrementing when the switch is activated, and the proper way to read it in the Fan code itself.In that case, if you have X number of bitmaps, you can use something like this:<code> (L:FanSwitch,bool) if{ (L:Fan,enum)++ min X max 0 (>L:Fan,enum) } els{ 0 (>L:Fan,enum) }</code> What this is intended to do is if the (L:FanSwitch,bool) is TRUE, continuously cycle the (L:Fan,enum) variable from 0 to X infinitely, until the (L:FanSwitch,bool) is made FALSE.You would of course have your "fan blade bitmaps" in an <Element> section using the case construction... :(Alternatively, you could treat a single "fan blade bitmap" as if it were a needle, and then use a <Nonlinearity> table to drive the animation... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
December 28, 200916 yr Good morning, Fr. Bill:Thank you for the code, but I'm afraid I must be doing something wrong...or not doing something right. It doesn't fail (the gauge doesn't disappear), but it doesn't rotate. Here's the code for the Fan Switch, which seems to be working okay...not sure if I'm supposed to do something else in here, though: <Gauge Name="Fan Switch"><Image Name="Switch-Backing.bmp"/> <Element> <Visible>(L:FanSwitch,number) 0 ==</Visible> <Element> <Position X="0" Y="0"/> <Image Name="FanSwitch-Off.bmp"/> </Element> </Element> <Element> <Visible>(L:FanSwitch,number) 1 ==</Visible> <Element> <Position X="0" Y="0"/> <Image Name="FanSwitch-On.bmp"/> </Element> </Element> <Mouse> <Area Left="0" Top="0" Width="500" Height="200"> <Cursor Type="Hand"/> <Click>(L:FanSwitch,number) 1 + (>L:FanSwitch,number) (L:FanSwitch,number) 1 > if{ 0 (>L:FanSwitch,number) }</Click> </Area> </Mouse> </Gauge> Here's the code for the fan itself. I tried presenting the boolean argument for the switch (L:FanSwitch,bool) 1 if{ (L:Fan..... but it didn't make any difference. Again, it didn't fail, but it didn't rotate. <Gauge Name="Fan Gauge" Version="1.0"> <Image Name="Fan-Backing.bmp" ImageSizes="286,286"/> <Element> <Visible>(L:FanSwitch,number) 1 ==</Visible> <Position X="0" Y="0"/> <MaskImage Name="Fan-Mask.bmp" ImageSizes="286,286"> <Axis X="143" Y="143"/> </MaskImage> <Image Name="FanBlades.bmp" Luminous="Yes" ImageSizes="256,256"> <Axis X="128" Y="128"/> </Image> <Rotate> <Value>(L:FanSwitch,bool) if{ (L:Fan,enum)++ min X max 0 (>L:Fan,enum) } els{ 0 (>L:Fan,enum) }</Value> </Rotate> </Element> <Element> <Position X="0" Y="0"/> <Image Name="FanShroud.bmp"/> </Element> If I replace the (Rotate) code with: <Value>(A:General eng rpm:1,RPM) /+/</Value> the fan does rotate with throttle (RPM) activity when the switch is ON.So...do you see something obvious in here, or do I have it messed up beyond repair? I appreciate your time and efforts, and I hope I'm not being a pain in the neck with this.Thanks much,Garry
December 28, 200916 yr Moderator The mouse code can be simplified considerably using the syntax shown below. This simply toggles the value of (L:FanSwitch,bool) between 0 and 1... ;) <Mouse> <Area Left="0" Top="0" Width="500" Height="200"> <Cursor Type="Hand"/> <Click>(L:FanSwitch,bool) ! (>L:FanSwitch,bool)</Click> </Area> </Mouse> </Gauge> <Rotate> <Value>(L:FanSwitch,bool) if{ (L:Fan,enum)++ min X max 0 (>L:Fan,enum) } els{ 0 (>L:Fan,enum) }</Value> </Rotate> You need to replace "X" with a real number... like maybe 360... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
December 29, 200916 yr Moderator The script below will work for you. It is the same script I use in one of my gauges to "spin" a little twirlly icon (similar to the familiar Windows activity icon) while the gauge runs through an "initialization routine." <Gauge Name="Fan Gauge" Version="1.0"> <Image Name="Fan-Backing.bmp" ImageSizes="286,286"/> <Element> <Position X="0" Y="0"/> <MaskImage Name="Fan-Mask.bmp" ImageSizes="286,286"> <Axis X="143" Y="143"/> </MaskImage> <Image Name="FanBlades.bmp" Luminous="Yes" ImageSizes="256,256"> <Axis X="128" Y="128"/> </Image> <Rotate> <Value> <!-- The speed of the rotation may be adjusted by the divisor following the (L:Fan,enum) variable --> (L:Fan,enum) 30 / </Value> </Rotate> </Element> <!-- The script below will reset the (L:Fan,enum) variable to 0 if greater than 360 --> <Element> <Select> <Value> (L:Fan,enum) 360 > (A:Electrical Master Battery,bool) 1 == and if{ 0 (>L:Fan,enum) } </Value> </Select> </Element> <!-- The script below will increment the (L:Fan,enum) variable from 0 to 360 --> <Element> <Select> <Value> (L:FanSwitch,bool) 1 == (A:Electrical Master Battery,bool) 1 == and if{ (L:Fan,enum) ++ (>L:Fan,enum) } </Value> </Select> </Element> <Element> <Position X="0" Y="0"/> <Image Name="FanShroud.bmp"/> </Element> </Gauge> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment