- Messages
- 23
- Country
Hi!
I work on project of FSX's conversion of an excellent An-28 made by DPL for X-plane. Some of the switches and indicators have already been coded. I would like to link some of the switches with some of the indicators so that switching a switch on would produce switching an indicator ON, as well as switching the backlighting on. However I can not link all that three elements toghether. Example of such linked switch, indicator and backlighting below. I guess that the solution is trivial but I can not go through it so far... I need a modeldef.xml format of code for FSX.
Besides this I would like to say "thank you" for all of you, especially n4gix and a few others of the developers who share their knowledge and teaching us this kind of the 3D art. Without you I could not step further as I did. Thanks!
INDICATOR:
<PartInfo>
<Name>AN28_Vibration_needle_left</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:TURB ENG VIBRATION:2, percent) 10 /
</Code>
</Parameter>
</Animation>
<MouseRect>
<TooltipText>Vibration (%((A:TURB ENG VIBRATION:2, percent))%!3d! %)</TooltipText>
<Cursor>Hand</Cursor>
</MouseRect>
</PartInfo>
SWITCH:
<PartInfo>
<Name>AN28_VibrInd_SW</Name>
<AnimLength>2</AnimLength>
<Animation>
<Parameter>
<Code>
(L:VibrInd_SW, enum)
</Code>
<Lag>400</Lag>
</Parameter>
<Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Left Fuel Indicator Switch</TooltipText>
<MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 == if{ (L:VibrInd_SW, enum) -- 0 max (>L:VibrInd_SW, enum) }
(M:Event) 'LeftSingle' scmp 0 == if{ (L:VibrInd_SW, enum) ++ 1 min (>L:VibrInd_SW, enum) }
(M:Event) 'WheelUp' scmp 0 == if{ (L:VibrInd_SW, enum) ++ 0 max (>L:VibrInd_SW, enum) }
(M:Event) 'WheelDown' scmp 0 == if{ (L:VibrInd_SW, enum) -- 1 min (>L:VibrInd_SW, enum) }
</CallbackCode>
</MouseRect>
</PartInfo>
INDICATOR BACKLIGHTING:
<PartInfo>
<Name>AN28_VibrInd_BL</Name>
<Visibility>
<Parameter>
<Code>
(L:VibrInd_SW, enum) 0 >
(A:LIGHT CABIN, bool) 0 >
and
(A:CIRCUIT GENERAL PANEL ON, bool) 0 >
and
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
Best Regards
IntruderPL
I work on project of FSX's conversion of an excellent An-28 made by DPL for X-plane. Some of the switches and indicators have already been coded. I would like to link some of the switches with some of the indicators so that switching a switch on would produce switching an indicator ON, as well as switching the backlighting on. However I can not link all that three elements toghether. Example of such linked switch, indicator and backlighting below. I guess that the solution is trivial but I can not go through it so far... I need a modeldef.xml format of code for FSX.
Besides this I would like to say "thank you" for all of you, especially n4gix and a few others of the developers who share their knowledge and teaching us this kind of the 3D art. Without you I could not step further as I did. Thanks!
INDICATOR:
<PartInfo>
<Name>AN28_Vibration_needle_left</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:TURB ENG VIBRATION:2, percent) 10 /
</Code>
</Parameter>
</Animation>
<MouseRect>
<TooltipText>Vibration (%((A:TURB ENG VIBRATION:2, percent))%!3d! %)</TooltipText>
<Cursor>Hand</Cursor>
</MouseRect>
</PartInfo>
SWITCH:
<PartInfo>
<Name>AN28_VibrInd_SW</Name>
<AnimLength>2</AnimLength>
<Animation>
<Parameter>
<Code>
(L:VibrInd_SW, enum)
</Code>
<Lag>400</Lag>
</Parameter>
<Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Left Fuel Indicator Switch</TooltipText>
<MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 == if{ (L:VibrInd_SW, enum) -- 0 max (>L:VibrInd_SW, enum) }
(M:Event) 'LeftSingle' scmp 0 == if{ (L:VibrInd_SW, enum) ++ 1 min (>L:VibrInd_SW, enum) }
(M:Event) 'WheelUp' scmp 0 == if{ (L:VibrInd_SW, enum) ++ 0 max (>L:VibrInd_SW, enum) }
(M:Event) 'WheelDown' scmp 0 == if{ (L:VibrInd_SW, enum) -- 1 min (>L:VibrInd_SW, enum) }
</CallbackCode>
</MouseRect>
</PartInfo>
INDICATOR BACKLIGHTING:
<PartInfo>
<Name>AN28_VibrInd_BL</Name>
<Visibility>
<Parameter>
<Code>
(L:VibrInd_SW, enum) 0 >
(A:LIGHT CABIN, bool) 0 >
and
(A:CIRCUIT GENERAL PANEL ON, bool) 0 >
and
if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
Best Regards
IntruderPL
Last edited: