Profile image

What's the variable for this?

17.9k FlirBlitz  3.0 years ago

So I'm trying to make a lever that can only be used if a button is pushed. So when engine 1 is activated, so is the lever. Can someone help?

also X99STRIKER better not try anything

  • Log in to leave a comment
  • Profile image
    17.9k FlirBlitz

    @Korzalerke uhhh o k

    2.9 years ago
  • Profile image
    11.6k JesusChrist

    @Bobyo Weird, it worked for me. Try this:

    • Create variable named Lever_E1
    • Set expression to Activate2 ? Throttle : 0
    • Set engine ZeroOnDeactivate to true
    • Set lever input to Lever_E1
    • Set button AG to same as engine

    This is assuming the engine is on AG2, if not, replace the 2 on Activate2 to the correct AG.

    2.9 years ago
  • Profile image
    17.9k FlirBlitz

    @Korzalerke lol, I saw your message at like 10pm...
    EDIT: I tried it and it didn't work, and the levers are controlled by throttle. Not VTOL

    2.9 years ago
  • Profile image
    11.6k JesusChrist

    @Bobyo You could just copy paste the code from my other comment into a variable, set the lever input to Lever_E1, and set a button to Activate2. Just replace the 1 in Activate1 with a 2 and make sure that ZeroOnDeactivate is set to true. If you don't do that last part, the engine won't turn off with the Activation group. Also, sorry for taking so long lol, unlike X99STRIKER, i actually need to sleep.

    2.9 years ago
  • Profile image
    17.9k FlirBlitz

    @Korzalerke it's accurate, but I have 2 engines with separate action groups (2 and 3)

    2.9 years ago
  • Profile image
    11.6k JesusChrist

    If you still need the help: Assuming the engine activates with AG1 and the lever controls the VTOL slider, you could set the input of the lever to say:

    Lever_E1
    

    then you could create a variable of the same name and set the expression (input) to:

    Activate1 ? VTOL : 0
    

    The lever would control the VTOL slider but only if AG1 (Engine) was enabled. There's a lot more you can do with the condition operator so if you meant something else just ask.

    2.9 years ago
  • Profile image
    11.9k X99STRIKER

    @Bobyo “magic”

    3.0 years ago
  • Profile image
    17.9k FlirBlitz

    @X99STRIKER uhhhhhhhhhhhhh no... I already knew you weren't good in funky trees, I meant no offense...

    3.0 years ago
  • Profile image
    11.9k X99STRIKER

    Am I really that prominent in the forums tho?

    3.0 years ago
  • Profile image
    11.9k X99STRIKER

    What is anything? Is it a candy? A show? Maybe a game? And why do you not want me to try it?

    3.0 years ago
  • Profile image
    11.9k X99STRIKER

    ;-;

    3.0 years ago