Jump to content
The simFlight Network Forums

adding a second offset condition to a button?


Recommended Posts

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

Link to comment
Share on other sites

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).

Regards

Pete

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.