April 6, 200818 yr Commercial Member (G:Var1) if{ (L:SYSTEM_POWER,bool) (A:ENG1 N2 RPM, percent) 50 < && if{ 0 (>K:TOGGLE_STARTER1) } els{ (G:Var1) -- (>G:Var1) } } (G:Var1) 0 != (A:GENERAL ENG1 STARTER, bool) ||(L:SYSTEM_POWER,bool)(A:GENERAL ENG1 STARTER, bool)5 (>G:Var1)- And in FS it won't work I click it and it goes back to the un-clicked possition, I have four of them and none work, they all do the same thing. Only difference bettween the four is they're changed for the respective engines.Thx for anything! Good Day, Engjell Berisha
April 7, 200818 yr Is the gauge intended for FS9 or FSX? The starting 'procedure' is different for the two. In FSX you do NOT want to be sending multiple "K:TOGGLE_STARTER1" events since in FSX it is now a true toggle. Test for the conditions for start to be true then send one and only one "K:TOGGLE_STARTER1" event. Once you detect the conditions indicating a successful start, send one more "K:TOGGLE_STARTER1" to shut off the starter. Paul
April 7, 200818 yr Commercial Member FS9 mate sorry I didn't include that in my original post. Good Day, Engjell Berisha
April 10, 200818 yr 1.What this code is supposed to do?If to start engines it wont do that,because there is no starting engines command in this code.2.What condition is checked in first line,here:(G:Var1) if{...You havent specified any value for G:Var1 to check,so,as far as I know, in this case condition will be true when G:Var1 will get value of 1.But in your code G:Var1 will never be 1,so all this portion of code:...if{ (L:SYSTEM_POWER,bool)(A:ENG1 N2 RPM, percent) 50 < && if{ 0(>K:TOGGLE_STARTER1) } els{ (G:Var1) --(>G:Var1) } }...will never be executed...
April 10, 200818 yr Author Hi,Consider these two things for FS9 version:-The toggle starter event isn't really a toggle but instead a "timer" that reverts the starter from on to off automatically after few milliseconds; that's the reason you'll see the switch go back to off a while since released. So the solution is to keep clicking the switch until N2 RPM is higher enough (50%).-The local var (L:SYSTEM_POWER,bool) needs to have a value of 1 for the starter event to actually fire; remember to do this in any part of your code otherwise the engine won't start at all.Tom
April 10, 200818 yr Author Hi,>1.What this code is supposed to do?If to start engines it>wont do that,because there is no starting engines command in>this code.Yes there is a starting command : (>K:TOGGLE_STARTER1)>>2.What condition is checked in first line,here:>>(G:Var1) if{...>>You havent specified any value for G:Var1 to check,so,as far>as I know, in this case condition will be true when G:Var1>will get value of 1.But in your code G:Var1 will never be 1,so>all this portion of code:>>...if{ (L:SYSTEM_POWER,bool)>(A:ENG1 N2 RPM, percent) 50 < && if{ 0>(>K:TOGGLE_STARTER1) } els{ (G:Var1) -->(>G:Var1) } }...>>will never be executed...When the switch is clicked, GVAR1 takes a value of 5. This is a boolean TRUE : any boolean value is false (or "0") only if greater than -1 and lesser than 1, the rest of the range is true (or "1"). Tom
April 11, 200818 yr Commercial Member Hey mate, could you give me a whole engine start XML? I'm not really understanding this, I know that to start the engines I need to keep on clicking the button until the engine has started, but I don't want to do that, I want to click the starter and it stays on until 50 N2.Thx for the help so far mate! Good Day, Engjell Berisha
April 11, 200818 yr Author If you want it to work like that, just try replacing in your own code:(L:SYSTEM_POWER,bool)with (A:ELECTRICAL MASTER BATTERY,bool)Tom
April 12, 200818 yr Commercial Member Fantastic! Thanks loads mate, you're a great help!!!One more thing, can anyone tell me what's wrong with this XML gauge:(A:FUEL TANK RIGHT AUX QUANTITY WEIGHT,pound)!5d!- I'm trying to make a C-17 Fuel Display Guage I just need it to display the amount of fuel in lbs, and is there a whay I can control the color it gives the # in? Good Day, Engjell Berisha
April 14, 200818 yr Author Hi,Don't mean to be rude, but what is wrong is that you can't notice what is wrong in that piece of code. Which also means you need to study a bit :-) I suggest FS SDK and Nick Pike's wonderful tutorials (links are available in other posts doing a search) as reasonable sources for a good start point.Tom
April 15, 200818 yr Commercial Member Sorry mate, to be honest I posted that before I gave it to much though, as humans we usually find it easier to have other people answer our questions - hehe.Anyway I've got that handled and I've even began work on a full-functional MFD - so far I've got Engine Page, a PFD, ND, and I'm modifing my Controls page and I've got a few other pages to work on.Anyway thanks loads mate you've been a huge deal of help!!! Good Day, Engjell Berisha
December 20, 200817 yr You can also keep the starter held down in FS9 by creating the code within a fairly fast Update Frequency tag loop and stop issuing the starter command when you detect a successful start (I test the N2 RPM.)-Pv-
Create an account or sign in to comment