So I'm running a custom script for my Engineer, that rebinds almost all of my keys to only use the mouse. However, when I switch to Demoman, the scripts are still there (or more specifically, overlapping), with only the Grenade Launcher functioning properly.
I tried inserting an "exec config.cfg" into ever other class file, but that causes some horrible lag when switching classes. I was wondering if there was a fix/workaround for it?
You mean some class-specific order like this?
[quote]<class>.cfg - Each class has a config file which automatically runs whenever you switch to that class. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute inside these files.[/quote]
[url]http://wiki.teamfortress.com/wiki/Scripting[/url]
The alternative is to "unbind all" "bind <your keybinds here> for each individual class.
Basically, TF2 isn't smart enough to undo any scripting changes, so you have to do it yourself.
What are you suggesting? Something like this:
[code]
unbindall
bind mouse1 "attack"
bind mouse2 "attack2"
[/code]
Cause that would unbind *every* action, wouldn't it? And then again, all I would do would be to rewrite the config.cfg file.
[QUOTE=Moronmaster;31746475]What are you suggesting? Something like this:
[code]
unbindall
bind mouse1 "attack"
bind mouse2 "attack2"
[/code]
Cause that would unbind *every* action, wouldn't it? And then again, all I would do would be to rewrite the config.cfg file.[/QUOTE]
Yeah, it requires a lot of rewriting.
That's what I have, in a looser sense - I didn't actually unbind everything, just the keys that change between classes, my config files aren't too complicated.
Consider following Marik's advice, which is a bit more complicated to set up but makes adding things much much easier in the long run.
Okay so, since I'm a slow person (refer to my name), I just want to have everything clear, before I start doing any major writing.
I create separate files, called for example "CombatEngi" in my "cfg" directory. I then add a "exec CombatEngi.cfg" in my "Engineer.cfg" file. And then... well, I never really got that far.
Which gives me an idea... Valve should add an "unexec" command or something, in the distant future, so that when "unexec file.cfg" is called, all commands are restored to the point just before the file was executed :v:
You could have engineer.cfg have "bind KEYHERE exec combatengi.cfg"
And then have combatengi.cfg have "bind THATSAMEKEY exec engineer.cfg"
Press key, receive combat engie toggle.
As for other classes, you just reset all the keys you changed.
Like for me, I have my scroll wheel set so up is always shotgun and down is always wrench.
[code]bind MWHEELUP slot1;
bind MWHEELDOWN slot3;[/code]
To fix that for the rest of the classes, I just added this to their configs:
[code]bind MWHEELUP invprev;
bind MWHEELDOWN invnext;[/code]
No need to do any complicated unbinding of anything, just rebind the functions that should be there.
And hell, if you don't even want to do that, you can just have every file start with "exec cleanslate.cfg" that contains all the rebinds so you only have to update one file when you add a class-specific bind.
Is there any way to change loadout from the console? I know there used to be but I thought it was removed. Essentially I want a way to switch between to engy loadouts.
Sorry, you need to Log In to post a reply to this thread.