 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Dryvnt Guest
|
Posted: Mon Apr 21, 2008 1:09 pm Post subject: Help with Bhop script :/ |
|
|
I play half life 1 alot and find it very funny to bunnyhop but heres my problem
| Code: | *Lalt::
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
return
} |
This is my current script... It works as a charm... But when i duck while jumping, my screen kindda "Spass" while i hold Ctrl... Because it want to duck but the spamming of space makes it go up again... But i found, if i put
| Code: | *Lalt::
Send, {Ctrldown}
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
Send, {Ctrldown}
return
} |
It does not spam... But i dont wanna be ducked while bunnyhopping... Sooooo here comes my question
| Code: | *Lalt::
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
GetKeyState, state, Ctrl, P
if State = (Help needed here)
Send {Ctrldown}
; Otherwise:
Send, {Ctrlup}
}
return |
So all i need to know is... Whats the opposite of the U? :/ |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
Posted: Mon Apr 21, 2008 1:27 pm Post subject: |
|
|
| That would be D: |
|
| Back to top |
|
 |
orbik
Joined: 09 Apr 2008 Posts: 35 Location: Espoo, Finland
|
Posted: Mon Apr 21, 2008 1:37 pm Post subject: |
|
|
As much as I think you need to be told to rtfm, why don't you just do it like this:
| Code: | *LAlt::
Loop
{
If (!GetKeyState("LAlt"))
break
If (!GetKeyState("LControl"))
Send, {Space}
Sleep, 10
}
return |
|
|
| Back to top |
|
 |
Dryvnt Guest
|
Posted: Mon Apr 21, 2008 2:08 pm Post subject: |
|
|
| orbik wrote: | As much as I think you need to be told to rtfm, why don't you just do it like this:
| Code: | *LAlt::
Loop
{
If (!GetKeyState("LAlt"))
break
If (!GetKeyState("LControl"))
Send, {Space}
Sleep, 10
}
return |
|
Nop doesent work
It says:
"Error at line 4.
Line Text: If(!GetKeyState("LAlt"))
Error: When used this way, the symbol must be "!=" not "!".
The script was not reloaded; the old version will remain in effect"
And i tryed to change the ! to != but then it says another error.. :/ |
|
| Back to top |
|
 |
orbik
Joined: 09 Apr 2008 Posts: 35 Location: Espoo, Finland
|
Posted: Mon Apr 21, 2008 3:05 pm Post subject: |
|
|
Do you have the latest version installed?
Anyway, I made a mistake: You must use either or | Code: | | If (!GetKeyState("LAlt", "p")) |
Apparently the logical key state doesn't get updated without the ~ |
|
| Back to top |
|
 |
Dryvnt Guest
|
Posted: Mon Apr 21, 2008 3:21 pm Post subject: |
|
|
| Nop doesent work... My sensivity gets alot lower when i bhop and when i duck my senstivity goes to 0... Nothing to do with game, its all in script :/ |
|
| Back to top |
|
 |
orbik
Joined: 09 Apr 2008 Posts: 35 Location: Espoo, Finland
|
Posted: Mon Apr 21, 2008 4:20 pm Post subject: |
|
|
I did dome testing in Q3A and at least the following works perfectly. I never got the hang of SetKeyDelay so I just send up and down events explicitly. Also, the game seems to mess with logical key states so getting the "physical" state is safer. | Code: | SendMode, Input
*LAlt::
Loop
{
If (!GetKeyState("LAlt", "p"))
break
If (!GetKeyState("LControl"))
{
Send, {Space down}
Sleep, 10
Send, {Space up}
}
Else
Sleep, 10
}
return |
EDIT:
I guess this would work just as well:
| Code: | ...
If (!GetKeyState("LControl"))
Send, {Space down}
Sleep, 10
}
return
*LAlt up::Send, {Space up}
|
|
|
| Back to top |
|
 |
Dryvnt Guest
|
Posted: Mon Apr 21, 2008 4:55 pm Post subject: |
|
|
DANG! You are so close to a breakthrough :/... But when i jump, i sometimes land and stand still for like .5 sec making my bunnyhop fail ... |
|
| Back to top |
|
 |
Dryvnt Guest
|
Posted: Mon Apr 21, 2008 5:07 pm Post subject: |
|
|
Hey! wait a sec! | Code: | *LAlt::
Loop
{
If (!GetKeyState("LAlt" "p"))
break
If (!GetKeyState("LControl"))
Send, {Space}
Sleep, 10
}
return | This code works perfect
The bugged code was | Code: | *~LAlt::
Loop
{
If (!GetKeyState("LAlt"))
break
If (!GetKeyState("LControl"))
Send, {Space}
Sleep, 10
}
return |
Thanks for your help dewd! |
|
| Back to top |
|
 |
Dryvnt Guest
|
Posted: Wed Apr 30, 2008 6:13 pm Post subject: :(((( |
|
|
It somehow doesent work anymore, when i press another button it stops working...
Help please  |
|
| Back to top |
|
 |
bmaya Guest
|
Posted: Wed Aug 19, 2009 4:10 pm Post subject: having the same problem |
|
|
| Dryvnt wrote: | DANG! You are so close to a breakthrough :/... But when i jump, i sometimes land and stand still for like .5 sec making my bunnyhop fail ... |
this delay of half a second after the first jump is what ruins it all. I just can't get around what I am doing wrong. Is this caused by my PC or by Counterstrike? |
|
| Back to top |
|
 |
bmaya Guest
|
Posted: Wed Aug 19, 2009 4:22 pm Post subject: |
|
|
| what I've tried out now is that I increased the 10ms to 37ms and this has now solved the problem of the lag after the first jump. but doing the bunnyhops with 37ms has now become impossible because thats just too slow. What I'm thinking is that one maybe just can't send keystrokes to CS:S in such a high frequency. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|