Zeiten
Resource contributor
- Messages
- 444
- Country

Hi.
It's me again
Trying to code a switch with 6 positions.
Found a similar code at FFDS and tried to adapt it into what I needed and it work to some degree.
The switch moves in 6 increments, but the movement is not enough.
From position 0 to 6 the switch should move 180 degress.
Animated it with 100 kf with ticks every 20 kf's.
It's me again
Trying to code a switch with 6 positions.
Found a similar code at FFDS and tried to adapt it into what I needed and it work to some degree.
The switch moves in 6 increments, but the movement is not enough.
From position 0 to 6 the switch should move 180 degress.
Animated it with 100 kf with ticks every 20 kf's.
Code:
<PartInfo>
<Name>oh_ci_switch_station_select</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code> (L:oh ci station select, enum) 0 == if{ 0 }
(L:oh ci station select, enum) 1 == if{ 1 }
(L:oh ci station select, enum) 2 == if{ 2 }
(L:oh ci station select, enum) 3 == if{ 3 }
(L:oh ci station select, enum) 4 == if{ 4 }
(L:oh ci station select, enum) 5 == if{ 5 }
</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Station Select</TooltipText>
<MouseFlags>LeftSingle+RightSingle</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:oh ci station select, enum) -- 0 max (>L:oh ci station select, enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:oh ci station select, enum) ++ 5 min (>L:oh ci station select, enum) }
</CallbackCode>
</MouseRect>
</PartInfo>

