Commander Key Binding Issue...

BorisBoris Join Date: 2002-12-30 Member: 11636Members
<div class="IPBDescription">changing bind keys as a switch menus...</div> I'm trying to get the keys to change according to the menu I'm in so I have one set of keys to corrospond to the positioning of the items in the menu. For example the build menu:

y*******u********i***********o***<-- keyboard keys
ResT***InfP*****ARM*********----**<-- structure to build
********************************
h*******j********k*********l*****
TF*****Tur******STur******----****
********************************
n*******m***********************
CCon***----***********************


The above keys are my layout for ALL menus, but only certain ones are needed for each menu(as you can tell the ---- means no item in that spot).

First thing I tried was binding all the key changes to one key. Example:

**BUILD MENU**
bind 8 "hotkey86; bind y hotkey??; bind u hotkey??; bind i ....." <-- you get the point

THE ABOVE KEPT CRASHING!

So next, I did the following:

bind 8 "hotkey86; exec menu1.cfg" <-- worked fine with the menu1.cfg as follows:

// file start **HOTKEYS for BUILD MENU**
bind "y" "hotkey41"
bind "u" "hotkey40"
bind "i" "hotkey48"
bind "h" "hotkey43"
bind "j" "hotkey56"
bind "k" "hotkey57"
bind "n" "hotkey58"
// end

I continued this process for avd build and equip menu.

It seems to work FINE, with one exception:
It only changes the keys OUTSIDE the comm chair.

When I am inside the comm chair it seems to only execute the first part of my key binding, namely, the "hotkey86" part. It won't exec any menu?.cfg's I have made. It will outside the chair (with the msg hotkey86 - 88) not recognized in the console of course, which is fine.

ANY HELP ON THIS WOULD BE APPRECIATED. SURE WOULD HELP WITH THE COMM'n!

Thanks
-Matt <!--emo&::skulk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/skulk.gif' border='0' valign='absmiddle' alt='skulk.gif'><!--endemo-->

Comments

  • Rabid_LlamaRabid_Llama Join Date: 2002-11-02 Member: 4340Members
    hotkeys can't be in anything but a "bind" command and work. They also have to be bound to a key *by themselves*. This is why your second attempt didn't work. What you have to do is do a double-press routine. Press 1 rebinds all the keys, including rebinding THAT key to the menu-switching hotkey. Then you press the key again to switch menus ingame. This is what I had to do when I made my comm script (back in the day <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' valign='absmiddle' alt='biggrin.gif'><!--endemo--> )
    Here's mine if you want to see what I mean (or use it/modify it):
    <a href='http://home.swbell.net/houston8/commander.cfg' target='_blank'>http://home.swbell.net/houston8/commander.cfg</a>
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    Thanks for the help. Too bad it doesn't work out nicely. I'll use your method.

    - Matt <!--emo&::skulk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/skulk.gif' border='0' valign='absmiddle' alt='skulk.gif'><!--endemo-->
Sign In or Register to comment.