I made an AutoHotkey Script Kill Counter for the game
3 days ago
United States

As the title says, I made an AutoHotkey kill counter, I'll put the code here so anyone can use it if they want, so far from my testing it works very well, I will most likely add more features in the future.

using autohotkey, download it from https://www.autohotkey.com and then install both the version one and version two, then on your desktop for your computer right click your mouse and click "new" then it should say autohotkey script, create it on your desktop and then open it on your desktop, click on version 1.1 when asked, then right click on the ahk file on your desktop and click "Edit script", then click on the notepad option and press "OK", it will bring you to the notepad , paste the code into the notepad and save it by going to File and then Save inside of the notepad. After that double click on the icon on your desktop and it should open the counter, the keybinds are "1" to remove kills from the counter, "2" to add kills to the counter, and "4" to reset kills.

If you want to tweak anything, right click on the icon on your desktop and click "edit script" it should bring you to notepad

If you want to tweak anything, right click on the icon on your desktop and click "edit script" it should bring you to notepad

EDIT: Added a wait time before you can add or lower more kills to the counter to avoid accidental double presses, in order to change how long before you can press the key again change the -2000 to whichever number you want, 2000 equals 2 seconds which is the default time, in this line of code "SetTimer, ResetKeyPress, -2000 "

EDIT: Added the option to remove counted kills by default pressing 1, can be changed the same way as all of the other hotkeys, as well as I removed the option to close the counter by clicking ESC as this can be annoying when pausing the game, instead click the show hidden icons arrow on your windows task bar and right click on the program and click exit.

here is the code:

; Initialize the counter

counter := 0

; Manually set the primary monitor's coordinates (adjust as needed)

mainMonitorX := 0

mainMonitorY := 0

; Set the font size before adding the GUI elements

Gui, Font, s18, Arial ; Set font size to 18 and specify font type (Arial)

; Create the GUI window

Gui, +AlwaysOnTop +ToolWindow -Caption +E0x20 ; Always on top, no taskbar icon, no caption, click-through window

Gui, Color, 0xFFFFFF ; Set the background color to white (you can change this if you like)

Gui, Add, Text, vCounterText w150 h50 Center cBlack, Counter: 0 ; Add text to display counter

; Set transparency and make the window click-through

Gui, Show, x%mainMonitorX% y%mainMonitorY% w200 h50, Counter ; Position on main monitor

WinSet, ExStyle, 0x20, Counter ; Make the window click-through (transparent to mouse)

WinSet, Transparent, 255, Counter ; Fully visible (you can adjust the transparency here)

; Initialize a variable for the delay

keyPressed := false

return

; Increment the counter with the 2 key

2::

if (!keyPressed) {

counter++

GuiControl,, CounterText, Counter: %counter% ; Update counter text in the GUI

keyPressed := true ; Set the flag to prevent further presses

SetTimer, ResetKeyPress, -2000 ; Wait 2 seconds before allowing another press

}

return

; Decrease the counter with the 1 key

1::

if (!keyPressed) {

counter--

GuiControl,, CounterText, Counter: %counter% ; Update counter text in the GUI

keyPressed := true ; Set the flag to prevent further presses

SetTimer, ResetKeyPress, -2000 ; Wait 2 seconds before allowing another press

}

return

; Reset the counter with the 4 key

4::

if (!keyPressed) {

counter := 0

GuiControl,, CounterText, Counter: 0 ; Reset the counter text in the GUI

keyPressed := true ; Set the flag to prevent further presses

SetTimer, ResetKeyPress, -2000 ; Wait 2 seconds before allowing another press

}

return

; Reset the key press flag after 2 seconds

ResetKeyPress:

keyPressed := false

return

:END OF CODE

TO ADD TO THE COUNTER PRESS "2" ON YOUR KEYBOARD, TO REMOVE FROM THE COUNTER PRESS "1", TO RESET COUNTER PRESS "4"

This was created with the help of AI since I barely know anything about coding, either way, I added some features like your mouse cant interact with the counter so it doesn't mess up the game.

The settings are tweakable as well, where it says "Increment the counter with the 2 key" right under that it says 2:: by changing that to any number key as well as the 4 hotkey for the reset counter, you can change it to whichever key you think works the best.

I thought I'd post this to help some people out, if you want to change the text size and window size, go to where it says "Gui, Font, s18, Arial" and change the s18 to a bigger number for bigger text size or a smaller number for smaller, and for the window size go to where it says "Gui, Show, x%mainMonitorX% y%mainMonitorY% w200 h50, Counter" and change w200 for X axis window size and h50 for Y axis. aswell as if you need to change where the text is on the window, you can change it by going to this line of code "Gui, Add, Text, vCounterText w150 h50 Center cBlack," and changing the w150 and h50 for width and height just like the window size one, right now I have the text location to be in the middle with the current window size.

For changing where the window is displayed (by default I think it is in the top left corner) you might just have to figure out how to tweak that yourself because to be honest I have no clue how to. to change the color of the background for your counter, go to the line of code that says "Gui, Color, 0xFFFFFF" and change the hex code to whichever color you want, haven't tested this part so not sure how a black background would look with the black counter text.

Hopefully posting the code doesn't cause any issues here

Editado por o autor 18 hours ago
WrongTypeOfHero curtiram isso
United States

I am happy this got pinned, thank you! :)

WrongTypeOfHero curtiram isso
United States

What are you running this in? do you have to put it straight into the game, or is it on cmd prompt or something. Im kinda dumb and have negative knowledge when it comes to this kind of stuff.

EbuggeyGaming curtiram isso
United States

Its using autohotkey, download it from https://www.autohotkey.com and then install both the version one and version two, then on your desktop for your computer right click your mouse and click "new" then it should say autohotkey script, create it on your desktop and then open it on your desktop, click on version 1.1 when asked, then click on the notepad option and click on "OK", it will bring you to the notepad, paste the code into the notepad and save it by going to File and then Save inside of the notepad. After that double click on the icon on your desktop and it should open the counter, the keybinds are "1" to remove kills from the counter, "2" to add kills to the counter, and "4" to reset kills.

If you want to tweak anything, right click on the icon on your desktop and click "edit script" it should bring you to notepad

Editado por o autor 18 hours ago
Germany

It doesnt let me save the code after pressing edit, i named it and did everything like you said but still it wont let me save it

United States

Is there any error code? Did you install both versions of autohotkey?

United States

I have the same problem as zazalord, it wont let me save it. Im not sure why and ill try to troubleshoot it. I installed both versions as well

EbuggeyGaming curtiram isso
United States

Reprisal, I tested it on a different computer and I forgot a step, once you click edit, it will ask which version you want to use, press on v1.1 and then continue, then on the edit menu it will have a option saying "Notepad" click on the notepad and it will bring you to the notepad, paste the code into the notepad and in the top left corner of notepad click on file then save or Ctrl+S. now run the Ahk file on your desktop

Canada

thanks for the tool. just used it in my first posted run. works great!

Estatísticas do jogo
Seguidores
143
Corridas
376
Jogadores
188
Últimas notícias
Clarification on Default settings + Caseoh's Run

So this is something that I knew would eventually come, but I wanted to say that to the staff, Default settings is as close to the middle as you can get it. If someone has the slider off by a single pixel, I won't deny your run. We deny it if it is crazy off (I've seen runs where people max it out l

3 days ago