akis.papapantelis Posted July 13, 2019 Report Posted July 13, 2019 Hello, I have 2 flight sticks (joysticks) in my sim setup. I want to disable/enable the second of them using a button on the first. Is there a way to do this with lua? Mainly I want to disable/enable elevator and aileron input from the second joystick. Thank you, Akis
John Dowson Posted July 14, 2019 Report Posted July 14, 2019 Hi Akis, to do this, you would have to use your lua script to receive the axis values and send on the axis controls. What you need is a lua script to receive your axis values and then send the controls depending upon the state of a flag, also controlled using your button. In your Axis Assignment tab, you need to assign your axis to 'Send to FS as normal axis', and then select the 'LuaValue <your script name>' option. This will send the axis value to a lua variable called ipcPARAM, which you can then optionally use to send the control to the sim, depending upon the state of your button. The lua script should be auto-started (i.e. add it to the '[Auto]' section of your ini. Check the documentation for 'event.param' on page 29 of the Lua Library documentation. Not sure why you would want to do this though.... Cheers, John
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now