May 8, 201214 yr Author Dave, one question, will this script also take care of the autoignition switches ... turning them off? Or better can you please quick explain, what switches will get turned off with the script as I can see some more unnamed controlls beeing "handled" ? Thanks so much! Best regards,
May 8, 201214 yr If your auto-ignitions are on to start with, I guess there's something different about our default start-up flights because mine are off. I'll work on that... What are the other issues you're having?
May 8, 201214 yr Author Yes Dave, the Autoingitions are on on startup, I use a cold & dark FSX Baron as default ?! There is about nothing more to complain about except this, your script is perect! I also could use that single VAR for the autoignitions as a LUA to setup my switches in my little homecockpit, as till now I can only activate them but not deactivate them with a switch ?! Thanks so much for that great help! Best regards,
May 8, 201214 yr ipc.control(66535) will get you what you're looking for with the ignition. That one is called "toggle_master_ignition_switch". I edited the LUA in my post above with that change...give it a shot and let me know. Since 66535 is a toggle it may not work well if you have an on/off switch in your home cockpit. The only ignition controls (that I could locate, anyway) applicable to turbines are all toggles. I tried passing the magneto_on and _off controls but that didn't seem to have any affect on the ignition in the C90. I see what your other question is now... the "unnamed controls" being manipulated by the script are (in order) avionics master, L/R engine anti-ice (you would want your ice vanes OPEN for all ground ops in a King Air), master battery/alternator, prop pitch to feather, mixture cut-off, master ignition toggle. P.S. Actually, I know exactly what's different about my startup flight! At one point, I loaded the default Cessna, killed the engine with the magnetos and then re-saved it. The running engine bugged me for some reason but I didn't want to cause problems by pulling the mixture, lol.
May 8, 201214 yr Author Thanks much Dave! Will try very soon and will let you know if it works! As for my switches they are two-way-active so normally I can assign the upper position as toggle (on) and downward position for again toggle (off). Works with my other commands like Autofeathering great too! Best regards,
May 8, 201214 yr Author ipc.control(66535) will get you what you're looking for with the ignition. That one is called "toggle_master_ignition_switch". I edited the LUA in my post above with that change...give it a shot and let me know. Since 66535 is a toggle it may not work well if you have an on/off switch in your home cockpit. The only ignition controls (that I could locate, anyway) applicable to turbines are all toggles. I tried passing the magneto_on and _off controls but that didn't seem to have any affect on the ignition in the C90. I see what your other question is now... the "unnamed controls" being manipulated by the script are (in order) avionics master, L/R engine anti-ice (you would want your ice vanes OPEN for all ground ops in a King Air), master battery/alternator, prop pitch to feather, mixture cut-off, master ignition toggle. P.S. Actually, I know exactly what's different about my startup flight! At one point, I loaded the default Cessna, killed the engine with the magnetos and then re-saved it. The running engine bugged me for some reason but I didn't want to cause problems by pulling the mixture, lol. Hello Dave, it works all perfect as described except the Autoignition beeing still Armed on startup and with your cold & dark lua-script. It will "re-arm" when deactivated by mouse first with the script but not disarm! I had to take out the values for Bat / Gen1 / Gen2 and some others as with your script on my setup these will get activated. Well, the only thing left as said are the auto-ignition-switches. This is now my personal script, autoignition left out as it does not funtion till now: ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_INVERTER", 0) ipc.sleep(200) ipc.control(66701, 0) ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_VENT_BLOWER",-1) ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_EFIS_POWER",0) ipc.sleep(200) ipc.display("Cold and dark script complete") ipc.sleep(3000) Such great work you´ve done so far! How do you detect these values in FSX? Nice to be able to check each variable´s function in fsx by deleting it out of the script on the fly! The elevator_trim and Rudder_boost variables I will use as a further independable Lua-script to activate these before takeoff. Best regards,
May 9, 201214 yr C I am not as fluent as others but could you please how you created a text file and where exactly do you place in the Modules section or in the FSUIPC subsection? Thanks Richard Spencer Churchill PVT SEL GYSGT USMC (ret)
May 10, 201214 yr Author For those who haven't been up to the task yet yet, you'll find that this should do that trick... Instructions: 1. Go to the Modules folder of your FSX directory (where FSUIPC would be located). 2. Create a new text file in that folder and paste the code found below. 3. Name the file: BE90_cold_dark.lua 4. In FSX, open the FSUIPC menu and assign an unused key combo to "Lua BE90_cold_dark". C I am not as fluent as others but could you please how you created a text file and where exactly do you place in the Modules section or in the FSUIPC subsection? Thanks Hi Richard, 1. right mouse-click -> create TXT-file 2. insert this: (or other longer script above) ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_INVERTER", 0) ipc.sleep(200) ipc.control(66701, 0) ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_VENT_BLOWER",-1) ipc.sleep(200) ipc.writeLvar("L:ASD_SWITCH_EFIS_POWER",0) ipc.sleep(200) ipc.display("Cold and dark script complete") ipc.sleep(3000) 3. save as BE90_cold_dark.lua 4. Put in FSX / modules - folder 5. In FSX, open the FSUIPC menu and assign an unused key combo to "Lua BE90_cold_dark" That really does the trick! Best regards,
May 10, 201214 yr Hi all, Please excuse my ignorance, but is there any way to package the script up into an executable as I don't use FSUIPC? I already use the one created by wombat for the JS41 and it works like a charm. Thanks in advance. Tim Tim Gyno
May 11, 201214 yr Such great work you´ve done so far! How do you detect these values in FSX? Nice to be able to check each variable´s function in fsx by deleting it out of the script on the fly! Andreas, Here's a tutorial on capturing LUA variables That's from the FSUIPC forum directly...you should browse the rest of it for some more help on making LUA scripts. It's all wonderfully simple once you have some help starting off.
October 27, 201213 yr I'm hoping someone can help me with a LUA script for the C90. I'm trying to find out what the name/number of the control is that operates the pilots mic switch. I think the variables are either normal or oxygen mask. I'd be grateful if someone could give me a clue as I just can't locate it. Additionally, is it possible to set the outside temperature to C instead of F. I've tried to identify the keypress but can't locate that one either. Appreciate any assistance as I've used the tutorial above and can't seem to find the two controls I'm looking for. Tim Tim Gyno
October 28, 201213 yr look at this post over at B200. Should be the same. Send me a PM with your email address and will send you the gauge that will set the temp as default to C. You dont need a lua script to set it to C. you can do that with a normal xml gauge that you add. I am not too sure what you meant the pilots mic switch is normal or oxygen mask. Do you need the l:var for these switches? Sorry I miss what you try and find out. I have created a full Lua script already for the C90 that include virtually all switches. http://forum.avsim.net/topic/381521-c90-cold-and-dark-lua-interactive-script/ Seach avsim library forum http://library.avsim...xutil&Go=Search
October 28, 201213 yr Thanks for the quick reply flying-bob. I saw the posts over at the B200 area last night and worked out how to get the temp gauge displaying C. I'll check out your cold and dark LUA tonight. I'm now trying to get the auto ignition toggles to work in a script. They only seem to toggle from Off to On. Not the other way around, which is what I'm looking for. Regarding the pilots mic switch, yes I'm looking for the LUA variable. I'll see if it appears in your cold and dark script. Tim Gyno
October 29, 201213 yr here is the variables for on to off. it is 0x208C, 0 and 0x218C, 0 ---- AUTO IGNITION RIGHT ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-") ipc.sleep(50) ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-Auto Ignition R:") ipc.sleep(130) ipc.writeUW(0x218C, 0) ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-Auto Ignition R: SET OFF") ipc.sleep(90) ---- AUTO IGNITION LEFT ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-") ipc.sleep(50) ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-Auto Ignition L:") ipc.sleep(130) ipc.writeUW(0x208C, 0) ipc.display ("PREPARE SHUTDOWN!\n--------------------------\n-Auto Ignition L: SET OFF") ipc.sleep(90) The pilot mic switch is not in the lua.. I will get it for you tonight if you dont find it.
October 29, 201213 yr Thanks very much for the details flying-bob, I really appreciate it. You have inspired me to invest some time to learn about LUA. Thanks again. Tim Gyno
Create an account or sign in to comment