- Messages
- 683
- Country

I have written the following code to "animate" window blinds. It is working, but upon loading the plane the first visibility part which should be visible is not. After cycling the animation everything else is working properly, and upon return to the 0 position the "missing" part is there, and it works fine after that.
Any ideas?
Any ideas?
PHP:
<PartInfo>
<Name>Blind_Adjust01</Name>
<AnimLength>30</AnimLength>
<Animation>
<Parameter>
<Code>(L:Blind_Adjust01,enum) 10 * </Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:Blind_Adjust01, enum) ++ 3 min (>L:Blind_Adjust01, enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:Blind_Adjust01, enum) -- 0 max (>L:Blind_Adjust01, enum) }
(L:Blind_Adjust01,enum) 0 == if{ 1 (>L:Blinds01_0,bool) } els{ 0 (>L:Blinds01_0,bool) }
(L:Blind_Adjust01,enum) 1 == if{ 1 (>L:Blinds01_10,bool) } els{ 0 (>L:Blinds01_10,bool) }
(L:Blind_Adjust01,enum) 2 == if{ 1 (>L:Blinds01_20,bool) } els{ 0 (>L:Blinds01_20,bool) }
(L:Blind_Adjust01,enum) 3 == if{ 1 (>L:Blinds01_30,bool) } els{ 0 (>L:Blinds01_30,bool) }
</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>Blinds01_0</Name>
<Visibility>
<Parameter>
<Code>(L:Blinds01_0,bool) 0 > if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</PartInfo>

