Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
Collapse
Just Flight Community Forum
  1. Home
  2. Just Flight
  3. MSFS Products
  4. Black Square Add-Ons
  5. Caravan Professional
  6. Lvar for Generator Switch not working

Lvar for Generator Switch not working

Scheduled Pinned Locked Moved Caravan Professional
11 Posts 7 Posters 512 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RealPax
    wrote on last edited by RealPax
    #2

    I am using a small script "1·(>L:var_GeneratorSwitch,·number)". This is the reset function. The switch inside the cockpit does not move but at least the warning light gets turned off.

    RhinozherousR 1 Reply Last reply
    0
    • C Offline
      C Offline
      cdsolo
      wrote on last edited by
      #3

      I've got the exact same thing (with AAO). The only switch I haven't been able to bind yet apart from the noise cancel headphones.

      1 Reply Last reply
      0
      • R RealPax

        I am using a small script "1·(>L:var_GeneratorSwitch,·number)". This is the reset function. The switch inside the cockpit does not move but at least the warning light gets turned off.

        RhinozherousR Offline
        RhinozherousR Offline
        Rhinozherous
        wrote on last edited by
        #4

        @RealPax said in Lvar for Generator Switch not working:

        I am using a small script "1·(>L:var_GeneratorSwitch,·number)". This is the reset function. The switch inside the cockpit does not move but at least the warning light gets turned off.

        I m also using this script now and it seems to work sometimes but for whatever reason it does not work everytime I press it, i have to push it several times it seems.... and animation of the switch is not working.

        Maybe the dev can enlighten us how to assign it 🙂

        JibletJ 1 Reply Last reply
        0
        • R Offline
          R Offline
          RealPax
          wrote on last edited by
          #5

          Sorry to hear it does not reliable work for you. For me it does beside the missing animation. Hope you will finde a way to get this working. But my knowledge is not deep enough to trouble shoot. Sorry.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SteveKane
            wrote on last edited by
            #6

            Same issues as well: switch doesn't move, and the LVAR works intermittently. I've been fiddling with this a bit with SPAD. In FS2024 Dev mode, the animation uses O:XMLVAR_ELECTRICAL_Switch_Alternator_1_Animation_Position. Not quite sure what to do with that. I tried creating verious Client Events, but still no luck.

            1 Reply Last reply
            0
            • JibletJ Offline
              JibletJ Offline
              Jiblet
              wrote on last edited by
              #7

              Hah, just found this thread googling for "L:var_GeneratorSwitch" because I'm having the same problem with a stream deck profile using Pilotsdeck. Everything works fine except the in-game switch animation. It's nice to know I'm not alone!

              My suspicion is the L:var_GeneratorSwitch only affects the generator switch inside the brain of the machine, and not the switch itself:
              image.png

              That switch there animates perfectly when I set L:var_GeneratorSwitch between 1, 0 and 2. Which means the reset and trip (and On) modes all work as they should. Just that this guy never budges:

              4388d5a3-8586-40cc-9a84-1bcdb909758a-image.png

              That said, the Behaviours tool shows references to L:var_GeneratorSwitch, so I'm just very confused and I'm hoping it's an animation bug rather than me doing something derpy.

              @Black-Square, any idea what we're missing when it comes to the generator switch animation?

              There are these standard vars:
              954c58cd-acdd-4515-87bd-2d097af1e92a-image.png
              But they don't seem to ever move from 0, so I guess are unused here..

              By the by, I saw another interesting thing I saw while testing things: (A:ELECTRICAL GENALT BUS AMPS:1, Amperes) returns 14.2 Amps with gernerator OFF after resetting the generator. Both the multimeter in game and the "GEN" section of the Elec map on the EFB shows 0A as you'd expect (as the generator was completely off, the only power was battery power), but that Avar is active and happy.

              1 Reply Last reply
              0
              • RhinozherousR Rhinozherous

                @RealPax said in Lvar for Generator Switch not working:

                I am using a small script "1·(>L:var_GeneratorSwitch,·number)". This is the reset function. The switch inside the cockpit does not move but at least the warning light gets turned off.

                I m also using this script now and it seems to work sometimes but for whatever reason it does not work everytime I press it, i have to push it several times it seems.... and animation of the switch is not working.

                Maybe the dev can enlighten us how to assign it 🙂

                JibletJ Offline
                JibletJ Offline
                Jiblet
                wrote on last edited by
                #8

                @Rhinozherous said in Lvar for Generator Switch not working:

                for whatever reason it does not work everytime I press it, i have to push it several times it seems

                I saw similar behaviour - sometimes it would work, sometimes not. I fixed this by making it hold for 500ms and then flip back to the "ON" state of 0. Here it is in Pilotsdeck but I assume you could do similar with AAO, SPAD.next, etc etc.

                b1b61d2c-23b6-4de5-b39b-758d28491a70-image.png

                1 Reply Last reply
                1
                • A Offline
                  A Offline
                  Ape42
                  wrote on last edited by Ape42
                  #9

                  For Axis And Ohs I managed it, changing the Interior.xml a bit. At the component ELECTRICAL_Switch_Alternator_1 I added this code:

                  					<OVERRIDE_ANIM_CODE>
                  						(L:var_GeneratorSwitch, number) 1 == if{ 0 }
                  						(L:var_GeneratorSwitch, number) 0 == if{ 100 }
                  						(L:var_GeneratorSwitch, number) 2 == if{ 200 }
                  					</OVERRIDE_ANIM_CODE>
                  

                  Afterwards I used the "Layout Generator" from fs.to to recalculate the layout.json. Now I'm able to control the Switch using something like 1 (>L:var_GeneratorSwitch, number).

                  @Black-Square It would be great if you could add this to one of the next updates. This was already missing in the 2020 version and drove me nuts. 😉

                  1 Reply Last reply
                  5
                  • hangar_101H Offline
                    hangar_101H Offline
                    hangar_101
                    wrote last edited by
                    #10

                    @Ape42 can you share both the Interior.xml file and the new layout.json files?

                    @Black-Square is this on your radar for the next update as well?

                    Hangar 101

                    A 1 Reply Last reply
                    0
                    • hangar_101H hangar_101

                      @Ape42 can you share both the Interior.xml file and the new layout.json files?

                      @Black-Square is this on your radar for the next update as well?

                      A Offline
                      A Offline
                      Ape42
                      wrote last edited by
                      #11

                      @hangar_101 said in Lvar for Generator Switch not working:

                      @Ape42 can you share both the Interior.xml file and the new layout.json files?

                      @Black-Square is this on your radar for the next update as well?

                      Not without explicit permission by @Black-Square

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users