Team Fortress Classic | Configs | Basics of Binding

Team Fortress Classic Configs: Basics of Binding

Standard Binds

The next step above a variable command is a simple, one string bind. This is also the most common function found in a config file. To learn the works of a bind, once again open up config.cfg with notepad (or autoexec.cfg if you downloaded a PF Config). Again, note that config.cfg stores all the binds that you have set through the Half-Life Menu (Multiplayer -> Controls). Look at the binds; the basic syntax for a bind is:
bind x "command"
When you open up the config.cfg you will see a list of commands. Most are self-explanatory. If you are confused on which commands do what, you can reference the commands here.

Say you wish to change your default movement keys. DieHard uses keys y, g, h, and i. So if you wanted to change your movement keys you would open up a cfg file and change the movement lines to look like this:

bind y "+forward"
bind g "+moveleft"
bind h "+back"
bind j "+moveright"
Make sure you don't have the same key bound twice in one cfg. If you do it will take the last bound command.

The first keys to look at are the movement keys, you may want a different set up. If you like the default settings, you can use them. I prefer to use the middle of the keyboard because then I can use the whole keyboard with one hand and my other hand on the mouse.

The next thing you should look at to change is the grenade keys. I believe these keys should be the easiest keys to use. Some players like to bind them to the mouse buttons; others bind them to the keyboard. Try them both and see what is easiest for you. I have them as the keys 'f' and 'k'. They are the keys right next to my movement keys so they are the easiest to use. To bind the grenades you can try this:
bind mouse3 "+gren1" //binds primary grenade to mouse button 3
bind k "+gren2"

In the above bind I use the '//' command. The '//' allows me to add comments to my cfgs. Here is another example:

//DieHard's Configs
//diehard@planetfortress.com
//Thank you for downloading this file.

bind y "+forward"
Anything after the '//' will not be read by the game. You can comment out a bind command with the '//'.

One more standard bind. Say you want to be able to take a screenshot in game, in Half-life and TFC you can bind a key to "snapshot" and it will take a screenshot in .bmp format for you. So, in the console, or in your .cfg files, type bind x snapshot (where x is the key you want to use to take a screenshot).

Say Binds

Say binds have a slightly different syntax. To bind a key to send a message to your teammates, simply input the following either into the console or into one of your .cfg files:
bind x "say_team Your message here"
You should recognize x representing the key you want to use to send the message. 'Your message here' can be changed to whatever you like, as well. After that you can simply hit x and it will send the message to your teammates.

Sending a message to everyone on the server is pretty much the same, you just need to use the following:
bind x "say Your message here"
Now, when you hit x it will send the message to everyone. I don't recommend using the second command, as many people find it annoying when people are constantly spamming messages to everyone on the server. More often than not, if a server admin is around, they will kick you if you're spamming a lot of annoying stuff to the other people on the server. Just think a little ahead of time, and act responsibly ;-)

Voice Comm

Everyone asks how to bind Voice Comm to the key (check out our Voice Comm information page for more details). Here's how:
bind x "+voicerecord"
Extra Note: You can bind more than one function to a key. For our easy example, say you wanted to bind "j" to walk forward and attack when you pressed it. While this is not a useful, the logic becomes very useful later (same logic will apply with aliases):
bind j "+forward;+attack"
A semicolon signifies the next command to act in a bind.




IGN.com | GameSpy | Comrade | Arena | FilePlanet | GameSpy Technology
TeamXbox | Planets | Vaults | VE3D | CheatsCodesGuides | GameStats | GamerMetrics
AskMen.com | Rotten Tomatoes | Direct2Drive | Green Pixels
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2009, IGN Entertainment, Inc.   About Us | Support | Advertise | Privacy Policy | User Agreement Subscribe to RSS Feeds RSS Feeds
IGN's enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.