Thomas321 Posted August 8, 2012 Report Posted August 8, 2012 Hello, is it possible to add a second,third,.. "rule"(offset condition) to execute an action assigned to the button? i want(for example): if BATT=ON+AC ON GROUND then PM ELEC ND OFF i tried as follows, but doesn´t work this way: 24=W281C=1 P109,3,C2984,0 ;GF-IGN-LEFT PRESS-PM Elec ND OFF(IF BATT=ON) 25=W0366=1 P109,3,C2984,0 ;GF-IGN-LEFT PRESS-PM Elec ND OFF(IF ON GROUND) tried also: 24=W281C=1,W0366=1 P109,3,C2984,0 ;GF-IGN-LEFT PRESS-PM Elec ND OFF(IF BATT=ON) Regards, Thomas
Pete Dowson Posted August 8, 2012 Report Posted August 8, 2012 i want(for example): if BATT=ON+AC ON GROUND then PM ELEC ND OFF You could probably do that with button flags, but not simple multiple entries for the same button because they would be either/or conditions. The best and easiest way for things like that would be a lua plug-in, with the button action assigned to that Lua. e.g. if ipc.readUW(0x281C) == 1 and ipc.readUW(0x0366) == 1 then ipc.control(2984,0)end[/CODE]Save that as, say, "PMNDoff.lua", in the Modules folder, and assign your button to it. (If FS was running already, press the "reload" button in the assignments tab to get the Lua plug-in recognised).RegardsPete
Thomas321 Posted August 9, 2012 Author Report Posted August 9, 2012 Thank you very much! Again, works great and gives me a huge amount of new possibilities for controlling buttons. Regards, Thomas
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