dg-505 hat geschrieben:In die key bindings für den Walker eine condition einbauen, damit die Aktionen nur ausgeführt werden, wenn der Walker draußen ist und man in der Walk View/Walker Orbit View ist.
[...]
So bleiben die Tasten für andere Aktionen verfügbar, wenn man nicht im Walk-Modus ist.
Das habe ich schon:
- Code: Alles auswählen
<key n="115">
<name>s</name>
<desc>Walk backward</desc>
<repeatable>false</repeatable>
<binding n="0">
<condition>
<or>
<equals>
<property>sim/current-view/name</property>
<value>Walk View</value>
</equals>
<equals>
<property>sim/current-view/name</property>
<value>Walker Orbit View</value>
</equals>
<equals>
<property>sim/walker/standalone</property>
<value>1</value>
</equals>
</or>
</condition>
<command>property-assign</command>
<property>sim/walker/key-triggers/forward</property>
<value>-1</value>
</binding>
<binding n="1">
<command>property-assign</command>
<property>sim/walker/key-triggers/speed</property>
<property>sim/walker/speed-mps</property>
</binding>
<binding n="2">
<condition>
<and>
<not-equals>
<property>sim/current-view/name</property>
<value>Walk View</value>
</not-equals>
<not-equals>
<property>sim/current-view/name</property>
<value>Walker Orbit View</value>
</not-equals>
</and>
</condition>
<command>nasal</command>
<script>controls.startEngine(1)</script>
</binding>
<mod-up>
<binding n="0">
<command>property-assign</command>
<property>sim/walker/key-triggers/forward</property>
<value>0</value>
</binding>
<binding n="1">
<command>property-assign</command>
<property>sim/walker/key-triggers/speed</property>
<property>sim/walker/speed-mps</property>
</binding>
<binding n="2">
<command>nasal</command>
<script>controls.startEngine(0)</script>
</binding>
</mod-up>
</key>
Das Problem geht aber los, wenn das Flugzeug zusätzliche key bindings auf den Walker Tasten hat, oder die Standard key bindings modifiziert. Das kann ich nicht in jedem Fall vorhersehen. Es wäre vielleicht möglich, die Bindings beim aktivieren des Walkers zu ersetzen und später wieder zurück zu kopieren. Erfordert wohl eine Menge Nasal und Gewühle im Property Tree.
Grüße
Detlef