Lvar for Generator Switch not working
-
Hello!
I am currently assigning switches to my hardware. When it comes to the Generator switch it seems that the "L:var_GeneratorSwitch" is doing nothing.
I assign all of this with Axis and Ohs and have no problems with other Lvars in the Caravan, only the gen switch is not working.I tried to assign it with value 1 for reset and 2 for trip but the swtich is not moving and also the function behind it is not working - I am not able to reset or trip the Gen with the assigned button.
-
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.
@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

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

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:

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:

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

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