I modified a counter-strafe code that I found to make bhops work a little better. I deleted the side counter-strafing (A and D), made it work with the mousewheel instead of the spacebar, and some other details.
The one problem that we have now is just normal forward jumping (W). I coded so that:
if GetKeyState("WheelDown","P")
{
Send {w up}
What we need to do now is make it so if we KEEP pressing "w" for some milliseconds, Send {w down}.
Here's the code:
ScriptActive = 1
If ScriptActive = 1
{
$WheelDown::
if GetKeyState("WheelDown","P")
{
Send {WheelDown down}
Send {w up}
sleep, 1
Send {WheelDown up}
ScriptActive = 0
Sleep, 100
}
ScriptActive = 1
Return
}
~*w up::
If ScriptActive = 1
{
if(GetKeyState("s","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=110
Send {s down}
While (!GetKeyState("s","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 10
If !GetKeyState("s","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {s up}
}
return
~*s up::
If ScriptActive = 1
{
if(GetKeyState("w","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=110
Send {w down}
While (!GetKeyState("w","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 10
If !GetKeyState("w","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {w up}
}
return
~F7::
SoundBeep, 400, 400
Suspend Toggle
return
- Home Board index AutoHotkey (v1.1 and older) Scripts and Functions (v1) Gaming Scripts (v1)
- Search
-
- It is currently 18 Apr 2024, 09:44
- All times are UTC-05:00
Smooth jumping with counter-strafe CS:GO
Post gaming related scripts
Return to “Gaming Scripts (v1)”
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)
Who is online
Users browsing this forum: No registered users and 48 guests