N8 := getKeyState("Numpad8", "P") || getKeyState("NumpadUp", "P") N7 := getKeyState("Numpad7", "P") || getKeyState("NumpadHome", "P") N6 := getKeyState("Numpad6", "P") || getKeyState("NumpadRight", "P") N4 := getKeyState("Numpad4", "P") || getKeyState("NumpadLeft", "P") N3 := getKeyState("Numpad3", "P") || getKeyState("NumpadPgDn", "P") N2 := getKeyState("Numpad2", "P") || getKeyState("NumpadDown", "P") N1 := getKeyState("Numpad1", "P") || getKeyState("NumpadEnd", "P") This version also sums up the directions from the keys so that if you were to press two opposing keys, it will cancel out the direction, but if you release one of the two opposing keys, it will snap the direction to the remaining one. Theoretically, the responsiveness will be a lot better since the polling interval to detect key releases was 100ms. I'm approaching this differently, this time without timers. If (!getKeyState("NumpadEnd") & !getKeyState("NumpadDown") & !getKeyState("NumpadPgDn") & !getKeyState("NumpadLeft") & !getKeyState("NumpadClear") & !getKeyState("NumpadRight") & !getKeyState("NumpadHome") & !getKeyState("NumpadUp") & !getKeyState("NumpadPgUp")) If (!getKeyState("Numpad1") & !getKeyState("Numpad2") & !getKeyState("Numpad3") & !getKeyState("Numpad4") & !getKeyState("Numpad5") & !getKeyState("Numpad6") & !getKeyState("Numpad7") & !getKeyState("Numpad8") & !getKeyState("Numpad9")) If (!getKeyState("Up") & !getKeyState("Down") & !getKeyState("left") & !getKeyState("right")) #NoEnv Recommended for performance and compatibility with future AutoHotkey releases. Heres my code which does make a button press (detected on a joystick input diag software), but the button press isnt detectable by the game (assassin creed 2)Īlso, heres my entire script, which the button presses arent detectable by the game (Numberkeys work, just letter keys dont) If (!getKeyState("NumpadDot") & !getKeyState("NumpadDel")) Heres your code that works (the press is detectable by assassin creed 2) After testing it out and them copying your templates / making all the keys I needed, It seems like any key that is mapped to a letter will pass it's action properly, but the game doesnt detect the button press, heres a example
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |