Author Topic: Multiple Binding in one Key  (Read 5493 times)

Zordos

  • Posts: 45
  • Turrets: +0/-0
Multiple Binding in one Key
« on: October 18, 2009, 10:38:37 pm »
Can you bind a key and have this key be a multiple binder?

Example:  /bind F1 "..........." and have this bind be able to evolve into an advanced marauder and then once I am an advanced marauder have my left mouse button be the attack key and my right mouse button be the secondary attack button.  Keep in mind that before, my secondary attack key was my middle button (third button).

Is it possible or just asking too much. ::)

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Multiple Binding in one Key
« Reply #1 on: October 18, 2009, 10:54:03 pm »
You can make a bind do lots of things, but you have to be careful to not leave your buttons all messed up when you evolve via the menus or whatever.

/bind F1 "command1;command2;command3"

If you want to have looped things or nested quotes then you need to use vstr, eg:
/set ping "echo ping;bind F1 vstr pong"
/set pong "echo pong;bind F1 vstr ping"
/bind F1 vstr ping

Would then make F1 echo ping and pong alternately.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Multiple Binding in one Key
« Reply #2 on: October 18, 2009, 11:28:41 pm »
To get someone who's got time on the right track, Zordos will have to exec a .cfg that will rebind his mouse buttons. Anyone want to direct him to a topic?
U R A Q T

Kiwi

  • Posts: 859
  • Turrets: +29/-9
Re: Multiple Binding in one Key
« Reply #3 on: October 19, 2009, 02:32:50 am »
I created a tutorial a while back, I made it about autoexec.cfg's and other .cfg files, but I went over bindings and strings.  I also attached a example autoexec.cfg.  You can find it here.  That should teach you the basics of making "categories" and binds that spring off each other.

Also, I made that a while back, so I'm not sure how good it is..

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: Multiple Binding in one Key
« Reply #4 on: October 19, 2009, 10:51:29 pm »

Zordos

  • Posts: 45
  • Turrets: +0/-0
Re: Multiple Binding in one Key
« Reply #5 on: October 19, 2009, 11:03:12 pm »
 ;) To all of you, thanks.  You have pointed me in the right direction and I will go to those places.  The vstr command is going to take some time for me to learn, but I will give it a shot.  Thanks for your helpfulness. ;D

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Multiple Binding in one Key
« Reply #6 on: October 19, 2009, 11:18:39 pm »
This thread evolved into a thread with many examples and explanations:

http://forums.sstcentral.com/index.php?/topic/1732-bind-and-vstr-the-mistery-of-advanced-keyboard-haxxery/

Hey, Bis, I hate to nitpick, but I do believe ^3 is yellow. ^2 is cyan, I think. :D
U R A Q T

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: Multiple Binding in one Key
« Reply #7 on: October 19, 2009, 11:23:12 pm »
This thread evolved into a thread with many examples and explanations:

http://forums.sstcentral.com/index.php?/topic/1732-bind-and-vstr-the-mistery-of-advanced-keyboard-haxxery/

Hey, Bis, I hate to nitpick, but I do believe ^3 is yellow. ^2 is cyan, I think. :D

Thanks for pointing this out! You are so very right, except that 2 looks more like green and 5 is more like cyan I think. Hmm, has anyone gotten around and coded a vstr/bind checker standalone software yet?

Little colour table:

^1
^2
^3
^4
^5
^6
^7
« Last Edit: October 19, 2009, 11:32:48 pm by Bissig »

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Multiple Binding in one Key
« Reply #8 on: October 19, 2009, 11:26:16 pm »
Hey, Bis, I hate to nitpick, but I do believe ^3 is yellow. ^2 is cyan, I think. :D

Thanks for pointing this out! You are so very right, except that 2 looks more like green and 5 is more like cyan I think. Hmm, has anyone gotten around and coded a vstr/bind checker standalone software yet?
Yeah, ^2 is green. I can't believe I forgot that. :P
Also, it's perfectly reasonable to go do that in /devmap, but it'd be nice to have something that doesn't involve starting Trem'. I've never heard of anything. I imagine it would have been very public.
U R A Q T

DraZiLoX

  • Posts: 844
  • Turrets: +24/-24
Re: Multiple Binding in one Key
« Reply #9 on: October 20, 2009, 07:01:14 pm »
you forgot black =OOOOOOOOOOOOOOOOOOOOOOOO

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: Multiple Binding in one Key
« Reply #10 on: October 21, 2009, 12:11:52 am »
you forgot black =OOOOOOOOOOOOOOOOOOOOOOOO

It is there, you just can't see it ;-P

Repatition

  • Posts: 332
  • Turrets: +11/-196
    • http://jbjarts.blogspot.com/
Re: Multiple Binding in one Key
« Reply #11 on: October 21, 2009, 06:35:29 am »
yes but its much easier to do it in the console: /name ^5CWT^7Repatition : example

Zordos

  • Posts: 45
  • Turrets: +0/-0
Re: Multiple Binding in one Key
« Reply #12 on: October 21, 2009, 01:44:54 pm »
 ;D Execellent, or as the Brithis would say, "Bully, chap, just bully!"  ::)...Thanks, I'm printing out those goodies for reference.

I, however, do not think that doing the bind I want it going to be that easy and it would have to be using "vstr".

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Multiple Binding in one Key
« Reply #13 on: October 21, 2009, 03:52:30 pm »
Binds are kept in files called .cfg. You can use the /exec cfgname.cfg to quickly load up a bind set.

You'll want to make a new .cfg called "marauder.cfg". Bind "/exec marauder.cfg" to 0, for example.. In this .cfg, you'll want something like

Code: [Select]
/evolve class3adv
/bind mouse2 +attack
etc
etc
etc
(COMMANDS SHOWN ABOVE ARE NOT THE REAL COMMANDS)

Then, whenever you press 0, assuming you have enough evos, you'll evolve into an advanced marauder and your mouse buttons will be rebound.

Using this system, you can have complicated binds for both teams. For example, I used to have my binds configured so I could join a team with the push of a button, and depending on what team I joined my say_team binds were different and my binds for upgrades were different, too.
U R A Q T

Zordos

  • Posts: 45
  • Turrets: +0/-0
Re: Multiple Binding in one Key
« Reply #14 on: October 21, 2009, 10:44:27 pm »
Plague, that's spoon feeding me; I can appreciate that one.  I believe I can handle that.  The other's are great but appear to take more time and be a little more involved, although I think it is the same, just the way I perceive them.  Thanks to all, mean it! ;D