Author Topic: How to bind key combinations? + Some other questions  (Read 8681 times)

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
How to bind key combinations? + Some other questions
« on: November 23, 2007, 09:40:24 am »
Is it possible to bind key combinations? Like shift+Q or CTRL+1?
« Last Edit: November 24, 2007, 05:55:16 pm by UsaKilleR »

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Re: How to bind key combinations?
« Reply #1 on: November 23, 2007, 01:23:10 pm »
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

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations?
« Reply #2 on: November 24, 2007, 05:54:27 pm »
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
« Last Edit: November 24, 2007, 09:14:36 pm by UsaKilleR »

Caveman

  • Guest
Re: How to bind key combinations? + Some other questions
« Reply #3 on: November 25, 2007, 03:00:12 am »
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

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations? + Some other questions
« Reply #4 on: November 25, 2007, 02:57:39 pm »
Well this way I can change name just once after I have chosen the right one.

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: How to bind key combinations? + Some other questions
« Reply #5 on: November 25, 2007, 03:06:05 pm »
Hmm. I'll think about coding support for such bindings. Don't try to beat me :)

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations? + Some other questions
« Reply #6 on: November 25, 2007, 04:45:48 pm »
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?
« Last Edit: November 25, 2007, 04:49:09 pm by UsaKilleR »

Caveman

  • Guest
Re: How to bind key combinations? + Some other questions
« Reply #7 on: November 25, 2007, 05:36:27 pm »
You seem to lack the basics of scripting and binds. Please use google to remedy that.

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations? + Some other questions
« Reply #8 on: November 25, 2007, 06:09:51 pm »
I use this for builder binds and it works:
Code: [Select]
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"?
« Last Edit: November 26, 2007, 01:56:00 am by UsaKilleR »

Eli

  • Posts: 72
  • Turrets: +2/-4
Re: How to bind key combinations? + Some other questions
« Reply #9 on: November 25, 2007, 09:08:53 pm »
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

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations? + Some other questions
« Reply #10 on: December 12, 2007, 03:15:29 pm »
How to use center print (cp)? it doesnt seem to work

Eli

  • Posts: 72
  • Turrets: +2/-4
Re: How to bind key combinations? + Some other questions
« Reply #11 on: December 16, 2007, 04:47:59 am »
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

  • Posts: 230
  • Turrets: +21/-26
Re: How to bind key combinations? + Some other questions
« Reply #12 on: December 16, 2007, 01:11:13 pm »
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

  • Posts: 1287
  • Turrets: +126/-141
Re: How to bind key combinations? + Some other questions
« Reply #13 on: December 16, 2007, 08:17:56 pm »
A client side version of cp (center print) would be ninja.

Matt2k10

  • Posts: 144
  • Turrets: +11/-8
Re: How to bind key combinations? + Some other questions
« Reply #14 on: December 24, 2007, 07:17:40 pm »
Is it possible to bind key combinations? Like shift+Q or CTRL+1?

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

Put this in a .cfg file named shift2.cfg:
Code: [Select]
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.
« Last Edit: December 24, 2007, 07:20:17 pm by Matt2k10 »

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: How to bind key combinations? + Some other questions
« Reply #15 on: December 24, 2007, 11:13:05 pm »
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

  • Posts: 2737
  • Turrets: +291/-295
Re: How to bind key combinations? + Some other questions
« Reply #16 on: December 24, 2007, 11:33:17 pm »
for the purpose you're using them, absolutely none.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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| #
|.@.-##
-----