Search the Community
Showing results for tags 'event.button'.
Found 1 result
Hi All. I've developed this script to perform a cold an dark startup and to issue key presses if the hat switch is moved. The keys then change cameras defined in EzCam Views. In the main section I enable a series of button events and key events. This is fine when I select an aircraft for the first time, but if I change aircraft after that, I get a crash to desktop. The only solutions to this CTD are either to use Lua Kill All at the end of every flight or to remove the lines between startColdAndDark(0, 0, 0) and setowndisplay("PRE-FLIGHT BRIEFING", 5, 10, 30, 25). It seems that the Lua thread is not terminating on change of aircraft for some reason, (possibly a problem on Windows 10?). Is there any kind of destructor method I can use to kill lua automatically if I change aircraft? Thanks Pontius. hat_fore_and_aft.lua