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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.