Version: 1.4.18.0
Bug description: The standard xstates code from 2020 does not work correctly in 2024. When you hold the switch it fails to stay and resets based on the reset timer. But this is only suppose to happen once you release the left click.
Hello @Flysimware
Can you provide an example of one of your aircraft switch that is impacted by this regression?
Regards,
Sylvain
1 Like
Sent you a 2024 test project in a PM. Also if you get time see my other message I sent last week. I solved most of it but curious on some as I still have issues.
Hello @Flysimware
So there are multiple issues there.
First, I’m not sure why but you seem to have created multiple variations of your cabin behaviors, but they are all included in your preset.
This leads to multiple instances of the switch component being created based on the same node
In MSFS 2020, our switch template had a flaw that could lead to its position not representing its actual state.
If the state is represented by an L variable and you have multiple switch with the same component ID, they will be in conflict.
This was fixed with the 2024 version of that same template.
Removing the duplicates in your case should solve the problem.
But if you still have cases where multiple switch end up based on the same variable name, you can workaround this by using O variables instead of L variable in your 3_Way_Switch_Template
Note: you might want move to Compiled behaviors to help diagnose such problems.
Regards,
Sylvain
1 Like
HI @FlyingRaccoon,
When I sent you the test project, I realized a week later the duplicate component ID MODEL_BEHAVIORS_DEFS was in 3 locations. This was an accident and I caught this already and deleted the other 2 that had nothing to do with this test project. Was left over scraps from the lear.
And i just also went and tested the Lear 3 way switches in 2024 and the main issue for my bug report is fixed. So thank you guys for that. My original 2020 code now works in 2024 with Lvars.
2 Likes