guenseli Posted January 21, 2010 Report Posted January 21, 2010 Hello Pete, I try to generate a little failure generator... One lua is for the failures, an other is for resetting them I have a LUA loop ("while") in the failure lua and have get out of this loop. I found one solution to set a global variable in the loop and change it with the reset lua to get out of the loop. But I think you will have a better solution. One idea is, to send a "kill" to the failure lua. I know about the kill possibility via the FSUIPC menu, but I'd like to have it inside the reset lua Sth like "ipc.kill("failure.lua") or however this is called or possible.... Or you have an other idea how I can get out of this loop (the loop controls fuel flow. as the fuel flow is resetting itself you have to permanently send "fuel flow XY". to reset I'd like to cancel this loop as the fuel flow is then restting itself) Hope you understand! thanks very much!!!! guenter
Pete Dowson Posted January 21, 2010 Report Posted January 21, 2010 I have a LUA loop ("while") in the failure lua and have get out of this loop. I found one solution to set a global variable in the loop and change it with the reset lua to get out of the loop. Yes, that is an efficient way for separate Lua threads to talk to each other. But I think you will have a better solution.One idea is, to send a "kill" to the failure lua. Well, that's possible, of course, but it isn't really as tidy as having them talk to each other via Global variables. I know about the kill possibility via the FSUIPC menu, but I'd like to have it inside the reset luaSth like "ipc.kill("failure.lua") or however this is called or possible.... It's done by the ipc.macro() function, so: ipc.macro("LuaKill failure") Regards Pete
guenseli Posted January 21, 2010 Author Report Posted January 21, 2010 Yes, works perfect!!! As always a big thanks for the fast and good support!!!
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