- Messages
- 1,749
- Country

I was wondering if someone could help me understand why
some parts will animate and other just do the function.
Heres what I need. I need a animated Knob for the
comm1 radio frequency.
I made 2 codes that work and don't work.
The first code just animates the knob wrong.
I used 100 frames, 0 50 and 100. It just moves
slightly right then returns.
The other code I made just lets the mouse wheel
change the frequency. Drag will work too.
I need it to click left and right. Hopefully animate too.
Here is the working code with no animation or click.
<part>
<name>Fract_Com2_Radio</name>
<animation>
<parameter>
<sim>
<variable>COM TRANSMIT:2</variable>
<units>bool</units>
<scale>50</scale>
</sim>
<lag>400</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<help_id>HELPID_RADIO_COMM1_FREQ</help_id>
<tooltip_id>TOOLTIPTEXT_COMM2_FREQ</tooltip_id>
<mouse_flags>LeftSingle+RightSingle+LeftRelease+Wheel</mouse_flags>
<callback_jump_dragging>
<Xmovement>
<delta>3</delta>
<event_id_inc>COM2_RADIO_FRACT_INC</event_id_inc>
<event_id_dec>COM2_RADIO_FRACT_DEC</event_id_dec>
</Xmovement>
</callback_jump_dragging>
</mouserect>
</part>
Thanks Delivery Guy,
some parts will animate and other just do the function.
Heres what I need. I need a animated Knob for the
comm1 radio frequency.
I made 2 codes that work and don't work.
The first code just animates the knob wrong.
I used 100 frames, 0 50 and 100. It just moves
slightly right then returns.
The other code I made just lets the mouse wheel
change the frequency. Drag will work too.
I need it to click left and right. Hopefully animate too.
Here is the working code with no animation or click.
<part>
<name>Fract_Com2_Radio</name>
<animation>
<parameter>
<sim>
<variable>COM TRANSMIT:2</variable>
<units>bool</units>
<scale>50</scale>
</sim>
<lag>400</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<help_id>HELPID_RADIO_COMM1_FREQ</help_id>
<tooltip_id>TOOLTIPTEXT_COMM2_FREQ</tooltip_id>
<mouse_flags>LeftSingle+RightSingle+LeftRelease+Wheel</mouse_flags>
<callback_jump_dragging>
<Xmovement>
<delta>3</delta>
<event_id_inc>COM2_RADIO_FRACT_INC</event_id_inc>
<event_id_dec>COM2_RADIO_FRACT_DEC</event_id_dec>
</Xmovement>
</callback_jump_dragging>
</mouserect>
</part>
Thanks Delivery Guy,