Profile image

Using FT to deactivate other inputs at whim

2 JamesDean  2.5 years ago

So, I was finally getting to the nitty gritty and decided that any true fake MFD would operate with multiple screens, and that quickly got too crowded using the old text-n-piston method.
My new method is something like <color={AvionicsPowerButton ? #000000 : FFFFFF}, where the text is simply hidden with opacity until the variable which holds electronics power is turned on.

Okay, sa-weet! First part of the problem is solved. Now I can group related data sets in a single text field... but what if I need to switch to another screen?
How do I, say, use two variables to simultaneously activate the corresponding trigger AND DE-activate all of the others?

I would like to make 4 or 5 different screens which I can push buttons for and they will become the priority? Do I have to create a different set of variables and activators for each 'display' I intend to make?

  • Log in to leave a comment
  • Profile image

    @PlaneFlightX I'm curious how you got 'VariableOutput' to work in the dropdown of part attributes of Overload; In your SWL-10, your APU and engines all output a 'thrust' and 'RPM' variables. I can't get mine to do that, even adding it under <variables> in the .xml file

    2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    @JamesDean Make sure the interactiontype is set to Once or Continuous for outputvalue to correctly work.

    2.5 years ago
  • Profile image

    @PlaneFlightX Gotcha, that's funny because when I didn't get a reply that's exactly what I started doing. My original comment was something to the effect of, asking what you were calling 'variable output' and 'outputValue', since the only variable-type name I could think of was the 'input' ID field. I watched your videos, and saw where you created the outputValue, but it still isn't working thus far. I'll keep tinkering.

    2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    @JamesDean Ah, I actually didn't. I got a black fuselage piece, and used it to black out the gauge text. I then grabbed a standard label and wrote my own text. Also, what was your original comment? I have two notifications for different comments.

    2.5 years ago
  • Profile image

    @PlaneFlightX Also, how did you change the text shown in gauges, specifically the battery meters in the SWL-120?

    2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    Another video which mentions outputValue is this one. The first part of the video (until a few minutes in) is all about interaction type and output value.

    2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    @JamesDean You only need one variable. You don't even need to define it in the global variable setters. Just have a few different buttons outputting the same variable at different outputValues (1-5).

    2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    @JamesDean Right... I guess I thought you knew a little more about FT. It's fine either way. I've actually made a few tutorials on using the variables system, and this video should explain a little more about actually using variables. Feel free to skip a bit, the key parts are what interaction types are, and how to add a custom input to a button/switch.

    2.5 years ago
  • Profile image

    UPDATE
    I created 3 variables, using @fpvrick7 method; Display (Display + NextDisplay), NextDisplay (0), CurrentDisplay (repeat(Display+100,5), adapted to use <size>.
    I got it to work only once, but it seems that the variable count keeps growing instead of resetting/ looping back around

    2.5 years ago
  • Profile image

    @PlaneFlightX How do I set the button's output value? I don't know how to store variables

    2.5 years ago
  • Profile image
    50.7k BeastHunter

    I don’t know anything about funky trees, but this makes me happy. Usually when I see a zero point user post a forum about this length it’s advertising something I’ll never use, but this is a smart person asking a serious question about funky trees. We need more content like this.

    +2 2.5 years ago
  • Profile image
    49.5k PlaneFlightX

    All of this can fit into a single label with a few buttons. First, make the display code for each screen. For the activation, make each button's variable output displayNumber (this can be changed, just make sure to change it in all areas it is used), and set their outputValue to a number, say 1-5 (a different number for each button). Make the interactionType for the buttons Once. I recommend a size changing system, which makes all the unused screens a size of 0, basically hiding them. Use <size={displayNumber = 1 ? "100" : "0"}%>, changing the display number value based on what display it is. I think that code should work, I didn't test it.

    Let me know if you have any problems.

    2.5 years ago