Keeping sprint (shift) pressed as long as any movement (wasd) is maintained
Posted: 10 Jun 2018, 15:16
Titanfall 2 is my gold standard for sprinting movement, and I'm trying to transfer it to other games. In Titanfall 2, one tap of sprint will keep you in a sprint state even if you are strafing directly left or right at the lesser, pure strafing speed. Once you return to any forward or diagonal forward movement, full sprint resumes. To release sprint, one has to release all movement keys or, I believe 's' cancels it as well but I don't remember 100%.
The following, based off of an evilC script, is getting me fairly close, but I'm finding that my w-aw-a-aw-w seems to reset movement to walk upon returning to w. Any ideas for improving this anyone?
The following, based off of an evilC script, is getting me fairly close, but I'm finding that my w-aw-a-aw-w seems to reset movement to walk upon returning to w. Any ideas for improving this anyone?
Code: Select all
*$~w up::GoSub, move_up
*$~a up::GoSub, move_up
*$~s up::GoSub, move_up
*$~d up::GoSub, move_up
~w & LShift::GoSub, SprintAssist
~a & LShift::GoSub, SprintAssist
~s & LShift::GoSub, SprintAssist
~d & LShift::GoSub, SprintAssist
SprintAssist:
{ SendInput, {LShift Up}
SendInput, {LShift DownTemp}
} Return
move_up:
keywait w
keywait a
keywait s
keywait d
SendInput, {LShift Up}
Return