How to make your own kill protection bind
Posted: Sun Mar 04, 2018 1:07 am
How to make your own kill protection bind
written by Valen_4
Are you tired of ruining your runs by accidentally pressing the kill button before the kill protection activates?
For the lazy ones:
If you want to understand what is scripting, visit this guide
Let's start:
1| Make two .cfg files in "%appdata%\Teeworlds" I'll name them "killprotection" and "kill".
2| Open the first file and write:
Replace "x" with whatever key you want.
Replace "kill.cfg" with the name of the second file.
Line 1: This line makes us press the key twice to actually kill us.
Line 2: I'll explain this later. **
3| Open the second file and write:
Replace "x" with whatever key you want.
Replace "killprotection.cfg" with the name of the first file.
Line 1: This is the warning message that shows up after you press the kill key for the first time.
Line 2: If you press the kill button again, you kill yourself and reset the script.
Line 3: This is the cancel mechanism. The purpose of this is to cancel the first press of the kill key and resets the scripts.
** If you cancel or if you kill yourself, You will be able to change weapons again with the mouse wheel thanks to this line
3| Now that you finished with the files, open the game and type in the console: exec killprotection.cfg (Or whatever the first file is called)
Now you'll have to press the key twice to be able to kill yourself
Enjoy your safety life
Thanks to Koshac for telling me this idea and GG Kid for the guide
Sorry if I made some mistakes, English is not my first language
P.S: Sorry for the shitty tutorial, i didn't know where to post the script so I made this
written by Valen_4
Are you tired of ruining your runs by accidentally pressing the kill button before the kill protection activates?
Since DDnet hasn't any command that can enable us to decide when the kill protection activates, the best solution is to create our own.
For the lazy ones:
If you want to understand what is scripting, visit this guide
Let's start:
1| Make two .cfg files in "%appdata%\Teeworlds" I'll name them "killprotection" and "kill".
2| Open the first file and write:
killprotection.cfgShow
Code: Select all
bind "x" "exec kill.cfg"
bind "mousewheelup" "+nextweapon"
Replace "kill.cfg" with the name of the second file.
Line 1: This line makes us press the key twice to actually kill us.
Line 2: I'll explain this later. **
kill.cfgShow
Code: Select all
echo "<Kill Protection> Press again to kill, or Mouse Wheel Up to cancel"
bind "x" "kill; exec killprotection.cfg"
bind "mousewheelup" "exec killprotection.cfg"
Replace "killprotection.cfg" with the name of the first file.
Line 1: This is the warning message that shows up after you press the kill key for the first time.
Line 2: If you press the kill button again, you kill yourself and reset the script.
Line 3: This is the cancel mechanism. The purpose of this is to cancel the first press of the kill key and resets the scripts.
** If you cancel or if you kill yourself, You will be able to change weapons again with the mouse wheel thanks to this line
Now you'll have to press the key twice to be able to kill yourself
Enjoy your safety life
Thanks to Koshac for telling me this idea and GG Kid for the guide
Sorry if I made some mistakes, English is not my first language
P.S: Sorry for the shitty tutorial, i didn't know where to post the script so I made this