- Messages
- 471
- Country

Hi folks, I've spent the last day or so building my first radar altimeter and while I have most of the main parts working (needle, bug and DH knob) I'm having issues with several of the ancillary parts. Could someone look at my code and tell me where I am going wrong please. I'll list each part with its code to make things easier.
DH Lamp
I have a set of polys for the lamp ON state but they are not displaying when I hit the DH. The visibility code for them is here:
Test Button and Lamp
I have a test button and lamp which uses a different set of polys to the DH lamp above (but they are co-located). The button animates but the polys are not displaying when I push the button. Here is the visibility code for the test lamp polys:
The button animation code which is tied to the above is here:
The button moves in on the first click and out when you click again but it would be nice if it popped out on it's own when you released it and the lamp illuminated only while you had the button pushed.
Power Off Flag
The gauge has a flag which pops out when power is removed (i.e. the master battery is OFF) but it is not animating at all, it is always in the out position.
This is the code for the power flag:
Any help sorting this problem out would be greatly appreciated.
DH Lamp
I have a set of polys for the lamp ON state but they are not displaying when I hit the DH. The visibility code for them is here:
Code:
<PartInfo>
<Name>Mallard_DH_lamp</Name>
<Visibility>
<Parameter>
<Code>
(A:DECISION HEIGHT, feet)
(A:ELECTRICAL MASTER BATTERY, bool)
and
</Code>
</Parameter>
</Visibility>
</PartInfo>
Test Button and Lamp
I have a test button and lamp which uses a different set of polys to the DH lamp above (but they are co-located). The button animates but the polys are not displaying when I push the button. Here is the visibility code for the test lamp polys:
Code:
<PartInfo>
<Name>Mallard_DH_test_lamp</Name>
<Visibility>
<Parameter>
<Code>
(L:DH_test, bool) 0 > if{ 1 } els{ 0 }
(A:ELECTRICAL MASTER BATTERY,bool)
and
</Code>
</Parameter>
</Visibility>
</PartInfo>
The button animation code which is tied to the above is here:
Code:
<PartInfo>
<Name>Mallard_DH_test_button</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:DH_test, bool) 100 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<TooltipText>DH Test</TooltipText>
<MouseFlags>LeftSingle</MouseFlags>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:DH_test, bool) ! (>L:DH_test, bool)
</CallbackCode>
</MouseRect>
</PartInfo>
The button moves in on the first click and out when you click again but it would be nice if it popped out on it's own when you released it and the lamp illuminated only while you had the button pushed.
Power Off Flag
The gauge has a flag which pops out when power is removed (i.e. the master battery is OFF) but it is not animating at all, it is always in the out position.
This is the code for the power flag:
Code:
<PartInfo>
<Name>Mallard_rad_alt_pwr_flag</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(A:ELECTRICAL MASTER BATTERY:0,bool)</Code>
</Parameter>
</Animation>
</PartInfo>
Any help sorting this problem out would be greatly appreciated.
