Page 1 of 1

Quickscope script

Posted: 24 May 2018, 20:24
by Gandalf_yayo
I've failed to make a quickscope script, i want that "LButton" act as inzoom+shooting with a delay. So my LButton needs to act as "m"(zoom) and "Xbutton1"(shoot) with a small delay between them.

It's probably an easy one, but im new to scripting and i'd like some help, Any idea's?

as far as i came up with is:

LButton::^m (it works but without a delay)

Re: Quickscope script

Posted: 25 May 2018, 01:13
by AHKStudent
try

LButton::
sleep, 3000
send, ^m

Re: Quickscope script

Posted: 25 May 2018, 06:06
by Gandalf_yayo
AHKStudent wrote:try

LButton::
sleep, 3000
send, ^m
Doesn't work. I've tried such scripts, i don't know what else i can try

Re: Quickscope script

Posted: 25 May 2018, 06:52
by swagfag
u can try describing what it is that isnt working, what the current behavior is and what the expected should be

anyway, solely based off of this:
So my LButton needs to act as "m"(zoom) and "Xbutton1"(shoot) with a small delay between them.

Code: Select all

*LButton::
{
	Send m
	Sleep 1000
	Send {XButton1}	
return
}

Re: Quickscope script

Posted: 25 May 2018, 13:05
by Gandalf_yayo
swagfag wrote:u can try describing what it is that isnt working, what the current behavior is and what the expected should be

anyway, solely based off of this:
So my LButton needs to act as "m"(zoom) and "Xbutton1"(shoot) with a small delay between them.

Code: Select all

*LButton::
{
	Send m
	Sleep 1000
	Send {XButton1}	
return
}
This is what i've tried before, it doesn't keep the "Xbutton1" pressed (continues shooting). Somehow all these kind of scripts doesn't work for me.
The problem i have ~LButton::^m , it works, but there's no delay in the shooting after zooming, so the purpose of quickscoping isn't there.

Re: Quickscope script

Posted: 25 May 2018, 16:14
by MaxAstro
~LButton works because LButton is shoot. Try this:

Code: Select all

LButton::
	Send ^m
	Sleep 1000
	Send {LButton down}
	return

Re: Quickscope script

Posted: 25 May 2018, 16:49
by swagfag
i 100% wasnt expecting the snippet to work, but based off of what you had requested it does exactly what it was supposed to:
  • triggered by LButton press? yep
  • presses m to zoom? sure enough
  • presses XButton1 to shoot? yessiree
instead of lamenting how nothing works out for you, refer to my previous post and describe in detail(like really in detail, not 1 sentence: "i want x to shoot and m to zoom", rather, eg, "i want holding LButton to shoot and keep shooting, which is an action bound to XButton1", "i want it to also zoom, zoom is bound to m, to zoom you have to press m and to stay zoomed in you have to keep holding m", etc. etc. etc.)
i havent played your game, and most probably neither have the rest of the people posting here

so explain the mechanics of your game(or action you want performed) or failing that we could go on roleplaying as a pack of monkey flinging turds at the side of a safari van, hoping something would stick before dawn-break, trying to figure out what it is exactly that youre requesting in the first place and then finally maybe come up with a solution

Re: Quickscope script

Posted: 26 May 2018, 17:45
by Gandalf_yayo
swagfag wrote:i 100% wasnt expecting the snippet to work, but based off of what you had requested it does exactly what it was supposed to:
  • triggered by LButton press? yep
  • presses m to zoom? sure enough
  • presses XButton1 to shoot? yessiree
instead of lamenting how nothing works out for you, refer to my previous post and describe in detail(like really in detail, not 1 sentence: "i want x to shoot and m to zoom", rather, eg, "i want holding LButton to shoot and keep shooting, which is an action bound to XButton1", "i want it to also zoom, zoom is bound to m, to zoom you have to press m and to stay zoomed in you have to keep holding m", etc. etc. etc.)
i havent played your game, and most probably neither have the rest of the people posting here

so explain the mechanics of your game(or action you want performed) or failing that we could go on roleplaying as a pack of monkey flinging turds at the side of a safari van, hoping something would stick before dawn-break, trying to figure out what it is exactly that youre requesting in the first place and then finally maybe come up with a solution

""i want holding LButton to shoot and keep shooting, which is an action bound to XButton1", "i want it to also zoom, zoom is bound to m, to zoom you have to press m and to stay zoomed in you have to keep holding m", etc. etc. etc.)"

This is exactly what i mean! i appreciate your help, i'm very noob in scripting, If it makes it easier, instead of the XButton1 it could also be the LButton as shooting, i don't know what more details i could tell other than what you've said.