- Messages
- 231
- Country

Hi Y'all
My editor has been grousing about the drag able nature of the stock DC3 magneto switch part name I have been using for my VC mag switch. So I cobbled up this code to make it left and right click able:
For the most part it works well, starts in the both position, right clicks down thru the right and left positions and shuts down the engine in the 0 position. Then left clicks thru the left, right and both positions as needed.
The problem is when left clicked to return to the both position with the engine off, if you happen to left click an extra time the engine starts. Is there any way to defeat the engine start as this F4u-1 was a shell start system and the magneto switch was not the starter trigger.
Carl
My editor has been grousing about the drag able nature of the stock DC3 magneto switch part name I have been using for my VC mag switch. So I cobbled up this code to make it left and right click able:
Code:
<part>
<name>mag_mast</name>
<animlength>75</animlength>
<animation>
<parameter>
<!-- 0 = Off, 25 = Left, 50 = Right, 75 = Both -->
<code>(A:Recip eng left magneto:1,bool) 2 * (A:Recip eng right magneto:1,bool) + 25 *</code>
<Lag>100</Lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_id>TOOLTIPTEXT_MAGNETO_SWITCH</tooltip_id>
<mouse_flags>LeftSingle+RightSingle</mouse_flags>
<callback_code>
(M:Event) 'LeftSingle' scmp 0 ==
if{ 1 (L:mag_mast,enum) ++ 10 min (>L:mag_mast,enum) (>K:MAGNETO_INCR) }
(M:Event) 'RightSingle' scmp 0 ==
if{ -1 (L:mag_mast,enum) -- 0 max (>L:mag_mast,enum) (>K:MAGNETO_DECR) }
1 (>L:XMLSND9,enum)
</callback_code>
</mouserect>
</part>
For the most part it works well, starts in the both position, right clicks down thru the right and left positions and shuts down the engine in the 0 position. Then left clicks thru the left, right and both positions as needed.
The problem is when left clicked to return to the both position with the engine off, if you happen to left click an extra time the engine starts. Is there any way to defeat the engine start as this F4u-1 was a shell start system and the magneto switch was not the starter trigger.
Carl

