- Messages
- 231
- Country

Partial success. Here are the new codes slave first:
Now the vc controller:
When left clicked at the vc controller the slave part moves what looks like the first 5 frames. Then with additional VC controller clicks the slave moves what looks like about 1 or 2 frames at a time untill it reaches full open. It takes over 60 clicks to open fully.
Right click of the vc controller does not respond decrementaly, but fully returns slave to closed position at a single click from any open position. Any advice on how to proceed will be welcomed.
Carl
Code:
<part>
<name>oil_flap_slave</name>
<animation>
<parameter>
<code>(L:oil_flap_slave,enum)</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<callback_code>
(L:oil_flap_slave,enum) ! (>L:oil_flap_slave,enum)
</callback_code>
</mouserect>
</part>
Now the vc controller:
Code:
<part>
<name>oil_switch_spring</name>
<animlength>100</animlength>
<animation>
<parameter>
<code>50 (L:oil_switch_spring,enum) 50 * +</code>
<Lag>100</Lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Left_Click-open/Right_Click-close</tooltip_text>
<mouse_flags>LeftSingle+Leftrelease+RightSingle+RightRelease</mouse_flags>
<callback_code>
(M:Event) 'LeftSingle' scmp 0 ==
if{ 1 (>L:oil_switch_spring,enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:oil_flap_slave,enum) ++ 5 max (>L:oil_flap_slave,enum) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ 0 (>L:oil_switch_spring,enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ -1 (>L:oil_switch_spring,enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:oil_switch_spring,enum) -- 0 min (>L:oil_flap_slave,enum) }
(M:Event) 'RightRelease' scmp 0 ==
if{ 0 (>L:oil_switch_spring,enum) }
</callback_code>
</mouserect>
</part>
When left clicked at the vc controller the slave part moves what looks like the first 5 frames. Then with additional VC controller clicks the slave moves what looks like about 1 or 2 frames at a time untill it reaches full open. It takes over 60 clicks to open fully.
Right click of the vc controller does not respond decrementaly, but fully returns slave to closed position at a single click from any open position. Any advice on how to proceed will be welcomed.
Carl

