Jump to content

Recommended Posts

Posted

Hello all!

Please accept excuses for bumping a frequently stressed theme. I've searched up and down the net, but was not able to find an answer to the following question: how to map a keyboard key to jointly move both condition levers? (I.e. not a quadrant, not a joystick, not the mouse - just the keyboard, precisely, two keys for both directions.)

Thanks a lot for any input!

  • Upvote 1
Posted
2 hours ago, Babbo said:

Hello all!

Please accept excuses for bumping a frequently stressed theme. I've searched up and down the net, but was not able to find an answer to the following question: how to map a keyboard key to jointly move both condition levers? (I.e. not a quadrant, not a joystick, not the mouse - just the keyboard, precisely, two keys for both directions.)

Thanks a lot for any input!

can't be done.

Posted

... anyway, I tried it. So we may discuss the following script - for me it's running fine:

local CL_time
CL_DRef = "LES/saab/CL/manip_common"

create_command("FlyWithLua/LES/Saab/CL_increase",
               "Move condtion lever towards Max",
	       "CL_time = os.clock() + .1\nset(CL_DRef, get(CL_DRef) + .01)\nset(CL_DRef, math.min(get(CL_DRef),1))",
               "if os.clock() > CL_time then\nset(CL_DRef, (get(CL_DRef) + (os.clock() - CL_time) * .05))\nend\nset(CL_DRef, math.min(get(CL_DRef),1))",
               "")
			   
create_command("FlyWithLua/LES/Saab/CL_decrease",
               "Move condtion lever towards Min",
	       "CL_time = os.clock() + .1\nset(CL_DRef, get(CL_DRef) - .01)\nset(CL_DRef, math.max(get(CL_DRef),0))",
               "if os.clock() > CL_time then\nset(CL_DRef, (get(CL_DRef) - (os.clock() - CL_time) * .05))\nend\nset(CL_DRef, math.max(get(CL_DRef),0))",
	       "")

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...