Most of the commonly reported issues and questions are answered in the Frequently Asked Questions (FAQ) option under the Support menu of this website.
*** PLEASE NOTE ***
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
1st December: A new version of the GoFlight Interface Tool for MSFS is now available.
12th November: A new version of the GoFlight Interface Tool for X-Plane is now available.
6th June: A new version of Virtual Flight Sim Hardware is now available (huge update)
21st November: A new version of the GoFlight Interface Tool for FSX/FSXSE/P3D is now available.

MSFS 2020 LUA Scripts

Slowly but surely there is more information coming out in MSFS forums regarding what variables and events are being used to trigger stuff in the varioua aircraft. As result I started trying to see what I could do using LUA module in GFiT and so far I have not managed to get anything to work. I started off with the lua script below on the A320NEO (FBW mod) I was trying to set FD on and although the lua runs without error nothing happens in the aircraft.

setsvar("AUTOPILOT FLIGHT DIRECTOR ACTIVE",1)



Also looked at setting what I beleive to be kvars such as below for switching between managed and selected modes again in the A320Neo.

“Managed Speed Mode” with the code “2·(>K:SPEED_SLOT_INDEX_SET)”
“Selected Speed Mode” with the code “1·(>K:SPEED_SLOT_INDEX_SET)”

Tried things like setkvar("SPEED_SLOT_INDEX_SET",1) which returned an error. in the GFiT user manual I found references to getkvar but not setkvar.

So I guess what I am asking is what trying to do actually possible and if so how to I do it

Thanks

Musky2015

Comments


  • The first setsvar looks fine. Is the console window showing Lua Connected? If not, manually start FlightSimIOLua (it shows up in the notification area).

    Remember to save your file before trying to run it.

    Try setsvar ("AUTOPILOT SPEED SLOT INDEX", 1)

    Has anyone on the forum actually set AUTOPILOT FLIGHT DIRECTOR ACTIVE as not all variables can be set, many are read only! Try an event instead such as:

    sendevt("TOGGLE_FLIGHT_DIRECTOR", 0)

    Best wishes
    Steve
Sign In or Register to comment.