August 18, 20223 yr I just started with AAO yesterday, so I'm trying to learn what I'm doing and not just going by luck. In Black Square Steam Gauge Cessna 208B, I'm trying to bind all the lights to my Honeycomb Bravo. I'm using the leftmost axis, and also the detent as a button. Put the lever in the detent, turn light off. Take it out of the detent, turn on. Let the axis go from 1-100. This part actually works fairly well, and I was really happy until I looked up at the fuel selectors, which remain dark. When changing the flood lights in game they get lit up by indirect/ambient light, it seems like. I've found "<!-- Cockpit Bounce -->" in the XML-file, but I don't know if/how I can use it. I've found that trying to activate light potentiometer 10 make a flash in that area, after reading through the AnalogCaravan.XML file. I can't get it to stay on, though, and it also seems to use even more code which I don't yet know how to incorporate. Also, as a detail, changing the light through Honeycomb Bravo Axis doesn't make the same sound as ingame. I'm not sure what I'm looking for, and the discoveries, and knowledge about how to code those snippets, has taken about 8 hours, but at least I'm starting to learn the basics of how all this and RPN works. Bravo Throttle Quadrant Button <23> upon press: C208B_Lights_off //Instrument·alla,·radio? 0·(>K:PANEL_LIGHTS_set)· //vÄNSTE·ROCH·HÖGER·FLOOD,·SÄKRINGAR,·PIEDESTAL? 0·(>K:GLARESHIELD_LIGHTS_SET) Bravo Throttle Quadrant Button <23> upon release: C208B_Lights_on //Instrument·alla,·radio? 1·(>K:PANEL_LIGHTS_set) //vÄNSTE·ROCH·HÖGER·FLOOD,·SÄKRINGAR,·PIEDESTAL? 1·(>K:GLARESHIELD_LIGHTS_SET) Honeycomb Bravo axis <Y>, On change, axis min: 1, max: 100 C208B_Lights_Axis //Instrument·vänster? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_2_SET) //Instrument·höger? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_3_SET) //Instrument·övre? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_4_SET) //Vänster·flood? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_5_SET) //Höger·flood? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_6_SET) //pIedestal? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_7_SET) //säkringar? (L:Scripts-C208B_Lights_Axis)·(>K:LIGHT_POTENTIOMETER_8_SET) <!-- Cockpit Bounce --> -<UseTemplate Name="ASOBO_LIGHTING_Ambient_Template"> <ID>1</ID> <BOUNCE_POTENTIOMETER_PERCENT>(L:LIGHTING_PANEL_1, number) (A:CIRCUIT ON:39, Bool) 0.05 * *(L:LIGHTING_PANEL_2, number) (A:CIRCUIT ON:40, Bool) 0.2 * *(L:LIGHTING_PANEL_3, number) (A:CIRCUIT ON:41, Bool) 0.1 * * + +3 /(L:LIGHTING_GLARESHIELD_1, number) (A:CIRCUIT ON:36, Bool) *(L:LIGHTING_GLARESHIELD_2, number) (A:CIRCUIT ON:37, Bool) *(L:LIGHTING_GLARESHIELD_3, number) (A:CIRCUIT ON:38, Bool) * + +3 /+ </BOUNCE_POTENTIOMETER_PERCENT> <POTENTIOMETER>10</POTENTIOMETER> </UseTemplate>
August 18, 20223 yr Author The difference in pictures, both times the light is maxed out: Picture 1 Picture 2
August 18, 20223 yr Commercial Member You should consider asking the developer of the aircraft. IMHO it makes no sense that we, as the end users, have to re-engineer the code that somebody else made but didn't bother with providing some form of documentation for users who want to use external controls. Doing something like what you are attempting is a challenge even for a trained and experienced programmer. If that helps, try looking for anything "emissive" in the behavior definition file (Lvars). Those are usually the bits that make something light up. And if you rebuild the scripting of a component externally, instead of figuring out what the actual trigger for that scripting is, it is logical that it will behave differently. The actual trigger will not only execute those scripts, but it will also key the sound. And if that trigger is the mouse click - and only the mouse click - then that is that - you cannot replicate it through scripting. And consider using the MSFS developer mode. Behavior debug might reveal information about what LVars are changing when the knob is turned - or even about the trigger itself (possibly BVars, the default C208 uses them too). Btw. that "BOUNCE_POTENTIOMETER_PERCENT" - that doesn't look like a script that is actually -doing- anything. There isn't a single assignment or event in it, variables are just being read, added, multiplied etc.. It is simply calculating a number, for whatever purpose. I would try playing with those LVars, they look like somehting might happen when you change them. I would try a value range 0 - 100. Or use AAO to collect all active LVars, then look for anything "LIGHTING". Edited August 18, 20223 yr by Lorby_SI LORBY-SI
August 19, 20223 yr Author I actually solved it. I was using "Better Lights Bravo" to fix the light-up of ALT/VS with the KAP140 and found the "Variable List (Experimental), where it shows even more variables, and their unit and change, in real time. While changing lights with the mouse, I saw that there were some variables named "Lighting_Panel_1" and "Lighting_Glareshield_1", which also got a new value. Apparently the value of potentiometer_10 (which is the one doing the "bounce light") goes up when "Lighting_Glareshield_1" goes up. I can't change potentiometer_10 manually because it polls from all the "Lighting_Glareshield_n" all the time. I've gone by that variable before, but didn't understand it. Sounds are still not there yet, but that's less of a problem. Sidequestion: Does "(L:Variable)" mean that it reads from it, and "(>L:Variable)" that it tries to write to it?
August 19, 20223 yr Commercial Member 36 minutes ago, Jackiie said: Sidequestion: Does "(L:Variable)" mean that it reads from it, and "(>L:Variable)" that it tries to write to it? Yes. Be mindful though how AAO handles this internally. - An LVar without a unit (L:whatever) is "internal", it will never leave AAO, it is not transmitted to/read from the simulator - Only LVars with a unit are synchronized with the simulator. When in doubt, use the generic ", Number" as the unit (L:whatever, Number) Also, AAO handles this case sensitive. Make sure that you write an LVar the same way whereever you are using it. Another important aspect are brackets, braces and space characters. The correct number and positioning of space characters is the most important thing in RPN. The Parser cuts your code into instructions at the position of the space characters. Get them wrong and the script will not work. Make sure to refer to the lists in the AAO manual about operator syntax. "if{" is the whole operator, this is NOT "if with an opening bracket". There is no bracket/braces/parenthesis logic in RPN - all those are either part of the operator, of a command or a variable Edited August 19, 20223 yr by Lorby_SI LORBY-SI
Archived
This topic is now archived and is closed to further replies.