If I want to use a single key (or button) to toggle a property between "0" and
"-1", is there a way to do it without creating an <else> tag?
example:
<button n="5">
<repeatable>false</repeatable>
<binding>
<condition>
<property>/engines/engine/augmentation</property>
</condition>
<command>property-assign</command>
<property>/fdm/jsbsim/propulsion/augmentation_cmd</property>
<value>0</value>
</binding>
<binding>
<condition>
<property>/engines/engine/augmentation</property>
<value>false</value>
</condition>
<command>property-assign</command>
<property>/fdm/jsbsim/propulsion/augmentation_cmd</property>
<value>-1</value>
</binding>
</button>
The property "augmentation_cmd" can have any integer value, but I'm only
interested in -1 and 0 for now. I want to check the first engine to see if
"augmentation" is true or false, and then assign a value to
"augmentation_cmd" based on this test.
In the example the logic fails because the second binding reverses the action
of the first binding. (Note: setting "augmentation_cmd" to -1 reverses the
value of "augmentation" for every engine)
I could make "augmentation_cmd" a boolean value, but then I would lose the
ability to set the afterburner for engines individually. What I would like
to do is this:
<button n="5">
<repeatable>false</repeatable>
<binding>
<condition>
<property>/engines/engine/augmentation</property>
</condition>
<command>property-assign</command>
<property>/fdm/jsbsim/propulsion/augmentation_cmd</property>
<value>0</value>
<else>
<command>property-assign</command>
<property>/fdm/jsbsim/propulsion/augmentation_cmd</property>
<value>-1</value>
</else>
</binding>
</button>
But, as far as I know, the <else> tag doesn't exist.
Thanks,
Dave Culp
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel