Team Fortress 2

Key Reset Script

This is a Script for Team Fortress 2 submitted by clovervidia.

Attention Gamer! Join GameBanana, one of the oldest mod sites, and maximize your browsing experience.

  • Subscribe: Get notified when clovervidia submits again.
  • Say Thanks: Show your appreciation by sending clovervidia points.
  • Post: Give clovervidia your thoughts on this Script.
  • Vote: Help clovervidia win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Sound fun?

Sign up

Already a Bananite? Login

Key Reset Script

If you use different key binds across classes, you will need a script like this to unbind shared keys.

24 lines | 456 bytes | Raw Code
Font size:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
exec undo360controller
unbind MOUSE1
unbind MOUSE2
unbind MOUSE3
unbind MOUSE4
unbind MOUSE5
unbind [
unbind ]
unbind \
unbind "ENTER"
bind "MWHEELUP" "invprev"
bind "MWHEELDOWN" "invnext"
bind MOUSE1 +attack
//bind MOUSE1 spec_next
bind MOUSE2 +attack2
//bind MOUSE2 spec_prev
echo "Mouse buttons reset!"
hud_fastswitch 1
bind "w" "+forward"
bind "a" "+moveleft"
bind "s" "+back"
bind "d" "+moveright"
cl_drawhud 1
r_drawviewmodel 1
Save this script as reset.cfg in the folder with the rest of your class scripts.

To use it, type exec reset.cfg at the top of every class script, e.g. scout.cfg or engineer.cfg

Basically, this script unbinds keys that are common between classes. This prevents you from rocket jumping as a scout and sentry jumping as a spy.

  • You must be a member

Comments

  • Steamed avatar
    Steamed Offline
    Member Joined 1 year ago
    Report post
    1 year ago:

    Help! for whatever reason none of this is working, my engineer.cfg script is leaking into the autoexec.cfg script

    engineer.cfg

    exec reset.cfg
    bind mouse5 "buildsentry"
    alias buildsentry "build 2 0; wait 50;    +attack; wait 50; -attack; wait; slot1"
    bind mouse4 "destroy 2 0"
    

    autoexec.cfg

    exec reset.cfg
    alias "swap" "swap1"
    alias "swap1" "slot1; alias swap swap2"
    alias "swap2" "slot2; alias swap swap1"
    bind "mouse4" "swap"
    bind "mouse5" "slot3; alias swap swap1"
    

    reset.cfg

    unbind MOUSE4
    unbind MOUSE5
    
    Bananite
  • clovervidia avatar
    Member Joined 5 years ago
    1,415 points Ranked 2927th
    2 medals 0 legendary, 0 rare
    • Gamefiler of the Month, April 2012 Medal icon
    • Scripter of the Month, August 2013 Medal icon
    Report post
    3 years ago:

    Posted by Pacifist42 just woundering, is there a command that resets all keys to default? that would make the script much simpler

    Indeed there is.

    exec config_default
    

    That will reset every key to their initial binds.

    The purpose of this script is to reset common keys between classes, for example, I change around the mouse keys depending on the class, and this script resets them to what they were originally before switching to the class.

    But I digress. If you just want to reset all your keys to the TF2 defaults,

    exec config_default
    

    is the way to go.

    λ³ avatar
    Mantra
    λ³
  • Pacifist42 avatar
    Pacifist42 Offline
    Member Joined 3 years ago
    291 points Ranked 11169th
    Report post
    3 years ago:
    just woundering, is there a command that resets all keys to default? that would make the script much simpler
    Bananite

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share
About this module
This module lists all those involved in the creation of this Script.

Credits

Key Authors
clovervidia
Author

Submitter

clovervidia avatar
Member Joined 5 years ago
1,415 points Ranked 2927th
2 medals 0 legendary, 0 rare
  • Gamefiler of the Month, April 2012 Medal icon
  • Scripter of the Month, August 2013 Medal icon

clovervidia
Creator
About this module
This module lets you send a private message to the submitter (clovervidia).
About this module
This module displays what game this Script is for.

Game

About this module
This module displays this Script's category.

Category

Stats

Posts
3
Views
13,267
Date Added
4 years ago
Dec 31 2011 @ 12:52am UTC
Date Modified
4 years ago
Dec 31 2011 @ 2:18am UTC
About this module
This module shows the average user rating of this Script.

Rating

10
Votes
1
About this module
This module shows how the ratings are dispersed among the criteria.

Ratings Breakdown

CriterionAvg.VotesRange
Overall 10 1 -
About this module
This module tells you what you can and cannot do with this Script.

License