XIM Community

Strafe Left and Right While in ADS  (Read 1125 times)

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Strafe Left and Right While in ADS
« on: 08:41 AM - 06/24/18 »
Here is a updated version of this script. works pretty well if you ask me ;)


Q is set to toggle Strafing on and off.

Mind you this script has to finish the Right to Left in order to cancel movement. doing this in between will lock your wsad movement.



if you want to strafe for longer distances from left and right,

You need to edit the
Code: [Select]
    Sleep



Code: [Select]
#Include %A_AppData%\XIM Link\ScriptAdditionals\AHK_ADDITIONALS.ahk
#NoEnv
#InstallKeybdHook
#InstallMouseHook
#MaxThreadsBuffer on
SendMode Input


SetTimer, Strafe, 1

~RButton::Strafe()
q::_strafe := ! _strafe


Strafe()
{
global _Strafe
if _Strafe
{
Loop
{
if GetKeyState("RButton", "P"){
SendInput {RButton DownR}
KeyWait, w
KeyWait, s
KeyWait, a
KeyWait, d
    XIMInputData("LeftStickX", 412)
    Sleep 300
    XIMInputData("LeftStickX", -412)
    Sleep 300
    XIMInputData("LeftStickX", 0)
KeyWait, w
KeyWait, s
KeyWait, a
KeyWait, d
}
return
} ;; loop
} ;; if
} ;; Strafe()




« Last Edit: 12:12 PM - 07/28/18 by havoxxx »

Offline Od1n

  • Global Moderator
  • MVP
  • *
  • Posts: 27419
    • View Profile
Re: Strafe Left and Right While Shooting
« Reply #1 on: 03:39 PM - 06/24/18 »
nice idea and thanks for sharing! :)
the clip is a good idea, makes it much easier to understand the purpose of the script
PS4 & X1 | C: MS | XIM4 | 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: Zowie EC1-A | D: 3200 | P: 1000hz | BF4 4 HIP: 35 ADS: 20

Check out my Youtube Channel: XIMGameplay
Du sprichst Deutsch? Hier gehts zum deutschen Forum

Offline antithesis

  • MVP
  • *
  • Posts: 5711
    • View Profile
Re: Strafe Left and Right While Shooting
« Reply #2 on: 04:28 PM - 06/24/18 »
I don't know how you'd do it in AHK, but I suggest that if actual input from WASD or the left analog stick is detected that it disable auto-strafe. Otherwise you'll find yourself in situations where you're stuck in an inflexible, predefined movement pattern when shooting and will lose control over your movement when you need it most.

Offline Nataliy

  • Member
  • *
  • Posts: 123
    • View Profile
Re: Strafe Left and Right While Shooting
« Reply #3 on: 11:25 PM - 06/24/18 »
cool, you can try, is it for xim4?

Offline MRog40

  • MVP
  • *
  • Posts: 779
  • FPS games are 10% Aim and 90% positioning
    • View Profile
  • PSN ID: MRog40
Re: Strafe Left and Right While Shooting
« Reply #4 on: 08:10 AM - 06/25/18 »
cool, you can try, is it for xim4?
If you remove the first line you should be able to use it with SandhawC
Xim Apex | PS4 | PC | G502 | Corsair K65 LUX RGB | C24FG70 | Astro A40 TR | QcK XXL

Offline MRog40

  • MVP
  • *
  • Posts: 779
  • FPS games are 10% Aim and 90% positioning
    • View Profile
  • PSN ID: MRog40
Re: Strafe Left and Right While Shooting
« Reply #5 on: 08:14 AM - 06/25/18 »
I don't know how you'd do it in AHK, but I suggest that if actual input from WASD or the left analog stick is detected that it disable auto-strafe. Otherwise you'll find yourself in situations where you're stuck in an inflexible, predefined movement pattern when shooting and will lose control over your movement when you need it most.
Agree. Simply adding a couple !GetKeyStates so it breaks if you are moving yourself. If I were to use this I would have be active while ADSing, so I can sit on head glitches preaiming stuff in SND and be constantly shoulder peeking/moving
Xim Apex | PS4 | PC | G502 | Corsair K65 LUX RGB | C24FG70 | Astro A40 TR | QcK XXL

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Re: Strafe Left and Right While Shooting
« Reply #6 on: 08:20 AM - 06/25/18 »
I don't know how you'd do it in AHK, but I suggest that if actual input from WASD or the left analog stick is detected that it disable auto-strafe. Otherwise you'll find yourself in situations where you're stuck in an inflexible, predefined movement pattern when shooting and will lose control over your movement when you need it most.
Agree. Simply adding a couple !GetKeyStates so it breaks if you are moving yourself. If I were to use this I would have be active while ADSing, so I can sit on head glitches preaiming stuff in SND and be constantly shoulder peeking/moving

