Jump to content
The simFlight Network Forums

MSFSmoveAircraft Lua Script


Recommended Posts

MSFSmoveAircraft.lua is a Lua script that can be used to move an aircraft to a new position in the air or on the ground. Each step includes prompts for the required input and format and entered values must be followed by a carriage return (Enter key).  User inputs include:


The aircraft will be moved after the final carriage return (Enter key). Prior to the move the aircraft can be on the ground or in the air. So, for example, MSFSmoveAircraft can be used to simply turn an a/c around, move it to the other end of a runway, reposition it for another approach after landing, jump ahead in cruise, catch up to another a/c, etc.  After the move you will likely have to move the aircraft engine controls (throttle, etc) a bit to let the sim know of their updated settings.  MSFSmoveAircraft works with aircraft that adhere to the standard FSUIPC offsets, for example, the default Diamond DA-62.  A registered copy of FSUIPC7 is required to execute the MSFSmoveAircraft Lua script. 

This script uses the wnd (Window ) library for display, so you can move the display window with the arrow keys and use the ctrl + arrow keys to resize the window. The window must have the focus to do this. The new window display position will be stored in your FSUIPC .ini file. As an alternative to using the arrow keys you can directly edit the window position and size coordinates in the FSUIPC7.ini file. Look for entries under [ExtWindow].  It seems best to do this when FSUIPC7 is not running. You may also have to edit the window size and position in the lua files.

There are actually two lua scripts involved with MSFSmoveAircraft. The first is MSFSmoveAIrcraft.lua itself, and the other is get_asked_data.lua. The get_asked_data.lua script is called by the MSFSmoveAircraft.lua script.

To install these scripts, simply copy and paste them into the directory where you have your FSUIPC.ini file. You must also then enter the directory path to the  get_asked_data.lua script into the MSFSmoveAircraft script. To do this open the MSFSmoveAIrcraft script with a text editor like Notepad or NotePad++. At the top of the script you will see

-- ***************** Modify path below as needed ********************************************

 get_asked_data_path = "C:\\FSUIPC7\\get_asked_data.lua"  -- this is YOUR path to the get_asked_data lua file location, modify as needed, note the use of double back slashes \\

-- ******************************************************************************************

Where the path "C:\\FSUIPC7\\get_asked_data.lua"  is correct if FSUIPC7 is installed in the root C directory. If your FSUIPC7.ini file (and other lua scripts) are in a different location, modify the above path as needed and save the script.

To use MSFSmoveAircraft.lua, after the install start up the sim and use FSUIPC7 to assign a key or button to activate MSFSmoveAircraft.lua in the usual way.



MSFSmoveAircraft.lua get_asked_data.lua

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.