XIM Community

no recoil not working  (Read 17950 times)

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
no recoil not working
« on: 12:59 PM - 12/03/15 »
thanks for the script havoc


#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

GetKeyState, state, Delete
if state = D
{
XIM:=false
}
GetKeyState, state, Insert
if state = D
{
XIM:=true
}
; XIM1
XIM4 := 1
; XIM
~LButton::
while GetKeyState("LButton") & XIM4
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 30
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
Sleep, 5
}
return

It seems to work on pc but when I try to get it working on xbox one through sanhawC it doesn't work for me? any ideas guys?

Offline Zacharybinx34

  • MVP
  • *
  • Posts: 2964
  • Karma [>] 9,000!!!!!!!!!!!!!!!!!
    • View Profile
Re: no recoil not working
« Reply #1 on: 01:29 PM - 12/03/15 »
thanks for the script havoc


#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

GetKeyState, state, Delete
if state = D
{
XIM:=false
}
GetKeyState, state, Insert
if state = D
{
XIM:=true
}
; XIM1
XIM4 := 1
; XIM
~LButton::
while GetKeyState("LButton") & XIM4
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 30
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
Sleep, 5
}
return

It seems to work on pc but when I try to get it working on xbox one through sanhawC it doesn't work for me? any ideas guys?

What are you actually trying to do?
I am Spartacus!

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
Re: no recoil not working
« Reply #2 on: 01:39 PM - 12/03/15 »
This is an anti recoil script...  I think. When you press left mouse button it moves your mouse down to combat upward gun recoil.


Offline Zacharybinx34

  • MVP
  • *
  • Posts: 2964
  • Karma [>] 9,000!!!!!!!!!!!!!!!!!
    • View Profile
Re: no recoil not working
« Reply #3 on: 01:54 PM - 12/03/15 »
This is an anti recoil script...  I think. When you press left mouse button it moves your mouse down to combat upward gun recoil.



Interesting, if you get it fixed, let us know.
I am Spartacus!

Offline Od1n

  • Global Moderator
  • MVP
  • *
  • Posts: 34261
    • View Profile
Re: no recoil not working
« Reply #4 on: 05:49 PM - 12/03/15 »
add the usehook command

also scripts need to be written in a "smooth" way, means an ahk script that sort of spams the command as fast as the PC can will not work as well as a script that takes the update rate of XIM and SandhawC into account
the challenging part is to optimize a script for SandhawC for scripts that require a smooth movement
PS5 & X1 | C: MS | XIM Apex & Nexus | FW: the latest ofc! :) | Mon: BenQ XL2420Z | Pad: Zowie G-SR | KB: Ducky DK1008L Cherry Red O-Rings| A: AKG K701 Creative X7 Antlion Modmic | M: Glorious Model O | D: 1800 | P: 1000hz | BF4 4 HIP: 35 ADS: 20

My Fortnite Creator Code: beamimpact
Check out my Youtube Channel: XIM Central

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
Re: no recoil not working
« Reply #5 on: 05:48 AM - 12/04/15 »
Thanks od1n, so I have added the usehook command and it works sporadically. How do I make this code "smooth"? and how do I take account of the update rate of xim and sandhawC?

Do you have some sample code that demonstrates the above that you could share?


#NoEnv
#Usehook
SendMode Input
SetWorkingDir %A_ScriptDir%

GetKeyState, state, Delete
if state = D
{
XIM:=false
}
GetKeyState, state, Insert
if state = D
{
XIM:=true
}
; XIM1
XIM4 := 1
; XIM
~LButton::
while GetKeyState("LButton") & XIM4
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 30
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
Sleep, 5
}
return

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
Re: no recoil not working
« Reply #6 on: 08:08 AM - 12/14/15 »

xim4 polling rate to xbone is 125hz (8ms)
I set my sandhawC to run at 125hz

I am trying to get this anti recoil script working, it works but in a very inconsistent way... sometimes I left click and it moves the mouse down to compensate for upwards recoil, sometimes it does nothing.

I found something called setbatchlines, 8ms that allows you to set the speed at which the autohotkey runs.

Am I on the right lines od1n?

do I need to consider any other polling rates? of the mouse maybe?

I'm trying to get this "smooth" as you suggested.

Thanks


Offline Od1n

  • Global Moderator
  • MVP
  • *
  • Posts: 34261
    • View Profile
Re: no recoil not working
« Reply #7 on: 05:02 PM - 12/14/15 »
havent tested that yet but it sounds like a good idea

