The first half of the code has absolutely nothing to do with the throttle adjustments - all the first two <animation>s with type rotate do is rotate the levers in response to the throttle command ! You only need to combine the two other animations (those with type pick) into one. So, replace this:
- Code: Select all
<animation>
<type>pick</type>
<object-name>ThrottleControl.L</object-name>
<visible>true</visible>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>SenecaII.mouseHandler.set( "/controls/engines/engine[0]/throttle", 0.01 );</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>SenecaII.mouseHandler.set()</script>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>ThrottleControl.R</object-name>
<visible>true</visible>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>SenecaII.mouseHandler.set( "/controls/engines/engine[1]/throttle", 0.01 );</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>SenecaII.mouseHandler.set()</script>
</binding>
</mod-up>
</action>
</animation>
with this:
- Code: Select all
<animation>
<type>pick</type>
<object-name>ThrottleControl.L</object-name>
<object-name>ThrottleControl.R</object-name>
<visible>true</visible>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
SenecaII.mouseHandler.set( "/controls/engines/engine[0]/throttle", 0.01 );
SenecaII.mouseHandler.set( "/controls/engines/engine[1]/throttle", 0.01 );
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>SenecaII.mouseHandler.set()</script>
</binding>
</mod-up>
</action>
</animation>
(should work - but didn't test it). But while you are at it, you could as well delete the whole code part you posted and use this instead:
- Code: Select all
<animation>
<type>knob</type>
<object-name>ThrottleControl.L</object-name>
<property>controls/engines/engine[0]/throttle</property>
<factor>45.0</factor>
<axis>
<x1-m>-1.87609</x1-m>
<y1-m>1</y1-m>
<z1-m>1.24033</z1-m>
<x2-m>-1.87609</x2-m>
<y2-m>-1</y2-m>
<z2-m>1.24033</z2-m>
</axis>
<action>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[0]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[1]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
</action>
<shift-action>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[0]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
</shift-action>
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip>left-throttle</tooltip>
<label>Left throttle: %d%%</label>
<measure-text>Left throttle: 100%</measure-text>
<property>controls/engines/engine[0]/throttle</property>
<mapping>percent</mappin>
</binding>
</hovered>
</animation>
<animation>
<type>knob</type>
<object-name>ThrottleControl.R</object-name>
<property>controls/engines/engine[1]/throttle</property>
<factor>45.0</factor>
<axis>
<x1-m>-1.87609</x1-m>
<y1-m>1</y1-m>
<z1-m>1.24033</z1-m>
<x2-m>-1.87609</x2-m>
<y2-m>-1</y2-m>
<z2-m>1.24033</z2-m>
</axis>
<action>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[1]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[0]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
</action>
<shift-action>
<binding>
<command>property-adjust</command>
<property>controls/engines/engine[1]/throttle</property>
<min>0</min>
<max>1</max>
<factor>0.01</factor>
</binding>
</shift-action>
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip>right-throttle</tooltip>
<label>Right throttle: %d%%</label>
<measure-text>Right throttle: 100%</measure-text>
<property>controls/engines/engine[1]/throttle</property>
<mapping>percent</mappin>
</binding>
</hovered>
</animation>
This uses the more modern knob animation instead of the old-fashioned combination of pick and rotate animation, but is also better to use:
- Usually you want to adjust the throttle of both engines equally. For that, on any of the two levers, either drag, or scroll, or left-click to increase and middle-click to decrease.
- But if you really want to adjust only one throttle, you can still do that as well - just put your mouse on the respective lever and hold down Shift while scrolling or dragging or clicking !
- Additionally, each lever now displays it's current setting in percent in a tooltip when you put your mouse over it.
BTW - it would be great if this modification could be merged into FGAddon.