Clearing Configs...
nIn
Join Date: 2004-09-20 Member: 31826Members
I use seperate configs for different lifeforms and I was wondering sometimes when I execute these configs the scripts dont execute in the right way. Like if I go from my skulk.cfg to my marine.cfg my pistol script won't work for some reason? But If I type exec marin.cfg in the console it usually helps.
I was wondering if there was a way to clear out the old settings for keys when you execute a new config.cfg? Like to make sure that the binds will be right for each lifeform?
Any help you can offer in this would be appreciated.
I was wondering if there was a way to clear out the old settings for keys when you execute a new config.cfg? Like to make sure that the binds will be right for each lifeform?
Any help you can offer in this would be appreciated.
Comments
unbindall
to the beginning of each config file.
If you do remember to rebind them, or you only unbind specific keys, it works like a charm.
1. Create a file called "default_controls.cfg" this file contains all your normal binds, which would generally be your wasd/arrow keys, jump, crouch, flashlight etc. Everything that doesn't change between configs.
2. Then create a config for each lifeform that includes all the things that are different. At the top of these configs put: <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->unbindall
exec "default_controls.cfg"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
This will mean that if you ever need to change your default controls, you don't have to go through every config file to change them.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->unbind "key"
unbind "key2"
unbind "key3"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
And so on.