News:

Come Chat with us live! Learn how HERE!

Main Menu

How to bind key combinations? + Some other questions

Started by UniqPhoeniX, November 23, 2007, 09:40:24 AM

UniqPhoeniX

Is it possible to bind key combinations? Like shift+Q or CTRL+1?

next_ghost

No. Ctrl, Alt and Shift are bindable keys, not key modifiers.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

UniqPhoeniX

#2
What about making holding a button use a different .cfg?
About using binds to change name, is it possible to use 2 buttons to scroll between names, and 3rd button activating it? Without spamming the server?
Besides "echo", is there another command to show a message on screen, but so that it doesn't show in console?

EDIT: Is it possible to bind a key to just enter text into "say" or "say_team"?
Would this work?
set name1 "echo ^2***^5name1^2***;bind 1 name name1;bind 2 vstr name2;bind 3 vstr name4"
set name2 "echo ^2***^5name2^2***;bind 1 name name2;bind 2 vstr name3;bind 3 vstr name1"
set name3 "echo ^2***^5name3^2***;bind 1 name name3;bind 2 vstr name4;bind 3 vstr name2"
set name4 "echo ^2***^5name4^2***;bind 1 name name4;bind 2 vstr name1;bind 3 vstr name3"
vstr name1

Caveman

set name1 "echo ^2***^5name1^2***";bind 1 name name1;bind 2 vstr name2;bind 3 vstr name4

just set the quotes in the right place and you are set.
But remember there are loads of servers out there that will kick you if you change your name to often and/or to fast.

UniqPhoeniX

Well this way I can change name just once after I have chosen the right one.

/dev/humancontroller

Hmm. I'll think about coding support for such bindings. Don't try to beat me :)

UniqPhoeniX

#6
Wait... why do the quotes have to be like that?
Oh and: Besides "echo", is there another command to show a message on screen, but so that it doesn't show in console?

Caveman

You seem to lack the basics of scripting and binds. Please use google to remedy that.

UniqPhoeniX

#8
I use this for builder binds and it works:
set abuild1 "echo ^2***^5Overmind^2***; build overmind; bind RIGHTARROW vstr abuild2;bind LEFTARROW vstr abuild8"
set abuild2 "echo ^2***^5Eggpod^2***;   build eggpod;   bind RIGHTARROW vstr abuild3;bind LEFTARROW vstr abuild1"
set abuild3 "echo ^2***^5Acib Tube^2***;build acid_tube;bind RIGHTARROW vstr abuild4;bind LEFTARROW vstr abuild2"
set abuild4 "echo ^2***^5Barricade^2***;build barricade;bind RIGHTARROW vstr abuild5;bind LEFTARROW vstr abuild3"
set abuild5 "echo ^2***^5Trapper^2***;  build trapper;  bind RIGHTARROW vstr abuild6;bind LEFTARROW vstr abuild4"
set abuild6 "echo ^2***^5Booster^2***;  build booster;  bind RIGHTARROW vstr abuild7;bind LEFTARROW vstr abuild5"
set abuild7 "echo ^2***^5Hive^2***;     build hive;     bind RIGHTARROW vstr abuild8;bind LEFTARROW vstr abuild6"
set abuild8 "echo ^2***^5Hovel^2***;    build hovel;    bind RIGHTARROW vstr abuild1;bind LEFTARROW vstr abuild7"
vstr abuild2


Shouldn't quotes be around everything executed if you want to exec more then 1 command/subcommand, or to pass marks like ";" [space] and other commands without execing like: echo "bind 3 buy larmour"?

Eli

Try THIS


^^ Made by (Cebt)s Very own cheerleader, enjoy em =P they pwn you all xD
ngame name:(Cebt)Namrorrim

I EAT BUTTERED TOAST MOOO!!!

Quote from: _Equilibrium_if baricades cost 1 bp each, we could build some sweet mazes.

UniqPhoeniX

How to use center print (cp)? it doesnt seem to work

Eli

It doesn't Well at least not in binds... I wanted to use it too, but couldn't.

Just use 'Echo'
ngame name:(Cebt)Namrorrim

I EAT BUTTERED TOAST MOOO!!!

Quote from: _Equilibrium_if baricades cost 1 bp each, we could build some sweet mazes.

daenyth

On a side note, does anyone know why it doesn't work in binds? Is it reserved for only servers?
Quote from: Bullislander05
It's like trying to take apple seeds out of a zebra to plant a giraffe tree.

Death On Ice

A client side version of cp (center print) would be ninja.

Matt2k10

#14
Quote from: UsaKilleR on November 23, 2007, 09:40:24 AM
Is it possible to bind key combinations? Like shift+Q or CTRL+1?

Put this in a .cfg file named shift+.cfg:
seta shift1 "exec shift2.cfg"
bind [key] "[old bind]"
bind shift "vstr shift1"


Put this in a .cfg file named shift2.cfg:
seta shift2 "exec shift+.cfg"
bind [key] "[new bind];vstr shift2"
bind shift "vstr shift2"


Replace the brackets etc with the stuff you want, and repeat for however many keys you want. Pressing shift again cancels it. Doesn't work perfectly, but it works.

UniqPhoeniX

I know that stuff, but its not quite as good. I am making a huge set of binds that way.
Just 1 thing: whats the difference between set and seta?

kevlarman

for the purpose you're using them, absolutely none.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----