FlyWithLua scripts

FlywithLua is the Lua 5.1 script engine for X-Plane, which makes creating and running scripts easy.
You can download FlyWithLua here: Forum download and how to start First Steps

I have created some Lua scripts that may be helpful for you too. The following scripts are available:

NB: sometimes the same variable is used in the various scripts -> just delete duplicate variables (or comment out by using –).


 

Settings per plane

With this script you can load different Joystick settings for each plane. Each time you load a plane, the script will load your settings as well, based on the ICAO code of your plane.

Show lua code

To make this script fit your situation you need to know:
1. the Axis and Button numbers of your Joystick
2. the ICAO code of your planes

  • Ad 1: open the file “initial_assignments.txt” in the FLyWithLua folder. It will tell you the Axis numbers + the offset for your Joystick. The offset in this example is: 12×40 = 480 (and 13×40 = 480 + 40). You can also see the ICAO of the plane you loaded.
  • Ad 2: look in “initial_assignments.txt” OR in Planemaker. Sometimes the ICAO is blank, but you can always fill in an ICAO yourself. See screenshots below.
Show initial_assignments.txt
Screenshots Planemaker

Go to: Standard -> Author. Don’t forget to SAVE after filling in your ICAO.

Planemaker 1 Planemaker 2


 

Saab 340 condition levers and throttle

If you want to bind the condition levers to 1 axis of your Joystick (I added the throttle as well because I had some problems with it):

Show lua code

 

Jetstream 32 autopilot

Due to the complex scripting behind it, the autopilot of the BAe Jetstream 32 made by JRollon can not be simply activated with a button using the standard X-Plane reference.

Show lua code

 

Wind Info Script

This script show the wind heading relative to your plane (where wind is coming from):
Wind_info LUA

Show lua code

 

Dampen Toe Brakes

This script helps to dampen the toe brakes if they are too sensitive. It makes it easier to slowly brake.

Show lua code

 

Copilot: keeps plane in straight line when taxiing

This helps me to stay on the taxiway when working on checklists etc.

Show lua code

 

CowlFlaps

Binding the CowlFlaps to a Joystick axis for the DC-3

Show lua code