Rainbow Six Siege Leaning AHK

Ask gaming related questions (AHK v1.1 and older)
DoobieToTheHead
Posts: 10
Joined: 20 Dec 2017, 17:57

Rainbow Six Siege Leaning AHK

21 Dec 2017, 06:57

Hi Guys,

So I've been trying to learn to write AHK scripts for a while now, and am still struggling. What i'm after is a script for Siege, which would function as an auto-lean when I ADS.

So basically when I press a modifier plus RButton (LAlt+RButton), It would trigger the effect of repeatedly pressing 'q' 'e' 'q' 'e' 'q' 'e' with a 250ms or so delay in between whilst ever (LAlt+RButton) is held down, and when I release (LAlt+RButton) it would drop me out of ADS and stop leaning left and right. The reason for the modifier is so that I can aim normally without the leaning if needed.

If anyone could help me with this and possibly comment out their code so that I can understand and learn it, it would be greatly appreciated.

And if anything i've said doesn't make sense please feel free to ask the question.

Thanks in advance,
Image
User avatar
ahkDustVorteX
Posts: 47
Joined: 14 May 2014, 12:08

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 07:49

Hi DoobieToTheHead,

Something like this? I did not tested, but i guess is some sort of this: :)

Code: Select all

{LAlt}{RButtonDown}::
{
	i := 1
	While (i<100)
	{
		Send, q
		Sleep, 250
		Send, e
		i := i + 1
	}
	Return
}

Regards
Editor: Notepad++
"Those who wait and persist, always achieve."
DoobieToTheHead
Posts: 10
Joined: 20 Dec 2017, 17:57

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 08:20

ahkDustVorteX wrote:Hi DoobieToTheHead,

Something like this? I did not tested, but i guess is some sort of this: :)

Code: Select all

{LAlt}{RButtonDown}::
{
	i := 1
	While (i<100)
	{
		Send, q
		Sleep, 250
		Send, e
		i := i + 1
	}
	Return
}

Regards

Invalid code i'm afraid, error on start...
Image
DoobieToTheHead
Posts: 10
Joined: 20 Dec 2017, 17:57

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 08:32

#Persistent
#SingleInstance, Force
;
;
RButton::
while (GetKeyState("RButton", "P")) {
Loop{
Send, q
Sleep, 250
Send, e
Sleep, 250
}}

Pause


This is what I have so far, it's working, all im unsure on is how to get it to stop on key release.... and how to make it a alt plus rbutton? instead of just rbutton?
Image
User avatar
ahkDustVorteX
Posts: 47
Joined: 14 May 2014, 12:08

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 09:34

You have to use RButtonDown event. When you click and hold, the code begins. If you release the button, it stops.
Editor: Notepad++
"Those who wait and persist, always achieve."
DoobieToTheHead
Posts: 10
Joined: 20 Dec 2017, 17:57

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 10:25

ahkDustVorteX wrote:You have to use RButtonDown event. When you click and hold, the code begins. If you release the button, it stops.
How do I incorporate that? I have tried RButtonDown:: but this is incorrect :\
Image
DoobieToTheHead
Posts: 10
Joined: 20 Dec 2017, 17:57

Re: Rainbow Six Siege Leaning AHK

21 Dec 2017, 11:01

Right I think I've done it, the only thing I could do with now is a hotkey to close the script, although anything I do seems to break the script :\

Code: Select all

#Persistent
#SingleInstance, Force
;
;


$!RButton::
	while (GetKeyState("RButton", "P")) 
	
	{
	
		Loop,{
			Send, q
			Sleep, 250
			GetKeyState, RButton, P
    if state = U  ; The key has been released, so break out of the loop.
        Reload
	
	
			Send, e
			Sleep, 250
			GetKeyState, state, RButton, P
    if state = U
        Reload
	
		}}
Image

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 144 guests