Help - Search - Members - Calendar
Full Version: Clearing Configs...
Unknown Worlds Forums > Natural Selection > Natural Selection Creation > Scripting Discussion
nIn
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.
digz
If you have every key rebound in each config, you can add

unbindall

to the beginning of each config file.
nIn
that worked thanks squeak
MrRadicalEd
What I like to do is make aliases that unbind keys that are used in specfic class CFG files, marine, skulk, etc, and have these aliases called before a new CFG is loaded. I don't have to worry about custom binds getting lost due to "unbindall" cause I account for them all.
ReK
Ya, I tried unbindall once and, for some stupid reason, forgot to include the rebinds for all my standard keys. Not fun to play with that....

If you do remember to rebind them, or you only unbind specific keys, it works like a charm.
Mintman
If you want to make sure everything is cleared by using unbindall I would do it this way:

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:
CODE
unbindall
exec "default_controls.cfg"

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.
nIn
good idea
2_of_Eight
If you want to unbind some keys only, use
CODE
unbind "key"
unbind "key2"
unbind "key3"

And so on.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.