Hi everyone, while fly 737s, on all other add-ons, I have 2 key set on my buttonpanel to make input on both starter switch, to make it easy for set CONT/OFF up on taking off and landing as it's much convenient to do so than use mouse click on high workload condition.
For default IXEG inputs, I can only set one switch with one joystick input, so I tried to make a Flywithlua script to make it work.
My code for this part is:
dataref("IX3_ENG1S", "ixeg/733/engine/eng1_start_act", "writable")
dataref("IX3_ENG2S", "ixeg/733/engine/eng2_start_act", "writable")
function IX3_ENGS_CONT()
IX3_ENG1S = 1
IX3_ENG2S = 1
end
create_command("ixeg/733/overhead/ENGS_CONT", "ENGS_CONT", "IX3_ENGS_CONT()", "", "")
function IX3_ENGS_OFF()
IX3_ENG1S = 0
IX3_ENG2S = 0
end
create_command("ixeg/733/overhead/ENGS_OFF", "ENGS_OFF", "IX3_ENGS_OFF()", "", "")
I noticed when this lua is running, even without the lower part, just the 2 dataref() part , when I try to start engine, the start switch will not automatically cutoff, AND the engine will go up to 1millon RPM to fly high and crash the airplane at start up(would not happen if just hold the switch by mouse.
I also tried:
function IX3_ENGS_CONT()
command_once("igex/733/overhead/left_engine_startswitch_to_CONT")
command_once("igex/733/overhead/right_engine_startswitch_to_CONT")
end
create_command("ixeg/733/overhead/ENGS_CONT", "ENGS_CONT", "IX3_ENGS_CONT()", "", "")
function IX3_ENGS_OFF()
command_once("igex/733/overhead/left_engine_startswitch_to_OFF")
command_once("igex/733/overhead/right_engine_startswitch_to_OFF")
end
create_command("ixeg/733/overhead/ENGS_OFF", "ENGS_OFF", "IX3_ENGS_OFF()", "", "")
but somehow it doesn't work at all.