HuBa
Joined: 24 Feb 2007 Posts: 175 Location: Budapest, Hungary
|
Posted: Tue Dec 18, 2007 1:06 am Post subject: AutoAccelerator for racing games |
|
|
By playing car simulators I noticed that I always press the Up arrow to achieve the highest speed. There were only a few times that I had to release the accelerator button (Up arrow) during a game.
And there is another factor that people's mind tend to believe that by pressing the Up button harder, the "faster" the car goes.
So I decided to make an end of this "always accelerating" thing.
Let me introduce you the AutoAccelerator for racing games!
It can be used in any type of simulator or arcade games: car, motor, ship, spaceship, winter-sports, etc.
| Code: | ; AutoAccelerator.ahk - Automatic accelerator for arcade and simulator racing games
;
; With this script you are able to go forward without touching the Up arrow button.
; Press the CapsLock to toggle auto-acceleration.
; It simulates pressing Up arrow.
;
; Pressing the Down or Up arrow will stop acceleration.
; You have to press CapsLock again to reenable acceleration.
;
; You have to replace the "GroupAdd RacingGame" window titles with your own games to enable this effect.
;
; Tested with AutoHotkey 1.0.47.04
;
; Created by HuBa
; Contact: http://www.autohotkey.com/forum/profile.php?mode=viewprofile&u=4693
;
; Discussion forum of this script: http://www.autohotkey.com/forum/viewtopic.php?t=26736
Menu Tray, Icon, %A_WinDir%\system32\joy.cpl ; Joystick tray icon
GroupAdd RacingGame, MotorSport ; Replace this window title!
GroupAdd RacingGame, Rally
GroupAdd RacingGame, Ski
#IfWinActive ahk_group RacingGame
~CapsLock::
if GetKeyState("CapsLock", "T")
Send {Up Down} ; Start accelerating
else
if GetKeyState("Up")
Send {Up Up} ; Terminate acceleration
Return
~Up Up:: ; End of acceleration
if GetKeyState("CapsLock", "T")
SetCapsLockState Off
Return
~Down:: ; Decelerate
if !GetKeyState("CapsLock", "T")
Return
SetCapsLockState Off
Send {Up Up} ; Terminate acceleration
Return
#IfWinActive |
|
|