Jump to content

Recommended Posts

Posted

This is a line of code that can be used to toggle the command map without having to hold a key to keep the map in view. This is very useful for use with mortars.

 

/////////////////////////////////////////////////////////////////
// Command Map Toggle
// keeps command map displayed until second keypress
// binds	g
/////////////////////////////////////////////////////////////////

set mapout "+mapexpand; +mapexpand; set togmap vstr mapin" 
set mapin "-mapexpand; -mapexpand; set togmap vstr mapout" 
set togmap "vstr mapout"
bind g "vstr togmap"

Posted

Just for cleanliness purposes, I would prefer making this:

set mapout "+mapexpand; +mapexpand; set togmap vstr mapin" 
set mapin "-mapexpand; -mapexpand; set togmap vstr mapout" 
set togmap "vstr mapout"
unbind G
bind ' "vstr togmap"

 

Look like this:

 

unbind G
set mapout "+mapexpand; +mapexpand; set togmap vstr mapin" 
set mapin "-mapexpand; -mapexpand; set togmap vstr mapout" 
set togmap "vstr mapout"
bind ' "vstr togmap"

 

It's less error prone to have the unbind first.

Posted

lol why unbind 'G' if you are going to use ' to bind the toggle to ??

 

it's not strictly required to 'unbind' a key in order to bind it, but in all my ET code i 'unbind' in the line before i 'bind' -- do you think it's better to have the unbind a few steps away from the bind? my autoexec also has an "unbind all" line before it calls my general binds cfg.

  • 5 months later...
  • 8 months later...
Posted

Just for cleanliness purposes, I would prefer making this:

set mapout "+mapexpand; +mapexpand; set togmap vstr mapin" 
set mapin "-mapexpand; -mapexpand; set togmap vstr mapout" 
set togmap "vstr mapout"
unbind G
bind ' "vstr togmap"

 

Look like this:

 

unbind G
set mapout "+mapexpand; +mapexpand; set togmap vstr mapin" 
set mapin "-mapexpand; -mapexpand; set togmap vstr mapout" 
set togmap "vstr mapout"
bind ' "vstr togmap"

 

It's less error prone to have the unbind first.

 

I do have the unbind G in my .cfg but not directly above my line of code as you suggested. I actually use numerous .cfg files and have one for every server I play on, due to server setting and mouse sensitivity and I have a comp .cfg for scrims. I made a .cfg that will scroll through the various .cfg files I have and then once I find the one I want I can select it and it will load the settings I need.

 

Here is an example of how I do my unbinds in my .cfg files:

 

/////////////////////////////////////////////////////////////////
// =FA=Thor.cfg
// last updated:  6 Aug 2009
/////////////////////////////////////////////////////////////////

name "^0=^7F^0|^7A^0=^7Th^4o^7r^4!"
echo "^0=^7F^0|^7A^0=^7Th^4o^7r^4! ^sSettings ^7loaded^1!"

unbind F5			// Medic
unbind F6			// Field Op
unbind F7			// Engineer Mp40/Thompson
unbind F8			// Engineer riflenade
unbind F9			// Panzer
unbind F10			// Mg42
unbind F11			// Auto screenshot
unbind F12			// Record demo toggle
unbind g			// Command map toggle
unbind b			// Fps toggle
unbind MOUSE7		        // weaponbank 6
unbind MWHEELDOWN		// weaponbank 3
unbind MWHEELUP	                // weaponbank 5
unbind i			// Player stats toggle

 

This way when I open up a .cfg file for editing, the first thing I see are all the keys that that particular .cfg uses and the functions of each key. I found this to be very helpful for trouble shooting and editing.

Posted

dead link :o

 

Yes, someone edited my original post and removed the content then placed that link in it :hmm

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.