The Lua Console should be the starting point for anyone wanting to use or write Lua scripts for GIT. The Lua Console is available from the Status tab by clicking the Lua button. The console should appear as follows:

 lua xplane

Lua scripts can be written to produce output to a screen as well as receiving keyboard input. Although a completed Lua script assigned to GoFlight hardware within GIT should not output any text or request keyboard input, these facilities are very useful whilst developing, testing and debugging Lua scripts and is the only reason the Output and Input areas exist.

A list of all known Lua scripts for the current aircraft are shown towards the bottom of the Lua Console. Some of the buttons below the list allow a user to Create, Edit, Execute/Run and Delete the selected Lua script file.

It is possible to create .lua files outside of the Lua console as they are simply text files with a .lua extension. If you do this, the .lua files must exist in the correct directories for GIT to use them and then the ReSync button must be clicked so the Lua console picks up the new files and creates associated Bespoke Events to allow the assignment and execution of them within GIT. Note that ReSync happens automatically when the Lua console is first opened.

The areas on the right of the Lua console show all known DataRefs & Bespoke variables and all known Commands. Their purpose is to allow easy location of relevant DataRefs and Commands and if required the currently selected DataRef or Command can be copied into the Clip Board and then pasted into your Lua script. Search facilities exist above both lists.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.