Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Everytime I see somebody type a script for TF2, even if it is a script specifically for one class, I see people put it in the autoexec.cfg. It seems as though the best place to put a rocket jump script would be in the soldier config, and the best place to put a sap script would be the spy.cfg.

Is there a reason people use the autoexec.cfg rather than the class config files?

share|improve this question
1  
Wow, thank you for introducing me to TF2 scripting. I had no idea this was even available. –  JavadocMD Jul 16 '10 at 18:54

2 Answers 2

up vote 5 down vote accepted

The individual class configs only need to be used if you have a bind conflict, as it won't matter what your binds for the Spy are while playing Scout, as long as they don't impede your other controls.

Generally, it's just laziness and not wanting to avoid all the binds in the other class configs.

share|improve this answer

I'm answering my own question here because I tinkered around with this last night and discovered the real reason people don't use the class configs. They don't work right.

If you add a rocket jump script to the soldier config I would expect that every time I play a soldier, and only a soldier, the rocket jump script would be enabled. This is only mostly true. The fact is that once I play a soldier the rocket jump script is now on all my classes.

Lets say I assigned the rocket jump script to mouse2 (which is entirely reasonable since the bazooka doesn't have an alt+fire). I play a soldier for a while, but then my team needs some defense and I switch to a demo man. When I try to detonate my sticky bombs using mouse2 I now jump and fire another sticky. Very, very annoying.

If you use the autoexec config at least you know that everything you add will affect all classes and you can plan accordingly.

share|improve this answer
    
That's fine. A script is only executed once, it can't be un-executed. You'd have to unbind all somewhere to have them work that way. –  user56 Jul 16 '10 at 13:10
4  
I have mine setup in such a way that I created a default.cfg config that contains all the basic bindings (i.e. direct copy from config.cfg). It also runs an unbind all at the start of the file. This way all my class specifc configs do exec default.cfg and then load their class specific things. The only real downside of this approach is you can't change any key bindings in the ingame options because they will be reset next time you change classes. –  Stephan Jul 16 '10 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.