1

Topic: Multiple binds from same key?

Hey guys!

Is there a possibility to bind several text-messages to one key?
I read in other fora (not teeworlds) of something like vstr binds like this:

bind s "vstr lol"
set lol "vstr lol1"
set lol1 "say bring it on; set lol vstr lol2"
set lol2 "say you want a piece of me?; set lol vstr lol3"
set lol3 "say good luck, have fun; set lol vstr lol1"

Would be cool to have many sayings in only one key...

visit our clan!
=Eagle=

2

Re: Multiple binds from same key?

You could use multiple .cfg files to do that, you start binding your key with:

bind s "say ABC; exec text2.cfg"

And then prepare the following .cfg files, which you'll have to put in the appdir or data folder or whatevs:

text1.cfg wrote:

bind s "say ABC; exec text2.cfg"

text2.cfg wrote:

bind s "say DEF; exec text3.cfg"

And the last one returns back to the first one:

text3.cfg wrote:

bind s "say GHI; exec text1.cfg"

» Albert Einsteein: I have no special talent. I am only passionately curious.

3

Re: Multiple binds from same key?

You are a genius! big_smile
IT WORKS!!! big_smile
Thanks a thousand times!

visit our clan!
=Eagle=

4 (edited by Dune 2012-07-22 10:04:25)

Re: Multiple binds from same key?

Apmox method is too complex.

You can put several commands in a .cfg, you don't need to create 3 of them for 3 commands.

Besides, you don't even need a .cfg file, you can simply use an inline command:

bind s "say I changed to no HD and authentified"; gfx_highdetail 0; rcon_auth my_password"
Not Luck, Just Magic.

5 (edited by Apmox 2012-07-22 13:37:15)

Re: Multiple binds from same key?

Dunedune, I know it's complex but it's the right method. I worked on it couple times and you need to have .cfg's to reset the binds, it's not to have the 3 commands in the same bind; it's for change the bind everytime since if you do something like this:

bind s "say ABC; bind s \"say DEF; bind s \\"say GHI;\\"\""

..you can't get back to the first one.

» Albert Einsteein: I have no special talent. I am only passionately curious.

6

Re: Multiple binds from same key?

Apmox wrote:

Dunedune, I know it's complex but it's the right method. I worked on it couple times and you need to have .cfg's to reset the binds, it's not to have the 3 commands in the same bind; it's for change the bind everytime since if you do something like this:

bind s "say ABC; bind s \"say DEF; bind s \\"say GHI;\\"\""

..you can't get back to the first one.

Imo it takes less time to simply rewrite the line than to create X files and to modify them one after the other.

Not Luck, Just Magic.

7

Re: Multiple binds from same key?

he wants a cycling bind, you need multiple cfgs, another method delo is to use an external script like autohotkey.com so that when you push one key it sends a random key

8

Re: Multiple binds from same key?

Apmox method just fulfilled what I was asking for...if there is another way to write it in the settings.cfg without using several different configs you can post it down here! wink

visit our clan!
=Eagle=

9 (edited by Dune 2012-07-23 00:17:20)

Re: Multiple binds from same key?

Delo: wrote:

Apmox method just fulfilled what I was asking for...if there is another way to write it in the settings.cfg without using several different configs you can post it down here! wink

Dune wrote:

You can put several commands in a .cfg, you don't need to create 3 of them for 3 commands.

Besides, you don't even need a .cfg file, you can simply use an inline command:

bind s "say I changed to no HD and authentified"; gfx_highdetail 0; rcon_auth my_password"

You can bind it in console or add it to the settings.cfg.
Unless you want it to loop, this is enough.

Not Luck, Just Magic.

10

Re: Multiple binds from same key?

Dune wrote:

You can bind it in console or add it to the settings.cfg.
Unless you want it to loop, this is enough.

I see your point now! You meant you can bind the messages you wanted in a single bind. That's absolutely simpler but with the spam protection you'd only get the first message displayed. That's why I told Delo to use this method, because you need to delay the commands and you can only do it with iteration in vanilla client.

» Albert Einsteein: I have no special talent. I am only passionately curious.

11

Re: Multiple binds from same key?

Apmox wrote:
Dune wrote:

You can bind it in console or add it to the settings.cfg.
Unless you want it to loop, this is enough.

I see your point now! You meant you can bind the messages you wanted in a single bind. That's absolutely simpler but with the spam protection you'd only get the first message displayed. That's why I told Delo to use this method, because you need to delay the commands and you can only do it with iteration in vanilla client.

hmm...how about

bind space "+fire;+fire;+fire;+fire;+fire;+fire;+fire;+fire;+fire;+fire;+fire;+fire"

not only doesn't fire like machine gun, but also has no sign of firing multiple times(no "click" sound)
it doesn't work because of the time taken between each command is shorter than the smallest frame in game or what?

12

Re: Multiple binds from same key?

nanashi wrote:

not only doesn't fire like machine gun, but also has no sign of firing multiple times(no "click" sound)
it doesn't work because of the time taken between each command is shorter than the smallest frame in game or what?

+fire is like +left if I remember correctly, it's not just a little clic, it does not send a "mouse is released" signal.

Not Luck, Just Magic.

13

Re: Multiple binds from same key?

Dune wrote:
nanashi wrote:

not only doesn't fire like machine gun, but also has no sign of firing multiple times(no "click" sound)
it doesn't work because of the time taken between each command is shorter than the smallest frame in game or what?

+fire is like +left if I remember correctly, it's not just a little clic, it does not send a "mouse is released" signal.

This was fixed some time ago.

@nanashi: Do you really complain about not being able to cheat around that 'click protection' of the gun which exists for a reason? ('click protection' meaning that you have to click the fire button again to fire)