So this is a good news, but news situation i think.
But many, many thanks for pointing me in this direction. I will go into that a little deeper.
BR
So this is a good news, but news situation i think.
But many, many thanks for pointing me in this direction. I will go into that a little deeper.
BR
Other way to find out the variables and scripts are using the Model Behaviour Debug tool. It will show same info as in XMLâs but itâs little bit more readable. It also has Logger feature which shows what happens when you press switch/rotate knob etc.
Enable Developer mode in sim and goto Windows â Model Behaviours
Make sure you have correct XML file selected (TBM930_INTERIOR.XML) in this case (itâs usually *_INTERIOR or _COCKPIT)
In the component search box try to write what you want to find, âstarterâ in this case, then you see on the right there is 1 result, choose that (HITBOX_ENGINESTART_SWITCH_STARTER)
Scroll all the way down and open Mouserect. There you can see the code for the starter switch. Logger is also under Mouserect and opening that will give you info when you switch the starter.
Hereâs part of the code you get, you can see those 1 (>L:XMLVAR_Starter) and 0 (>L:XMLVAR_Starter) variables in there.
Seems like i had some kind of bug, after restarting Axis and Ohs the script was working just fine
Can you maybe give me a hint on the execution of the Wipers knob?
I figured out that
0·(>L:ASCRJ_LSP_WIPER,·Number) is off
1·(>L:ASCRJ_LSP_WIPER,·Number) is Int
2·(>L:ASCRJ_LSP_WIPER,·Number) is Slow
3 (>L:ASCRJ_LSP_WIPER,·Number) is fast
how can i put them into one script for a turning Knob left and right ?
how can i put them into one script for a turning Knob left and right ?
Right turn
wrong code
Left turn
wrong code
sadly it doesnt work as expected,
just jumps one right to slow and not further. And when i use the left turn it jumps all the way to the off position
Ah, OK, it is one of those (that you can only send a value to, but that doesnât hold the state as value). So my initial script was correct after all.
(L:MyWiperVar) 3 < if{ (L:MyWiperVar) 1 + (>L:ASCRJ_LSP_WIPER,·Number) (L:MyWiperVar) 1 + (>L:MyWiperVar)}
(L:MyWiperVar)·0·>·if{·(L:MyWiperVar)·1·-·(>L:ASCRJ_LSP_WIPER,·Number)·(L:MyWiperVar)·1·-·(>L:MyWiperVar)}
But with this you can no longer operate the switch with the mouse, it will get out of sync.
okay got it, weird is that the x-touch mini knob is behaving really weird⊠it sporadical works but not every time turn, i can turn quick or slow doesnât mater. All other knobs working as expected in the CRJ except for the knobs for lightning wich are also somtimes stuck and not moving. I guess its to much scripts? or just the plane itself, because with the CJ4 i didnât have that many problems.
Edit: yes the new/old script is working as expected, okay so no mouse interaction for my Wipers Thanks !!
And here is option number three âIf things donât work as expected, let the sim deal with themâ.
SIMPROC:(L:ASCRJ_LSP_WIPER, Number) 0 > if{ (L:ASCRJ_LSP_WIPER, Number) â (>L:ASCRJ_LSP_WIPER) }
SIMPROC:(L:ASCRJ_LSP_WIPER, Number) 3 < if{ (L:ASCRJ_LSP_WIPER, Number) ++ (>L:ASCRJ_LSP_WIPER) }
This is pretty much the exact code from the animation definition file, but AAO canât use it directly (becasue one of the LVars doesnât have the ,unit parameter). The âSIMPROC:â prefix sends the script to the sim for processing instead. With these the mouse interaction works too.
Good Morning, i can not find the file âEngine_Subtemplates.xmlâ. Not in the whole TBM930 Folder. Where di you find it?
BTW: The variables worked fine. THX
OK, got it. Thats pretty cool. I did another example. Found my APTrim (It is the overhead switch in the TBM930) in the debugger. I found the variable and i see the change while switching the AP with the mouse. And i get an reaction if i do this â2·(>L:XMLVAR_APTrim,·Number)â or another number in a script. But the button moved back immediately. I have checked that no switch assigned in the sim. Strange.
Where di you find it?
Notepad++ â Search â Find in files
Find what: âAsobo_ENGINE_Switch_Starter_Templateâ
Filters: â*.xml;*.js;*.htmlâ
Directory: the MSFS Packages folder
Checked âIn all subfoldersâ
âFind allâ
MSFS relies heavily on centralized templates and reusable code. When analyzing this you have to thread your way through several layers of templates and track the variable values that are being set (to replace the #âŠ# tags in the central script code). Ultimately you will have assembled the code for mouse operation (there are at least two different variants of that in play, a modern one and the old (M:Event) type).
Try this, should work. If you bind it to push button it will go from OFF â AP OFF â ON â OFF and so on.
SIMPROC:(L:XMLVAR_APTrim)·2·==·if{·1·if{·1·(>L:XMLVAR_APTrim)·(A:AUTOPILOT·DISENGAGED,·Bool)·!·if{·(>K:AUTOPILOT_DISENGAGE_TOGGLE)·}·(A:RUDDER·TRIM·DISABLED,·Bool)·if{·0·(>K:RUDDER_TRIM_DISABLED_SET)·}·(A:AILERON·TRIM·DISABLED,·Bool)·if{·0·(>AILERON_TRIM_DISABLED_SET)·}·}·}·els{·(L:XMLVAR_APTrim)·1·==·if{·1·if{·0·(>L:XMLVAR_APTrim)·(A:AUTOPILOT·DISENGAGED,·Bool)·if{·(>K:AUTOPILOT_DISENGAGE_TOGGLE)·}·}·}·els{·(L:XMLVAR_APTrim)·0·==·if{·2·(>L:XMLVAR_APTrim)·(A:AUTOPILOT·DISENGAGED,·Bool)·!·if{·(>K:AUTOPILOT_DISENGAGE_TOGGLE)·}·}·}
Hi an thx for the script. It toggle between âAP OFFâ <-> âONâ. It do not go to âOFFâ. If you have an Idea why it is like this, let me know. But i can live with that. TXH again.
Ah ok, i only searched in the Aircraft Folder.
Yeah you are right. If you manipulate the switch with mouse first it will work like I said. I donât know why itâs not working correctly, need to investigate more.
IMPORTANT NOTICE: The AAO WASM module is not compatible with the new simulator update!
Please remove âlorbysi-content-hooksâ from your community folder or the sim will not start.
At the moment I canât offer a solution. Asobo assured me that the changes in the WASM modules that have been announced earlier (5 weeks ago) would not affect my module. Yet here we are.
We will start looking into this as soon as possible. For now, accessing LVars or HVars through AAO is no longer possible. The rest of the app is working nornally.
Thanx for the quick announcement.
My computer is downloading the latest update as I type this
Should have read this 30 min ago and I would have less wrinkles in my face.
This seems to affect all standalone WASM modules. So if you have SPADNext, Mobiflight, FSUIPC etc., you may have to remove their modules too.
Yeah, my CJ4 is grounded until further noticeâŠ
Thanks Asobo!