Author Topic: Compare with joystick position Z  (Read 808 times)

Ciryan

  • Newbie
  • *
  • Posts: 14
Compare with joystick position Z
« on: November 19, 2018, 03:39:05 AM »
Hello there !

I'd like to know how do I compare a value to the joystick position (1 or 2) Z ?
In the device state condition I can choose positions X and Y but no Z.
If not possible, could you add the joystick position Z to the conditional block ?

Thank you.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Compare with joystick position Z
« Reply #1 on: November 19, 2018, 06:34:01 AM »
You can do this "the old-fashioned way" by using tokens in the "Text" tab:

E.G.
Code: [Select]
Begin Text Compare : [{EXP: {STATE_JOYSTICK1Z} > 32767}] Equals '1'


Quote from: VoiceAttackHelp.pdf page 151
{STATE_JOYSTICK1Z}
{STATE_JOYSTICK2Z} - This token is used to indicate the Z value of the indicated
joystick. The replaced value is “0” at minimum and “65535” at maximum. This value will be “-1” if the stick is unavailable.

For the documentation on the "{EXP:}" token, check pages 143 to 146 of VoiceAttackHelp.pdf(press F1 while VoiceAttack has focus to open it in your default PDF reader).



I assume Gary didn't add all axes to that dropdown to keep it less cluttered(as there are 8 different ones). You could put in a feature request for this.