482
edits
Line 75: | Line 75: | ||
Different FlightGear aircraft use different locations for the main armament trigger. Two locations are commonly used: | Different FlightGear aircraft use different locations for the main armament trigger. Two locations are commonly used: | ||
controls/armament/trigger (preferred) | |||
ai/submodels/trigger (used by some) | |||
The following code, which you can place in your keyboard.xml file or (if you are an aircraft designer) in your aircraft's -set.xml file in the <keyboard> section, triggers both of | In addition, a number of aircraft have more than one weapon--typically a light machine gun and a heavy cannon. | ||
Typically this trigger is used for the second armament: | |||
controls/armament/trigger1 | |||
The following code, which you can place in your keyboard.xml file or (if you are an aircraft designer) in your aircraft's -set.xml file in the <keyboard> section, triggers both locations, both types of armament, and works with almost all FG aircraft. | |||
It uses '''e''' to trigger the main armament and '''E''' to triger the secondary: | |||
<key n="101"> | <key n="101"> | ||
Line 102: | Line 111: | ||
<command>property-assign</command> | <command>property-assign</command> | ||
<property>controls/armament/trigger</property> | <property>controls/armament/trigger</property> | ||
<value>false</value> | |||
</binding> | |||
</mod-up> | |||
</key> | |||
<key n="69"> | |||
<name>E</name> | |||
<desc>Cannons Trigger</desc> | |||
<binding> | |||
<command>property-assign</command> | |||
<property>controls/armament/trigger1</property> | |||
<value>true</value> | |||
</binding> | |||
<mod-up> | |||
<binding> | |||
<command>property-assign</command> | |||
<property>controls/armament/trigger1</property> | |||
<value>false</value> | <value>false</value> | ||
</binding> | </binding> | ||
</mod-up> | </mod-up> | ||
</key> | </key> |
edits