Lifenbaucher Posted June 28, 2013 Report Posted June 28, 2013 Hi, I was wondering whether this was possible: Basically I wanted to know if I could assign my mouse yoke (X-axis) to control the rudder (and hence the steering) whilst holding down/pressing a specific key, much like the "space-bar" mouse look option. The reason being is that whilst the "auto-rudder" option does this to some extent, when taking off and travelling at speeds above 100 knots, the plane starts to bank when trying to keep it centre on the runway, because the inputs still go to the ailerons. I wanted to ask this here because I hope your FSUIPC module can offer this funtionality that obviously FSX alone cannot. Thanks
Pete Dowson Posted June 28, 2013 Report Posted June 28, 2013 Basically I wanted to know if I could assign my mouse yoke (X-axis) to control the rudder (and hence the steering) whilst holding down/pressing a specific key, much like the "space-bar" mouse look option. I'm afraid there are no general "axis" type assignments available for the mouse, only the specific facilities of mouse look, mouse move and mouse trim already pre-programmed. Whilst a more generic assignment might be useful, the applications for such have, so far, been very very rarely requested. So much so yours is the first, really, in all these years. I would not want to add such a facility as a normal option. The most I would probably consider would be added Lua plug-in functions to allow mouse events such as left/right/up/down and wheel and button actions. Certainly with such you could program it as you wished. However, whilst this would cerainly be a possibility, it is not a trivial job and I can't consider it for a few weeks, with too many other things occupying me. However, i will add the idea to my list -- but for FSUIPC4 and Wideclient only. I'm not wanting to change FSUIPC3 (for FS9 and earlier) further. Regards Pete
Pete Dowson Posted July 7, 2013 Report Posted July 7, 2013 The most I would probably consider would be added Lua plug-in functions to allow mouse events such as left/right/up/down and wheel and button actions. Certainly with such you could program it as you wished. Okay, it is done. Version 4.908 of FSUIPC4 includes full support for Lua plug-ins to see mouse events and act upon them. Please download and install 4.908, and also get the latest Lua plug-ins package. You'll find them in the Download Links subforum. The example I've done is especially aimed at your requirement. It is the plug-in called 'mrudder.lua' inside the Examples zip file. Just put that into your FS Modules folder then edit your FSUIPC4.INI file adding: [Auto] 1=Lua mrudder (or a later number if you already have this section with entries). Then load up FS. When everything is up and ready, go into FSUIPC options and assign a button or keypress to "LuaToggle mrudder" in the dropdown. This button or key will switch the whole action on or off. With it off you can use all facilities of the mouse as usual. When it is on, the right mouse button will turn the mouse into a rudder control. It will move the mouse pointer to the current rudder position (left/right position on screen -- centre screen = centred rudder), and movement of the mouse left and right will move the rudder and the mouse pointer to match. The up/own movement isn't relevant. When you release the right button, the mouse pointer will go back to its position before you pressed it. If you look at the mrudder.lua file in a text ditor you will see how it works and can change it to more suit your needs if you like. Have fun! Regards Pete
flyguy1 Posted July 15, 2015 Report Posted July 15, 2015 Hi Pete. I was trolling around the web looking for something that the OP was asking for, just to try out. I found this post, and wanted to say thank you for adding the function. I know it's been a couple of years or so (very close actually), and the OP I think got busy when he got your gift. Thank you for all that you've done for us through the years.
Lifenbaucher Posted October 8, 2015 Author Report Posted October 8, 2015 Okay, it is done. Version 4.908 of FSUIPC4 includes full support for Lua plug-ins to see mouse events and act upon them. Please download and install 4.908, and also get the latest Lua plug-ins package. You'll find them in the Download Links subforum. The example I've done is especially aimed at your requirement. It is the plug-in called 'mrudder.lua' inside the Examples zip file. Just put that into your FS Modules folder then edit your FSUIPC4.INI file adding: [Auto] 1=Lua mrudder (or a later number if you already have this section with entries). Then load up FS. When everything is up and ready, go into FSUIPC options and assign a button or keypress to "LuaToggle mrudder" in the dropdown. This button or key will switch the whole action on or off. With it off you can use all facilities of the mouse as usual. When it is on, the right mouse button will turn the mouse into a rudder control. It will move the mouse pointer to the current rudder position (left/right position on screen -- centre screen = centred rudder), and movement of the mouse left and right will move the rudder and the mouse pointer to match. The up/own movement isn't relevant. When you release the right button, the mouse pointer will go back to its position before you pressed it. If you look at the mrudder.lua file in a text ditor you will see how it works and can change it to more suit your needs if you like. Have fun! Regards Pete Hi Pete. I was trolling around the web looking for something that the OP was asking for, just to try out. I found this post, and wanted to say thank you for adding the function. I know it's been a couple of years or so (very close actually), and the OP I think got busy when he got your gift. Thank you for all that you've done for us through the years. Dear Pete Thanks for adding this functionality. Im sorry this has been almost 2 years late. I had actually found a neat program that can make your keyboard into a joystick. This allowed me to use the left and right arrow keys as an "axis" that auto-centered if I released the keys. Therefore I got caught on this and never checked my original post. I appreciate your work however to implementing this. Ironically that "neat program" is no longer compatible with Win 10 and P3D v3, and unfortunately that brings me back to square one. This is probably the first time I've been back to this support thread! Thanks
Pete Dowson Posted October 8, 2015 Report Posted October 8, 2015 ... unfortunately that brings me back to square one. This is probably the first time I've been back to this support thread! So, is there a new question? Pete
Andreas Gücklhorn Posted December 9, 2017 Report Posted December 9, 2017 Hello Pete, I just bought the full version of FSUIPC for P3D in order to get the rudder mouse control to work. Unfortunately, the LUA script was killed: 193719 LUA: "C:\P3D\Modules\mrudder.lua": killed So, I am not sure what to do to get it to work :(
Andreas Gücklhorn Posted December 9, 2017 Report Posted December 9, 2017 My FSUIPC5.ini looks like: [Auto] 1=Lua mrudder [LuaFiles] 1=mrudder [Keys] 1=82,8,L1:R,0 -{R: Press=Lua mrudder }- and here the FSUIPC5.log: 117500 === DLLStop called ... 117500 === Closing external processes we started ... 118500 === About to kill any Lua plug-ins still running ... 118640 Lua threads being terminated: 118640 0 = "C:\P3D\Modules\mrudder.lua" 118797 LUA: "C:\P3D\Modules\mrudder.lua": killed 118797 === Closing global Lua thread 119812 === About to kill my timers ... 120015 === Restoring window procs ... 120015 === Unloading libraries ... 120015 === stopping other threads ... 120015 === ... Button scanning ... 120109 === ... Axis scanning ... Hope this helps!
Pete Dowson Posted December 9, 2017 Report Posted December 9, 2017 45 minutes ago, Andreas Gücklhorn said: Unfortunately, the LUA script was killed: But it was killed in the normal process of closing down the Sim, as clearly shown in the Log! All threads started by FSUIPC must be closed to allow P3D to close down tidily! If you want the thread to continue running, then so must FSUIPC and P3D! Pete
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