This is real quick for those of you that might want to change your in game name so that it's not the same as your steam name. You can put this line in a *.cfg file or you can type it into console:
Here's a video showing it in action:
Another crappy TF2 blog.
This is real quick for those of you that might want to change your in game name so that it's not the same as your steam name. You can put this line in a *.cfg file or you can type it into console:
Here's a video showing it in action:
What I'm going to show here isn't very complicated. I like using my "q" key to switch to my melee weapon and then to press it again to get back to my previous weapon. I'm going to show you how I did it initially, which worked, but not how I really wanted it to, and my revised version. The revised version is also the "proper" way to handle things for when your scripts start getting more complex. To do this, we need to understand aliases.
Aliases all have the same structure:
If there are multiple commands, they are separated by semi-colons(;). Easy enough to understand, I hope.
Version 1 (not recommended, but it gets the job done):
This script does what I want, but not very well. You'll notice that "MELEE" uses the "lastinv" command. It does switch back to the weapon I was using, but it ignores any setting I have in place for either "PRIMARY" or "SECONDARY" (the r_drawviewmodel command, in this case). Plus, if I change my mind about what button I use for melee, I have to change the binding in other places too.
Version 2 (the right way):
This is a much better version that addresses all of the problems that the first script has. I have two different MELEE aliases that differ only in which weapon it will switch back to. Which one is used is determined by PRIMARY and SECONDARY. It happens in the last command of each alias.
I hope that helps. Also, feel free to steal this script if you want.
This is going to be really quick and really easy. I'm only covering two things in this post: how to add a comment to your script, and how to do a simple bind.
First, commenting your scripts. Comments are used just so it's easy to tell what's been scripted without having to mentally parse the commands. Generally, I just describe what's supposed to happen. Comments are indicated by two slashes at the beginning of the line and anything that follows them is ignored. For example:
Hopefully, that's easy enough to understand.
Binding is also very straightforward. You need to tell TF2 that you want to bind a certain key to a specific command. For example, if I want to change my primary weapon from the default of "1" to "9":
There, it's done. What's important to note is that while "slot9" is the default bind for "9", now that you've overridden it "slot9" no longer has a key assigned to it. Also, unless you reset your binds in each class like I talked about in my previous post, this binding will stay for every class, every time you run the game after the script has been executed.
I hope this helps someone understand binds a bit better. Next time, I'll discuss Aliases and more complicated scripts.
When starting to customize your scripts for your different classes, it's a good idea to back up the default binds for TF2. What I did was copy the default binds into a file called defaults.cfg, and exec it at the beginning of each classes configuration file.
Your TF2 config files can be found in your steam folder at :
The first line of each of my class files is:
This resets all of my binds in case a different class has binds that affect the new binds. This is especially important for your Spy and Engineer config files. For your convenience, here are the contents of my default.cfg, you can copy and paste into your own: