How to make your own kill protection

Guides about mapping and everything Teeworlds related.

Post Reply
User avatar
Valen_4
User
Posts: 4
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: Valen_
Clan: TElite

How to make your own kill protection

Post by Valen_4 » Sun Mar 04, 2018 1:07 am

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 20 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
User
Posts: 373
Joined: Sat Feb 04, 2017 5:04 am
Player profile: Ravie
Mapper profile: Ravie
Clan: TOP

Re: How to make your own kill protection

Post by Ravie » Sun Mar 04, 2018 2:59 am

Nice trick, but I usually unbind kill every time I see a run is getting serious :D
Image

User avatar
Valen_4
User
Posts: 4
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: Valen_
Clan: TElite

Re: How to make your own kill protection

Post by Valen_4 » Sun Mar 04, 2018 3:28 am

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
User
Posts: 254
Joined: Sun Apr 16, 2017 2:33 am
Location: U.S.A.
Player profile: Bolto
Clan: Kerger

Why some people are awesome

Post by GG Kid » 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 :) 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
User
Posts: 4
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: Valen_
Clan: TElite

Re: How to make your own kill protection

Post by Valen_4 » Sun Mar 04, 2018 6:34 am

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
User
Posts: 1839
Joined: Fri Jun 06, 2014 12:20 am
Player profile: Welf
Mapper profile: Welf

Re: How to make your own kill protection

Post by Welf » Thu Mar 08, 2018 10:12 pm

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
User
Posts: 386
Joined: Sat Apr 11, 2015 5:05 pm
Player profile: Chairn
Clan: QuintessenZ

Re: How to make your own kill protection

Post by Chairn » Thu Mar 08, 2018 10:32 pm

@Welf: if you want to do so, it's probably better to use 2 keys that are not side by side.

fokkonaut
User
Posts: 853
Joined: Wed May 13, 2015 5:59 pm
Player profile: fokkonaut

Re: How to make your own kill protection

Post by fokkonaut » Thu Mar 08, 2018 11:54 pm

or just risk everything and bind kill to 4, spec to r and pause to e, just like me

User avatar
mokuz
Contributor Team: Skin Database Crew
Posts: 748
Joined: Sat Apr 30, 2016 5:34 pm
Location: Finland
Player profile: Mokuz
Mapper profile: Mokuz
Clan: Legendary

Re: How to make your own kill protection

Post by mokuz » Fri Mar 09, 2018 9:08 am

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!
Image

tonischmidt
User
Posts: 2
Joined: Wed Nov 29, 2017 1:57 pm

Re: How to make your own kill protection

Post by tonischmidt » Mon May 07, 2018 8:17 pm

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: Bing [Bot] and 0 guests