- Messages
- 683
- Country

I have the following code to drive the switch that controls the left generator. It works well, but I need it to be spring loaded using RightSingle going from 1 to 0 and and RightRelease to return to 1.
Any help would be greatly appreciated.
Code:
<PartInfo>
<Name>XLS_GEN_L_TOGGLE</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:C560_GEN_L_TOGGLE,enum) 25 * </Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown+DownRepeat</MouseFlags>
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 == if{ (L:C560_GEN_L_TOGGLE, enum) -- 0 max (>L:C560_GEN_L_TOGGLE, enum) }
(M:Event) 'LeftSingle' scmp 0 == if{ (L:C560_GEN_L_TOGGLE, enum) ++ 2 min (>L:C560_GEN_L_TOGGLE, enum) }
(L:C560_GEN_L_TOGGLE, enum) 0 == if{ 0x1813E (>L:C560_VC_EVENT,enum) }
(L:C560_GEN_L_TOGGLE, enum) 1 == if{ 0x1813C (>L:C560_VC_EVENT,enum) }
(L:C560_GEN_L_TOGGLE, enum) 2 == if{ 0x1813D (>L:C560_VC_EVENT,enum) }
</CallbackCode>
</MouseRect>
</PartInfo>
Any help would be greatly appreciated.