i havent looked into the issue for a few month now so i cannot tell you which mouse grab method you need to use in order to get a smooth script
though it would be nice incase you find one to let us all know :)
PS5 & X1 | C: MS | XIM Apex & Nexus | FW: the latest ofc! :) | Mon: BenQ XL2420Z | Pad: Zowie G-SR | KB: Ducky DK1008L Cherry Red O-Rings| A: AKG K701 Creative X7 Antlion Modmic | M: Glorious Model O | D: 1800 | P: 1000hz | BF4 4 HIP: 35 ADS: 20

My Fortnite Creator Code: beamimpact
Check out my Youtube Channel: XIM Central

Offline Rouss3l

  • Member
  • *
  • Posts: 122
    • View Profile
Re: no recoil not working
« Reply #8 on: 12:18 AM - 12/22/15 »
Could not get this working even with usehook command. I have a few ideas to try and smooth it but cannot get anything working on ps4. Am I missing something with this? Put it into the script folder and launched sand which has the script working on desktop but not in game when I press pause.

Code: [Select]
#NoEnv
#Usehook
SendMode Input
SetWorkingDir %A_ScriptDir%

GetKeyState, state, Delete
if state = D
{
XIM:=false
}
GetKeyState, state, Insert
if state = D
{
XIM:=true
}
; XIM1
XIM4 := 1
; XIM
~LButton::
while GetKeyState("LButton") & XIM4
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 30
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
Sleep, 5
}
return

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
Re: no recoil not working
« Reply #9 on: 06:54 AM - 12/22/15 »
To be honest, I've given up on anti recoil...  Tried setbatchlines to reduce the speed at which it runs the script...  No joy.

Best bet is to buy a titan one... Still a massive ball ache

Offline Rouss3l

  • Member
  • *
  • Posts: 122
    • View Profile
Re: no recoil not working
« Reply #10 on: 09:54 AM - 12/23/15 »
Nah titanOne anti recoil does not work with XIM4. It creates weird movement skipping when trying to track enemies. I have been trying to figure that out as well for the longest time but unfortunately it has not worked.

Offline Frash brang

  • MVP
  • *
  • Posts: 1155
    • View Profile
  • Gamertag: Antithesis D
Re: no recoil not working
« Reply #11 on: 06:52 PM - 12/26/15 »
I bought a bloody mouse which has on board macro storage and anti recoil calibration. It did not work either and created similar movements that you describe above.

Can't work out why rapid fire (continuously looping fire and stop firing) works but anti recoil (continuously moving mouse down) doesn't.

Can someone with a massive brain figure this out for me. Thanks in advance.

Offline W11cE

  • Moderator
  • MVP
  • *
  • Posts: 1532
    • View Profile
Re: no recoil not working
« Reply #12 on: 04:11 PM - 12/28/15 »
Rapid fire works because SC queues all the button presses and makes sure all button presses get through on a speed that works on consoles.

There is also limited speed where console can react when it comes to rapid joystick moves. Rapid first shot recoil compensation is impossible. Only slow drags work on anti recoil scripts.

Offline abc123

  • MVP
  • *
  • Posts: 2958
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: no recoil not working
« Reply #13 on: 10:14 PM - 12/31/15 »
Rapid fire works because SC queues all the button presses and makes sure all button presses get through on a speed that works on consoles.

There is also limited speed where console can react when it comes to rapid joystick moves. Rapid first shot recoil compensation is impossible. Only slow drags work on anti recoil scripts.

this is interesting, the next issue is that auto-hotkey doesn't support "slow" drags while SendMode is set to Input, only instantaneous mouse movements. these don't seem to work

Offline Od1n

  • Global Moderator
  • MVP
  • *
  • Posts: 34261
    • View Profile
Re: no recoil not working
« Reply #14 on: 10:39 AM - 01/01/16 »
if you need such a script abc that is working with sandhawc (slow mouse drags downwards that you can customize) i can sent you one, maybe it helps you to unterstand what this script does different compared to all the others
(i havent had the time to go through the several hundred code lines yet)
PS5 & X1 | C: MS | XIM Apex & Nexus | FW: the latest ofc! :) | Mon: BenQ XL2420Z | Pad: Zowie G-SR | KB: Ducky DK1008L Cherry Red O-Rings| A: AKG K701 Creative X7 Antlion Modmic | M: Glorious Model O | D: 1800 | P: 1000hz | BF4 4 HIP: 35 ADS: 20

My Fortnite Creator Code: beamimpact
Check out my Youtube Channel: XIM Central


Admin