November 10, 20232 yr Greetings! I am attempting to create scripts to enable the UFCP from DC Designs F-15 (& probably anything else that uses the Asobo FA18 avionics) in AAO, so I can interact with the UFCP with hardware. After searching and reading many threads here and elsewhere, here is where I am. From the F-15 interior.xml - <Component ID="UFCP"> <Component ID="Keypad_AP" Node="Keypad_AP"> <UseTemplate Name="ASOBO_GT_Push_Button"> <PART_ID>Keypad_AP</PART_ID> <ANIM_NAME>Keypad_AP</ANIM_NAME> <LEFT_SINGLE_CODE>(>H:A320_Neo_CDU_BTN_AP)</LEFT_SINGLE_CODE> <TOOLTIPID>AUTOPILOT PAGE</TOOLTIPID> <WWISE_EVENT_1>button_ins_cdu_press</WWISE_EVENT_1> <WWISE_EVENT_2>button_ins_cdu_release</WWISE_EVENT_2> </UseTemplate> </Component> Using Devmode, I found the correct behavior I need to script. In this case, the root component is UFCP, child is KEYPAD_AP, the LeftSingleCode info is LEFT_SINGLE_CODE_DEFAULT_IM : 1 (>0:_ButtonAnimVar) (>H:A320_New_CDU_BTN_AP) LEFT_SINGLE_CODE_DRAG_IM : 1 (>0:_ButtonAnimVar) (>H:A320_New_CDU_BTN_AP) From this point, I have pasted the "1 (>0:_Button..." lines into the AAO Script Editor, however the green test led doesn't light, hovering over the red led shows "(>0:_ButtonAnimVar)". I tried using just "(>H:A320_Neo_CDU_BTN_AP)" as I saw in other posts, it has the same problem with the test led, hovering over the red led shows "(>H:A320_Neo_CDU_BTN_AP)". From what I have read, I would have thought this would work. Any ideas? Regards Mike
November 10, 20232 yr Commercial Member 1 (>H:A320_New_CDU_BTN_AP) or 1 (>H:A320_New_CDU_BTN_AP, Number) If that is indeed the name of the HVar. ">" is an XML placeholder string in the behavior code for the ">" character (otherwise it would break the file format), it must be replaced when writing actual code O: and I: variables cannot be accessed from the outside, see MSFS specification. They are local to an object/instance and usually control the animations etc. Only the HVar is relevant here. Edited November 10, 20232 yr by Lorby_SI LORBY-SI
November 10, 20232 yr Author Thanks, changing the script to (>H:A320_New_CDU_BTN_AP) passed the validation test. I added the 1 in front, and can see the script executing in the Observe AAO RPN Script processing window, but it still is not actually passing the registered keypress to the sim. I have the script assigned to "U" on the keyboard, pressing the key triggers the script in the processing window, but the sim still doesn't see it. https://imgur.com/53U6BZ3
November 10, 20232 yr Commercial Member 36 minutes ago, MikeWest said: Thanks, changing the script to (>H:A320_New_CDU_BTN_AP) passed the validation test. I added the 1 in front, and can see the script executing in the Observe AAO RPN Script processing window, but it still is not actually passing the registered keypress to the sim. I have the script assigned to "U" on the keyboard, pressing the key triggers the script in the processing window, but the sim still doesn't see it. https://imgur.com/53U6BZ3 This has nothing whatsoever to do with keypresses or the MSFS controller logic. The script that you are executing is different from what you wrote earlier. Which one is the correct HVar? Did you try adding ", Number" as I wrote above? How certain are you that this is derived from the F18 and that this is actually the correct HVar? Can you post a screenshot of the code that Ctrl&G returns in behavior debug mode? Also, HVars will only work when AAO is installed correctly, and the "lorbysi-content-hooks" package is present in your Community folder and not disabled. Edited November 10, 20232 yr by Lorby_SI LORBY-SI
November 10, 20232 yr Commercial Member Another question: what is it exactly that you want to operate in the cockpit? Can you please post a screenshot of that too? LORBY-SI
November 10, 20232 yr Author Thanks! I had a typo in what I originally wrote with HVar, but it was right in the script. I can tell it is derived from the FA-18 because they both use the AS04F base template for the avionics, along with several other aircraft from SC Designs' F-16 and Deimos' A-10. The key was not having the content hook package in the community folder, once I put that in, it works as intended.
November 10, 20232 yr Author Basically this panel here - https://imgur.com/I1DOMxj The script I was working on is just for the AP button, but I can use what I learned to build scripts for all the buttons, then that opens them up to be assigned to the keyboard or hardware buttons.
November 10, 20232 yr Commercial Member Strange that DC designs would use HVars from the A320. Are there no InputEvents? Same dialog in devel mode, one tab over. They can be used in AAO by selecting them directly from the menu (see chapter in the AAO manual). But at the moment there is a bug in MSFS and the IEs only work when devel mode is on. HVars can also be assigned directly, without a script, when you let AAO search for them (and when it can actually find them) or if you add them to the AAO database manually. Both options are in the "Scripting" menu. Edited November 10, 20232 yr by Lorby_SI LORBY-SI
November 10, 20232 yr Author The autopilot/navigation system uses the A320 system in the background, easier to code that way I guess. There are a lot of input events, unfortunately for the UFCD there are only a few from the AS04F system and none for the keypad. I was able to link the MFDs to Thrustmaster MFD hardware since those button HVars are in the input events, so if I can see them I can use them.
Archived
This topic is now archived and is closed to further replies.