The Flight Sim IO Server will automatically create a Lua script file called global.lua which will contain nothing. This Lua script file will run automatically once an aircraft's virtual cockpit has loaded.

global.lua is shared across all aircraft and must contain only code that is relevant for all aircraft e.g. setting global variables for use across all Lua scripts.

global.lua runs on its own thread so can be coded to loop continuously. Remember to add a sleep statement if looping the code so that the thread does not hog all the CPU time e.g. sleep(100).

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.