No recoil for shooters

Ask gaming related questions (AHK v1.1 and older)
avn71
Posts: 10
Joined: 11 Oct 2021, 14:38

No recoil for shooters

Post by avn71 » 13 Oct 2021, 09:52

Hello dear forum users!
I realize this topic has been repeated many times already, but please pay a little attention.
In shooters, weapons are often found that do not have a constant barrel pull. It happens that after the first or after two or three shots, the barrel goes high, but after that the amount of displacement decreases and another correction is required. I reviewed all the topics, but I could not find a similar one. Perhaps I missed it. I myself am a beginner and I cannot put ready-made blanks into one working script. Please help, if not difficult.
I will try to clearly explain what you want).
A script is needed so that in the initial SET time interval the cursor is moved along one specified coordinates (X, Y axes) and after this interval you can set another offset (X, Y) or simply set zero. Those. so that in the script it was possible to set two offsets of the cursor during its operation. All this, of course, so that it was brought up to the left mouse button (pressing the button - starting work, releasing - ending work)
I have the script below, but only one offset can be set there. Perhaps it can solve this through the built-in variable ‘A_Index’ in the Loop loop, but as a beginner I cannot do it. If you can tell me how this can be done in any way, I will be very grateful)

Code: Select all

_auto := true 
~LButton::autofire() 
+LButton::_auto := ! _auto 
F5::Suspend
autofire() 
{ 
global _auto 
if _auto 
{ 
Loop 
{ 
if GetKeyState("LButton", "P") 
{ 
Sleep 0 
mouseXY(0, 1) 
Sleep 150 
} 
else 
break 
} ;; loop 
} ;; if 
} ;; autofire()
mouseXY(x,y) 
{ 
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) 
}
[Mod edit: [code][/code] tags added.]

Return to “Gaming Help (v1)”