Input Syntax: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 36: Line 36:
| <code>Button 1</code> results in a syntax error, because the expression is ambiguous.
| <code>Button 1</code> results in a syntax error, because the expression is ambiguous.
Adding backticks around the button name makes it able to be parsed correctly: <code>`Button 1`</code>
Adding backticks around the button name makes it able to be parsed correctly: <code>`Button 1`</code>
|-----------
! ''&#124;''
| The expression is true if the left-hand side (LHS) or the right-hand side (RHS) are true. (This is not an exclusive OR.)
Technically, this is implemented by taking the smaller of the LHS and RHS.
| <code>`Button 1` &#124; `Button 2`</code>
The virtual controller button will be pressed if and only if Button 1 and/or Button 2 are pressed.
|-----------
|-----------
! ''&amp;''
! ''&amp;''
| The expression is true if both the LHS and the RHS are true.
| The expression is true if both the LHS and the RHS are true.
Technically, this is implemented by taking the greater of the LHS and RHS.
| <code>`Button 1` &amp; `Button 2`</code>
| <code>`Button 1` &amp; `Button 2`</code>
The virtual controller button will be pressed if and only if both Button 1 and Button 2 are pressed.
The virtual controller button will be pressed if and only if both Button 1 and Button 2 are pressed.
Line 48: Line 55:
|-----------
|-----------
! ''+''
! ''+''
| The expression value is equal to the LHS value and the RHS value summed up.
| The expression value is equal to the LHS value and the RHS value summed up, clamped to the 0.0-1.0 range.
| <code>`Axis 1+` + `Axis 2+`</code>
| <code>`Axis 1+` + `Axis 2+`</code>
|-----------
|-----------

Navigation menu