News:

Come Chat with us live! Learn how HERE!

Main Menu

Multiple Binding in one Key

Started by Zordos, October 18, 2009, 10:38:37 PM

Zordos

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

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

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

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..


Zordos

 ;) 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

Quote from: Bissig on October 19, 2009, 10:51:29 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

#7
Quote from: Plague Bringer on October 19, 2009, 11:18:39 PM
Quote from: Bissig on October 19, 2009, 10:51:29 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

Plague Bringer

Quote from: Bissig on October 19, 2009, 11:23:12 PM
Quote from: Plague Bringer on October 19, 2009, 11:18:39 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

you forgot black =OOOOOOOOOOOOOOOOOOOOOOOO

Bissig

Quote from: DraZiLoX on October 20, 2009, 07:01:14 PM
you forgot black =OOOOOOOOOOOOOOOOOOOOOOOO

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

Repatition

yes but its much easier to do it in the console: /name ^5CWT^7Repatition : example

Zordos

 ;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

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

/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

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