mroschk Posted October 1, 2019 Report Posted October 1, 2019 Hello, i have a little Lua Script which should set a offset when i start the sim . function LightsCLEAR() ipc.display("LightsCLEAR") ipc.setbitsUB(0x5301, 1) ipc.setbitsUB(0x5301, 2) ipc.setbitsUB(0x5301, 4) ipc.setbitsUB(0x5301, 8) ipc.setbitsUB(0x5301, 16) ipc.setbitsUB(0x5301, 32) ipc.setbitsUB(0x5301, 64) ipc.setbitsUB(0x5301, 128) end event.sim(ANY, "LightsCLEAR") but it is only running, when i change the Time in the sim, as example from Day to Night. Why is the script not running when i start the sim? Or how can i run a script, when the sim starts? thx MR
Paul Henty Posted October 1, 2019 Report Posted October 1, 2019 Hi MR, Lua questions should really be posted in the main support forum. This sub-forum is for programming with .NET languages. However, looking at the documentation, event.sim doesn't fire when the sim loads. Only on CLOSE, FLIGHTLOAD, FLIGHTSAVE and AIRCRAFTCHANGE. You can run a LUA script when the sim has finished loading and is ready to fly by naming your LUA file 'ipcready.lua'. That might be useful to you. I'm not an expert on LUA so if you need more help please ask in the main forum. Kind Regards, Paul
mroschk Posted October 1, 2019 Author Report Posted October 1, 2019 Hello, oh, i am sorry about posting in the wrong section, maybe a admin can move the topic. Thanks for the answer, i will try... MR .... it works...thx
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now