- Messages
- 1,510
- Country
Code:
<Visibility>(L:page_vis, number) 3 == d (A:Circuit General Panel On, bool) (A:Circuit Avionics On, bool) && &&</Visibility>
I adapted this from the CRJ PFD I think it was, trying to come up with a way of cycling through some pages of data. It works fine like this but not without the "d". Further down the gauge I have some rectangles (buttons) that change color according to the same visibility conditions (selected page) but that one doesn't work with the "d":
Code:
<FillColorScript>'#660000' '#333333' (L:page_vis, number) 3 == (A:Circuit General Panel On, bool) (A:Circuit Avionics On, bool) && && ?</FillColorScript>
I get (I think) from the SDK that the d "Duplicates the value that is on the top of the stack". What on earth does that mean and how does it relate to what I'm doing here? What do I get on the stack from L: page_vis, number) 3 == for example? If L: page_vis equals 3 does that mean I get a "1" (True) on the stack? In that case I'd assume I'd get a 1 from the general panel on and circuit avionics on as well and I'd interpret the overall condition like:
IF condition_a equals 1 AND condition_b equals 1 AND condition_c equals 1 - then the object is visible.
I don't get why I need to duplicate that first "1" if I'm even remotely understanding what's going on here? Obviously I'm not!