stevem737 Posted March 3, 2019 Report Posted March 3, 2019 Hello, I've searched the documentation, forum, and web and I'm totally lost... I'm writing Lua scripts to control the JustFlight Vulcan add-on. If I've got a joystick or button box with, say 50 buttons, it seems I need to do one of the following: Write 50 different Lua scripts in the Modules folder, each assigned manually from the Buttons & Switches tab to each button (which makes for a ton of files to manage); or I've read about putting a single Lua script containing all the button code into the Modules folder and configuring the FSUIPC.INI file to automatically launch it. It seems like (2), above, is the way to go. But, my question is how to write that Lua script to assign a joystick/button combo to a given chunk of code. Is there an example/guidance on writing Lua code to recognize the joystick/button combo, to assign the Lua code to? Logically, something like "For Joystick 1, Button 12 pressed, FUEL_PUMP_7=1", "For Joystick 1, Button 13 pressed, FUEL_PUMP_8=1", and so on. Overall, I'm trying to prevent having 50+ Lua scripts, and instead, have everything in one script for easier management. Thank you for any help.
Paul Henty Posted March 3, 2019 Report Posted March 3, 2019 It would be best for you to repost your question in Pete's main support forum: https://forum.simflight.com/forum/30-fsuipc-support-pete-dowson-modules/ This is a sub-forum about using FSUIPC with .NET programming languages. Pete might not see your post here and I don't know enough about LUA to answer your question here. Paul
stevem737 Posted March 3, 2019 Author Report Posted March 3, 2019 Thank you... sorry, that's what I meant to do.
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