XIM Community

Is there a way to pull joystick states?  (Read 256 times)

Offline tellahane

  • Member
  • *
  • Posts: 3
    • View Profile
  • Gamertag: Tellahane
  • PSN ID: Tellahane
Is there a way to pull joystick states?
« on: 02:36 PM - 02/15/19 »
So GetKeyState in ahk pulls button states, theres ximinputdata to put out data, but is there anyway to retrieve a joysticks current x,y positions?

I'm one of the crazy fools who tries to play for honor through this setup and my tweaks works pretty well, except for classes that use full block or essentially pull straight down on the right stick, I accidently go into that all the time no matter what settings I try, I was thinking about seeing if I can get the xy and if I detect it going that direction to divert it to the last direction I was heading instead, so if I try and block left from right it doesn't go into full block stance on accident instead of switching to left to go for the parry etc...

Offline W11cE

  • Moderator
  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Is there a way to pull joystick states?
« Reply #1 on: 07:47 PM - 02/24/19 »
If you mean the axis states of a device connected to your PC, you can still use GetKeyState in ahk. If you want the actual joystick axis states on the XIM itself, that is not possible.

Offline tellahane

  • Member
  • *
  • Posts: 3
    • View Profile
  • Gamertag: Tellahane
  • PSN ID: Tellahane
Re: Is there a way to pull joystick states?
« Reply #2 on: 05:24 PM - 02/26/19 »
Its all through the pc, so the setup I have is I spend a good deal of time both at home and at work(ambulance), my partner brings in a portable ps4 setup and so i got one too, I suck at console controller though which is why I got the xim apex etc.

So my setup is the following:

Hori controller and utech venus mouse, into a microsoft surface pro 4, that XIM links into the xim apex, which only has the controller plugged into it, that plugs into the PS4.

So yes all of that plugs into the PC.

So where I'm struggling is the right mouse movements, in for honor there are 3 directions that you can "attack, block etc". Left, Right, and Top. If you move the mouse in any of these directions it switches which guard your going to do etc. A few of the classes have a unique ability if they move the mouse straight down, but everytime you "switch" or activate that move there is a delay before you can do something else. So in order to have a fast reaction time I set the sensitivity so that if I move just a bit it goes to that side so reaction time is quick.

However the problem I have is sometimes with the sensitivity set that way I very often accidentally have just enough movement down it enters that special move. So I was looking for a way to "intercept" or more importantly "stop" any input data that sais the mouse moved down, and have it use the delta movement to realize I was headed down left or left in some way and continue it left, or right etc. I didn't want to activate the down move unless I pressed a different button.

I sort of accomplished part of it in having a setting in xim apex where it reduces the sensitivity to 0 if I press a certain button on the keyboard, so like when I do want to activate that move, I'll press a thumb button on the mouse and it stops the sensitivity by activating that mode so I can't do anything with the mouse movement, then sends the ximinput to straight down, which works great for activating that move, but I just don't have a way to prevent that downward movement, or trying to figure out how to script that part. Hopefully that explains better...

Offline W11cE

  • Moderator
  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Is there a way to pull joystick states?
« Reply #3 on: 04:05 PM - 03/11/19 »
What if you would make a subconfig on xim where the right stick is bound to buttons instead. Then just have the activation key for that and downwards movement bound to same key. Could this work?

Offline tellahane

  • Member
  • *
  • Posts: 3
    • View Profile
  • Gamertag: Tellahane
  • PSN ID: Tellahane
Re: Is there a way to pull joystick states?
« Reply #4 on: 09:36 PM - 03/12/19 »
What if you would make a subconfig on xim where the right stick is bound to buttons instead. Then just have the activation key for that and downwards movement bound to same key. Could this work?

That would be perfect, I could bind the directions to the key presses and code in to interrupt the downward movement unless a certain button is held and still be able to tweak sensitivities and the like, that would work great for honor!