Jump to content
Sign in to follow this  
Guest

XML Prop Starter

Recommended Posts

Guest eko

Ok, managed to make a very simple PropStarter toggle, but the only problem is (just like the dreaded Baron 58), that I have to click it overn and over again very fast until it works. What do I need to do to be able to just hold the toggle down and have it fire up the engine?

<Gauge Name="EngineStartProp 1" Version="1.0">   <Element>	  <Select>		 <Value>(A:General eng1 starter, bool)</Value>		 <Case Value="0">			<Image Name="switch_off.bmp" ImageSizes="32,32"/>		 </Case>		 <Case Value="1">			<Image Name="switch_on.bmp" ImageSizes="32,32"/>		 </Case>	  </Select>   </Element>   <Mouse>	  <Help ID="HELPID_GAUGE_STARTER_SWITCH"/>	  <Tooltip ID="TOOLTIPTEXT_LIGHT_STARTER_ON"/>	  <Cursor Type="Hand"/>	  <Click Event="TOGGLE_STARTER1"/>   </Mouse></Gauge>

Share this post


Link to post
Share on other sites
Guest bartels

Try <Cursor Type="Hand" Repeat="Yes"/>Arne Bartels

Share this post


Link to post
Share on other sites
Guest eko

DOH! It's always so simple when you know what you're doing. :-) Thx again Arne.Let me pick your brain for one more, if you don't mind. I'm now trying to create a Magneto Toggle. Where when you press it down, it sets the Magneto to "Both", and when you press it up, it sets the Magento to "Off". Here is what I have so far:

<Gauge Name="Magnetos 1" Version="1.0">  <Element>	<Select>	  <Value>(G:Var1,bool)</Value>		 ...		 ...	  	  <Click>(G:Var1) ! (>G:Var1) 0 (>K:MAGNETO1_BOTH) (G:Var1) 1 (>K:MAGNETO2_OFF)</Click>  </Mouse></Gauge>

I can get the magneto to switch to the "Both" position by leaving out the "(G:Var1) 1 (>K:MAGNETO2_OFF)" portion, but defeats the whole purpose of being able to toggle back and forth from "Both" to "Off".Any tips or guidance would be most appreciated. THX!

Share this post


Link to post
Share on other sites
Guest bartels

What about<Click> (G:Var1) ! (>G:Var1) (G:Var1) if{ 0 (>K:MAGNETO1_BOTH) } els{ 0 (>K:MAGNETO2_OFF) } </Click>?Or<Click> (G:Var1) ! (>G:Var1) (G:Var1) 3 * (>K:MAGNETO1_SET) </Click>This doesn't need an if...else contruction, but relies on the fact that "3" as argument for MAGNETO1_SET is really both magnetos, could also 2 or 4, I'm not 100% sure.Personally I would prefer to use the mageto vars (RECIP ENG1 RIGHT MAGNETO, RECIP ENG1 LEFT MAGNETO) themselves and not a user var, but that's up to you.Arne Bartels

Share this post


Link to post
Share on other sites
Guest eko

Well, you're first suggestion worked fine, so I didn't even bother to try out the second one. :-) You see, all I want is for these suckers to toggle the magnetos to an "on" position, so the seperate starter switch can do its thing. THANK YOU Arne, you have put the final touch on my project I'be been working on:This is something I've been wanting/needing for when I make panels. A GOOD comprehensive collection of toggle switches. Now, I mean toggle switches for everything I can think of.It is a set of 12 XML multi-gauges, which all have identical toggling functions, the only difference is that each gauge is a different toggle switch bitmap, including one all transparent bitmaps gauge.Here is a list of all the funtions they toggle, in alphabetical order:-Toggle/Display AI/Multiplayer Aircraft Labels-Toggle All Lights at once-Master Alternator-Individual Alternator 1,2,3,4 Switches-Autofeather Arm-Full set of Autopilot SwitchesALT, NAV, HDG, AT, SPD, Master, etc. etc.-Autospoiler Arm-Engine Autostart (like the 777)-Master Avionics Switch-Master Battery Switch-Master Battery/Alternator Switch-Beacon Lights-Structural Deice-Prop DeIce-Toggle Exits (like doing a Shift-E!)-Flight Director-Individual Fuel Boost/Pumps 1,2,3,4-Individual Fuel Cutoff Switches 1,2,3,4-Toggle Gear-Landing Lights-Magnetos for Engines 1,2,3,4 (always need these for the older 4 engine prop planes)-Nav-GPS Toggle-Nav Lights-Panel Lights-Parking Brake Toggle-Pitot Heat-Primer Switch-Prop Sync-Seatbelts (Dummy Switch)-Toggle Smoke System-No Smoking (Dummy Switch)-Toggle Spoiler/Speed Brake-Jet Engine Starters 1,2,3,4-Prop Engine Starters 1,2,3,4-Taxi Lights-Wing LightsJust about every single toggle variable, or switch that you could need in a panel is modeled. I will never have to go looking for that elusive switch again! I especially like the Toggle Exits switch. Now this was my way of "getting my feet wet" with XML, as there was minimal writing involved in these. As you can tell with my questions, I really have very little clue how to program anything!I use a variety of bitmaps, so that I will always have one for any panel or occasion. Some are older bitmaps from other gauges which I have extracted or cleaned up, others are variations of default buttons, like a cleaned up 777 style button.Here is a pic of my "test workbench" panel with all the different button graphics on it.http://www.lovett.org/jsp/pub/fs/buttons.jpgHere are all the switches modeled with a "Lear Style" button:http://www.lovett.org/jsp/pub/fs/buttons_lear.jpgAnd with a Steel look:http://www.lovett.org/jsp/pub/fs/buttons_steel.jpgI also have an XML gauge I did for Eric's RADAR package which has a comprehensive set of panel ident toggles with new buttons, etc. With these two tools as a panel designer, God help me if I can't find the right switch! :-)P.S. The "Repeat" addition to the PropStarter didn't work Arne... you still have to click it repeatedly. :-(

Share this post


Link to post
Share on other sites
Guest bartels

>P.S. The "Repeat" addition to the PropStarter didn't work Arne... you still have to click it repeatedly.Oops wrong line,sorry. It should be:<Click Event="TOGGLE_STARTER1" Repeat="Yes"/>Arne Bartels

Share this post


Link to post
Share on other sites
Guest

To Eco mostly.I noticed you had "open_exits" in your switchlist. How did you do those? I'm not sure if I should add a switch to open the doors (yet), but I need to make a "door_open" annunciator. And would it work with multiple "exits" as well?

Share this post


Link to post
Share on other sites
Guest bartels

I assume0 (>K:TOGGLE_AIRCRAFT_EXIT)and possibly1 (>K:TOGGLE_AIRCRAFT_EXIT)2 (>K:TOGGLE_AIRCRAFT_EXIT)...for exit 1,2,...But also a combination with the SELECT_x events is thinkable.The variable is (A:CANOPY OPEN,...Arne Bartels

Share this post


Link to post
Share on other sites
Guest eko

My switch simply calls the Toggle_Aircraft_Exit variable. That's it.

Share this post


Link to post
Share on other sites
Guest

Thanks guys, must have missed this. I now have my long missed door warning in place.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...