Skip to content

Instantly share code, notes, and snippets.

@erm3nda
Last active January 7, 2023 08:55
Show Gist options
  • Save erm3nda/1a211e0844653829ee6dc4b37edd14b0 to your computer and use it in GitHub Desktop.
Save erm3nda/1a211e0844653829ee6dc4b37edd14b0 to your computer and use it in GitHub Desktop.
WW3 slide helper to continue sprinting after sliding.
; This modifies the behavior after slide, helps to continue sprinting after sliding.
; You can still press crouch manually while sliding to keep crouched after slide.
; You need to edit the key of slide (mine is LAlt) and maybe Space to jump ?.
; This is AutoHotkey v2 syntax
; All the close stuff is made to let Steam detect when the "game" has exit, which is the autohotkey process handle now.
~LAlt::{
If (GetKeyState("LAlt", "P") && GetKeyState("CapsLock", "P") && WinActive("ahk_exe WW3-Win64-Shipping.exe")){
Sleep 200
Send "{Space down}"
Sleep 80
Send "{Space up}"
Sleep 200
}
}
; Lanzamos el launcher y esperamos
Run "D:\SteamLibrary\steamapps\common\World War 3\WW3_launcher.exe"
while not WinExist("ahk_class sglauncherww3Steam_13.2002999.TMainForm") && not WinExist("ahk_exe WW3-Win64-Shipping.exe")
Sleep 100
; Loop de 100ms para cerrar el script al cerrar tanto el launcher como el juego
SetTimer(CloseAtExitGame, 100)
CloseAtExitGame()
{
if not WinExist("ahk_class sglauncherww3Steam_13.2002999.TMainForm") && not WinExist("ahk_exe WW3-Win64-Shipping.exe")
ExitApp
}
@erm3nda
Copy link
Author

erm3nda commented Jan 7, 2023

Added game check, so the script ExitApp when no Launcher nor Game windows are found. This way Steam gets the correct Exit 0 return when script closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment