How to make your own kill protection bind

Read tips and guides about teeworlds-related subjects (mapping, compiling, ..).
Post Reply
User avatar
Valen_4
Posts: 5
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: https://ddnet.tw/players/Valen-95-
Clan: TElite

How to make your own kill protection bind

Post 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
Last edited by Valen_4 on Sun Mar 04, 2018 8:06 pm, edited 3 times in total.
User avatar
Ravie
MAPS Team
Posts: 380
Joined: Sat Feb 04, 2017 5:04 am
Player profile: https://ddnet.tw/players/Ravie/
Mapper profile: https://ddnet.tw/mappers/Ravie/
Clan: TOP

Re: How to make your own kill protection

Post by Ravie »

Nice trick, but I usually unbind kill every time I see a run is getting serious :D
Image
User avatar
Valen_4
Posts: 5
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: https://ddnet.tw/players/Valen-95-
Clan: TElite

Re: How to make your own kill protection

Post 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
GG Kid
Posts: 266
Joined: Sun Apr 16, 2017 2:33 am
Location: U.S.A.
Player profile: https://ddnet.tw/players/Bolto/
Clan: Kerger

Why some people are awesome

Post 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!
Last edited by GG Kid on Sun Mar 04, 2018 7:18 am, edited 1 time in total.
User avatar
Valen_4
Posts: 5
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: https://ddnet.tw/players/Valen-95-
Clan: TElite

Re: How to make your own kill protection

Post 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 ♥
Welf
Posts: 1838
Joined: Fri Jun 06, 2014 12:20 am
Player profile: http://ddnet.tw/players/Welf/
Mapper profile: http://ddnet.tw/mappers/Welf/

Re: How to make your own kill protection

Post 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.
Chairn
Posts: 400
Joined: Sat Apr 11, 2015 5:05 pm
Player profile: http://ddnet.tw/players/Chairn/
Clan: QuintessenZ

Re: How to make your own kill protection

Post by Chairn »

@Welf: if you want to do so, it's probably better to use 2 keys that are not side by side.
fokkonaut
Posts: 855
Joined: Wed May 13, 2015 5:59 pm
Player profile: https://ddnet.tw/players/fokkonaut

Re: How to make your own kill protection

Post by fokkonaut »

or just risk everything and bind kill to 4, spec to r and pause to e, just like me
User avatar
mokuz
Posts: 755
Joined: Sat Apr 30, 2016 5:34 pm
Location: Finland
Player profile: https://ddnet.tw/players/Mokuz/
Mapper profile: https://ddnet.tw/mappers/Mokuz/
Clan: Legendary

Re: How to make your own kill protection

Post 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!
SpoilerShow
Nothing to see here uwu
mods banned my previous sig :( this is censorship freedom of speech is dead xoxox
tonischmidt
Posts: 2
Joined: Wed Nov 29, 2017 1:57 pm

Re: How to make your own kill protection

Post by tonischmidt »

Hmm.. interesting thing. I will try it next time. Thanks for the information!
Hello! Have somebody tried to play book of ra deluxe free spins?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests