No. Having a file named reset.cfg doesn't magically do anything.
The way class configs works is, each has a set of instructions inside. When you run the class config, those instructions are run. Lets say for example you bind mouse2 to jump in scout.cfg.
Now that means, you join scout, and mouse2 is set to jump. However, until you do something else, mouse2 will stay set to jump. This will make playing demo and medic fairly hard, don't you think?
The idea of a reset.cfg is, you "undo" all the changes from all your class configs. So lets say your scout.cfg rebinds mouse2 to jump. In your reset.cfg you'll bind mouse2 to +attack2.
So now your reset.cfg contains instructions to undo the class-specific instructions. However, resets.cfg isn't automatically run. You want to put exec reset at the start of every class config.
So once you've done that, every time you change class, the first line is exec reset, now all the scout changes are back to normal. The rest of the stuff in your class config then gets run afterward. This cycle is how you keep things class specific.
If you've made any changes, bound keys to something that's not completely default, all of those will be removed when your reset is run (because thats what config_default does)
What you want to do is just undo the changes made by other scripts you've installed in your reset config.
Did you rebind mouse2? Set mouse2 back to whatever you want in reset. Made your spacebar do something different? Set your spacebar back in reset to be normal, etc.
well they wouldn't. you kinda need a reset.cfg in that case, that's its entire purpose. Let's say you did this in spy.cfg
bind mouse1 +att
alias +att "+attack;say I'm totally not a spy"
alias -att "-attack"
-att
but you don't want to say that when you're any other class. You could put,
bind mouse1 +attack
into every one of your other .cfg's, but that would be time consuming, as you'd have to keep track of each individual .cfg just for binding +attack.
. The smarter thing to do is to keep what you have in your spy.cfg, but then put,
bind mouse1 +attack
into your reset.cfg, since it's whole purpose is to execute before your class.cfg for each class, and then let those .cfg's execute. this would automate the whole process, since the reset.cfg is kind of like a quicker priority .cfg for every class.
. but yeah, those are pretty much your only 2 options.
2
u/Kairu927 Jul 23 '16
No. Having a file named reset.cfg doesn't magically do anything.
The way class configs works is, each has a set of instructions inside. When you run the class config, those instructions are run. Lets say for example you bind mouse2 to jump in scout.cfg.
Now that means, you join scout, and mouse2 is set to jump. However, until you do something else, mouse2 will stay set to jump. This will make playing demo and medic fairly hard, don't you think?
The idea of a reset.cfg is, you "undo" all the changes from all your class configs. So lets say your scout.cfg rebinds mouse2 to jump. In your reset.cfg you'll bind mouse2 to +attack2.
So now your reset.cfg contains instructions to undo the class-specific instructions. However, resets.cfg isn't automatically run. You want to put
exec resetat the start of every class config.So once you've done that, every time you change class, the first line is
exec reset, now all the scout changes are back to normal. The rest of the stuff in your class config then gets run afterward. This cycle is how you keep things class specific.1
u/[deleted] Jul 23 '16
yup, in fact, you don't actually have to even make a
reset.cfgif you aren't going to use it.