Page 1 of 1

How to make your own kill protection bind

Posted: Sun Mar 04, 2018 1:07 am
by Valen_4
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?
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:
killprotection.zip
Instructions included
(824 Bytes) Downloaded 206 times

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 "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:
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 "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

Image
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 :D
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

Re: How to make your own kill protection

Posted: Sun Mar 04, 2018 2:59 am
by Ravie
Nice trick, but I usually unbind kill every time I see a run is getting serious :D

Re: How to make your own kill protection

Posted: Sun Mar 04, 2018 3:28 am
by Valen_4
Ravie wrote: Sun Mar 04, 2018 2:59 am Nice trick, but I usually unbind kill every time I see a run is getting serious :D
Thanks :D
I thinks it's more comfortable to use the script, I have been using it today and It's very useful.
Even if I unbind the kill key, I would forget sometimes

Why some people are awesome

Posted: Sun Mar 04, 2018 6:12 am
by GG Kid
Awesome man! great "Script Bind", added this to Take Binding to the next level, with Scripting! under the name Manual Kill "Protection" {by Valen_4} thanks man :) if any one else has any thing like this please share!

Re: How to make your own kill protection

Posted: Sun Mar 04, 2018 6:34 am
by Valen_4
GG Kid wrote: Sun Mar 04, 2018 6:12 am Awesome man! great "Script Bind", added this to Take Binding to the next level, with Scripting! under the name Manual Kill "Protection" {by Valen_4} thanks man :)
Thanks, this means a lot to me. The idea came out because I have dumb friends who usually kill themselves before the kill protection activates.
Thanks to your guide you saved the time of my friends and mine :lol: :lol: Thanks for the support ♥

Re: How to make your own kill protection

Posted: Thu Mar 08, 2018 10:12 pm
by Welf
Another suggestion:
bind g "bind h kill"
bind h "kill;unbind h"

Well i never tested this, the idea is, that you need to press 2 buttons to kill instead of one, so you don't accidentally hit the kill button.

Re: How to make your own kill protection

Posted: Thu Mar 08, 2018 10:32 pm
by Chairn
@Welf: if you want to do so, it's probably better to use 2 keys that are not side by side.

Re: How to make your own kill protection

Posted: Thu Mar 08, 2018 11:54 pm
by fokkonaut
or just risk everything and bind kill to 4, spec to r and pause to e, just like me

Re: How to make your own kill protection

Posted: Fri Mar 09, 2018 9:08 am
by mokuz
I suggest this:
bind X "cl_dummy 0; kill; +fire; cl_dummy 1; kill; +fire"
This way if you accidentally kill your self, you also kill your dummy!

Re: How to make your own kill protection

Posted: Mon May 07, 2018 8:17 pm
by tonischmidt
Hmm.. interesting thing. I will try it next time. Thanks for the information!