Good idea, im going to do this wen i get home.. Not to shabby of a idea. You guys are right tho it does lock the movement for the milliseconds that is being used for the adad, ill add keystates in there for it to not lock the movement

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Re: Strafe Left and Right While Shooting
« Reply #7 on: 03:38 PM - 06/25/18 »
I don't know how you'd do it in AHK, but I suggest that if actual input from WASD or the left analog stick is detected that it disable auto-strafe. Otherwise you'll find yourself in situations where you're stuck in an inflexible, predefined movement pattern when shooting and will lose control over your movement when you need it most.
Agree. Simply adding a couple !GetKeyStates so it breaks if you are moving yourself. If I were to use this I would have be active while ADSing, so I can sit on head glitches preaiming stuff in SND and be constantly shoulder peeking/moving

how would you go about this? i made a insane script and it did not work.. so what i did is set up 2 auxiliary profiles, One binded with O the other L, and set those to two to the WASD. A is O and O is D. then i made this script, to not interfere with the original A,D.

 
Code: [Select]
#Include %A_AppData%\XIM Link\ScriptAdditionals\AHK_ADDITIONALS.ahk
#Persistent
#KeyHistory, 0
#NoEnv
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
#InstallKeybdHook
#SingleInstance, Force
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
#NoEnv
#InstallMouseHook
SendMode Input
SetWorkingDir %A_ScriptDir%


~RButton::Strafe()
F7::_strafe := ! _strafe
F6::suspend

Strafe()
{
global _Strafe
if _Strafe
{
Loop
{
if GetKeyState("RButton", "P"){
Send, {RButton Down}
Send {O down}
sleep, 500
Send {O up}
Send {L down}
sleep, 500
Send {L up}
Send, {RButton Up} 
}
else
break
} ;; loop
} ;; if
} ;; Strafe()

http://xboxclips.com/lHlavox/14e700d3-9324-4fa3-8306-693bdb2a0aa2
« Last Edit: 04:02 PM - 06/25/18 by havoxxx »

Offline MRog40

  • MVP
  • *
  • Posts: 779
  • FPS games are 10% Aim and 90% positioning
    • View Profile
  • PSN ID: MRog40
Re: Strafe Left and Right While Shooting
« Reply #8 on: 05:09 PM - 06/25/18 »
how would you go about this? i made a insane script and it did not work.. so what i did is set up 2 auxiliary profiles, One binded with O the other L, and set those to two to the WASD. A is O and O is D. then i made this script, to not interfere with the original A,D.
The only way I know how is to have multiple GetKeyStates in the middle of your loop, and break up those long delays to shorter ones

Basically just break the loop if W, A, S, or D is ever pressed.
Xim Apex | PS4 | PC | G502 | Corsair K65 LUX RGB | C24FG70 | Astro A40 TR | QcK XXL

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Re: [AA Increase!] Strafe Left and Right While Shooting
« Reply #9 on: 08:47 PM - 06/25/18 »
try this out tell me what you think!

Offline Bookuvapes

  • Member
  • *
  • Posts: 51
    • View Profile
Re: [AA Increase!] Strafe Left and Right While Shooting
« Reply #10 on: 11:00 AM - 06/29/18 »
I setup the 2 aux profiles but when activated it just goes to the right most of the time, rarely to the left.
« Last Edit: 11:08 AM - 06/29/18 by Bookuvapes »

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Re: Strafe Left and Right While in ADS
« Reply #11 on: 10:46 AM - 07/28/18 »
updated :)

Offline Saltywatch

  • Member
  • *
  • Posts: 324
    • View Profile
  • PSN ID: Ididitmom
Re: Strafe Left and Right While in ADS
« Reply #12 on: 02:07 PM - 08/01/18 »
I tried this and it didnít work. Is this because the ximinput error thing?
No longer on Apex forums, please contact me via Youtube (saltywatch) for help, or my current configurations! Thanks!

Offline MRog40

  • MVP
  • *
  • Posts: 779
  • FPS games are 10% Aim and 90% positioning
    • View Profile
  • PSN ID: MRog40
Re: Strafe Left and Right While in ADS
« Reply #13 on: 04:19 PM - 08/01/18 »
I tried this and it didnít work. Is this because the ximinput error thing?
Probably yes
Xim Apex | PS4 | PC | G502 | Corsair K65 LUX RGB | C24FG70 | Astro A40 TR | QcK XXL

Offline havoxxx

  • MVP
  • *
  • Posts: 722
    • View Profile
Re: Strafe Left and Right While in ADS
« Reply #14 on: 06:19 PM - 08/01/18 »
I tried this and it didnít work. Is this because the ximinput error thing?
Probably yes

any ideas on how to to make wsad, not lock up within the script if not finished with the left nd right movement? the only thing I can think of is suspend, but that's not what I am not looking for...