#Found vars but how do I use them?
1 messages · Page 1 of 1 (latest)
O: vars are not accessible from outside.
ok, cheers Jamie, it was to be an answer for somebody asking about the fuel switch.
are they part a templete
show me what the dev mode, input events code for that
put the set event in the control panel
Come on Steve, you need to uncheck Minimize and press the reload user container button
oh fiddle,l forgot
No code is shown while the sim is in optimized mode
Mmm, doesn't look quite right, that code isn't setting the value at all
make sure to follow the steps in the link the bot's about to send, it'll have info on how to display the right part
You can use the developer tools in MSFS2020 to find the code for the input events. See this blog post for details on how to do it: Uncovering input events using the MSFS2020 behavior dialog
This is with the dev mode, if you set the values and use execute, the switch does move. Jamie has been helping a little, it's now a long day for me and I need to sleep soon
somebody else was asking about this switch but nobody had answered earlier and thouight it would be as easy as the Vulcan inputs I found but it's not. Incidentaly, this switch is on the TBM930
Hi Jamie, looking on Hubhop and I see you did all the fuel switches apart from this one, that should have given me a clue.
Hi. I now had a chance to look at the TBM930 in MSFS2020. This is the Input Events code for the Fuel Selector Knob
Hi Jamie, cheers, I didn't look at selector 1 at all with the other function being auto/manual and the execute from that operating the switch, it is a switch not a knob. Didn't you say you couldn't use O vars? The function for the switch is lowerdown in that list, in the VC it's on the upper panel on the RHS half.
You still can't use O: vars from outside, but the action is really done by (>K:FUEL_SELECTOR_SET)
With prefixed values of 0 for OFF, 2 for LEFT and 3 for RIGHT
The toggle event in Hubhop works ok. I tested it.
Toggling between 2 and 3
is this not what you were looking for?
I've used that and yes it woks but it's for the fuel control below the throttle, the switch I was looking at was for somebody else and it's on the upper panel, I did try K, L etc but didn't get it working. I may have to go off line. I didn't sleep last night.
ahh I see it now.
Unfortunately, the code only uses o: vars so not much we can do from outside.
The only way would be to access the B: event through an xml file hack.
It involves hooking a custom Lvar that we can control to call the B: event.
that B: event should work in msfs2024 , but unfortunately not in 2020
The hacking then is going to be similar to what we did with the Lancaster, I was hoping to help somebody else with this tbm930.
don't know if it works still as its a couple of years old but you could try this - https://flightsim.to/file/57918/tbm930-lvars-for-bleed-inert-and-cabin-lights
✓ TBM930 - LVars for Bleed Air, Inert Sep and Cabin Lights is a Microsoft Flight Simulator 2020 mod created by FlyingDutch. Enhance your TBM930 experience with this mod featuring LVars for bleed air, inert sep, cabin lights, ignition, and fuel selector. Easily implement these new features by downloading and placing the...
Interesting, I think this addon uses the xml file hack I was referring to.
Have tried these: on press 2 (>L:TBM930_FUEL_SELECTION_SET) and on release 1(>L:TBM930_FUEL_SELECTION_SET) and they didn't work.
Can see where if I'm reading it right, it tries to write to the B var
If this is like the xml hack, you set the Lvar value one higher than what you want to send to the B: event.
The code will auto reset the variable to 0.
either way, 1 or 2 it doesn't move.
these are 1 higher than what the Dev mode shows.
OK. Show me.
OK you are missing a space after the number
Also you can check that the Lvar auto resets to 0 confirming the code is working.
I setup 2 controls one, without space and one with and only enabled 1 at a time
you mean watch the var in dev mode?
or in the values in MF?
Both ways can work
I saw no change when running dev mode
was 1st thjing I did when it didn't work
let mje reload the tbm.
If there is no auto reset I would suspect the xml code is not working
Are you sure the addon is in the Community folder? Did you restart msfs after installing the addon?
Full restart of msfs is required.
The VFS is only created once at start.
I didn't have the sim running when I put it there and I have already restarted at least once just in case.
lol. you've missed the screen shot i did earlier of the community folder
Right now, since there is no auto reset to 0, I would suspect either the addon is not running or the Lvar name is not correct.
Is it worth chnage set to position?
I'll have a look at the xml file for names
could it be (L:TBM930_FUEL_SELECTION_SET, Number)
or is that just setting a number to be passed to the B var
The addon Lvars are new and none of the Lvars used by the aircraft. It just passes a value to the b: event.
let me grab screen shot from flightsim.to
2 (>L:TBM930_FUEL_SELECTION_SET, number)
not that, that's from the xml which works.
this was from the mod on flightsim.tom
so changing set to number fixed it
You mean adding number?
Ok
There's a slight delay but that could be my gear
I'm using a switch on my radio control gear.
There is probably a one second poll rate
well it's my radio control in emulation of joystick mode so more processing. On that line above must it have the 2 or 1 at the beginning.
Yes, you need to set a value different from 0
ok cheers. I'll pass this onto the other gut that had originally asked about it, think you had a chat with him.
I'll have a quick test with none latching then let them know.
none latching ok.
but I would prob swap press to release and vice versa
Any method to set an Lvar value ought to work
leaving Auto as the un pressed condition