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)
Quickscope script
-
- Posts: 9
- Joined: 19 May 2018, 20:41
-
- Posts: 1472
- Joined: 05 May 2018, 12:23
Re: Quickscope script
try
LButton::
sleep, 3000
send, ^m
LButton::
sleep, 3000
send, ^m
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Quickscope script
Doesn't work. I've tried such scripts, i don't know what else i can tryAHKStudent wrote:try
LButton::
sleep, 3000
send, ^m
Re: Quickscope script
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:
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
}
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Quickscope script
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.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 }
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
~LButton works because LButton is shoot. Try this:
Code: Select all
LButton::
Send ^m
Sleep 1000
Send {LButton down}
return
Re: Quickscope script
i 100% wasnt expecting the snippet to work, but based off of what you had requested it does exactly what it was supposed to:
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
- triggered by LButton press? yep
- presses m to zoom? sure enough
- presses XButton1 to shoot? yessiree
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
-
- Posts: 9
- Joined: 19 May 2018, 20:41
Re: Quickscope script
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: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.)
- triggered by LButton press? yep
- presses m to zoom? sure enough
- presses XButton1 to shoot? yessiree
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.
Who is online
Users browsing this forum: No registered users and 50 guests