Digital Paint Discussion Board
Paintball 2: The Game => Paintball 2 Discussion => Topic started by: WARNER on October 11, 2008, 02:08:04 PM
-
Can you have multiple binds on 1 key? ??? I heard you can but no one told me how.. please help? :-\
-
no u cant
-
no u cant
oh okay thank you.
-
Yes, you can. "cmd;cmd"
-
can you give me an example of how you would use "cmd;cmd"
If you mean something like:
bind "mouse1" "+attack;+movedown"
I'm pretty near certain that doesn't work. At least it didn't in the older builds (maybe that got changed after I stopped actively writing scripts)...
Can you have multiple binds on 1 key? ??? I heard you can but no one told me how.. please help? :-\
you have to use an ALIAS:
bind "mouse1" "duckshoot"
alias duckshoot "+attack;+movedown"
all you wanted to know and more about writing scripts:
http://console.planetquake.gamespy.com/tutorials/quake_2.html (http://console.planetquake.gamespy.com/tutorials/quake_2.html)
-
Nope, aliases really don't accomplish anything other than group together commands for convenience's sake.
-
"nope" what?
"nope," we don't need aliases?
"nope," we can't use "cmd;cmd;cmd..." in a single bind?
"nope," I'm not really on fire?
"nope," but I'll give you a $100?
...
I assume you're referring to the 1st answer, to which I say, "since when?!!" and "why didn't I know about this sooner?!!" :o
-
Haha, for +/- commands you might have to put a few "wait" commands in between there.
-
Nope, aliases really don't accomplish anything other than group together commands for convenience's sake.
Try writing a crouch toggle bind without aliases. :)
-
"nope" what?
"nope," we don't need aliases?
"nope," we can't use "cmd;cmd;cmd..." in a single bind?
"nope," I'm not really on fire?
"nope," but I'll give you a $100?
...
I assume you're referring to the 1st answer, to which I say, "since when?!!" and "why didn't I know about this sooner?!!" :o
Nope, you don't need aliases to stick multiple cmds in a bind. As jits points out, though, aliases can be pretty useful for rebinding and such. :P
Feel free to do 'bind mouse2 "+moveup;say Jump!", though. When I just tested this, though, it appends some numbers to the end of what you say... >.>
-
Feel free to do 'bind mouse2 "+moveup;say Jump!", though. When I just tested this, though, it appends some numbers to the end of what you say... >.>
Ugh, I thought I fixed that!
Edit: Interesting...
if (kb[0] == '+')
{ // button commands add keynum and time as a parm
Com_sprintf(cmd, sizeof(cmd), "%s %i %i\n", kb, key, time);
Cbuf_AddText(cmd);
}
I don't think anything even uses that. Wonder if it's safe to remove it.
Edit: It's not.
You can work around this easily enough with an alias:
alias +jump "+moveup;say Jump!"
alias -jump "-moveup"
bind mouse2 "+jump"
Put a feature vote up for it if you want it fixed. Turns out it isn't as trivial as I thought it would be to fix.
-
some on said that you can have multipple name binds on one key. is it possible? can you telll me how if it is? it would be really helpful. im kind of a newb at these things... ;D
-
bind "F8" "switchname1"
alias switchname1 "name YOURNAMEHERE; bind F8 switchname2; echo YOURNAMEHERE"
alias switchname2 "name 1YOURNAMEHERE; bind F8 switchname3; echo 1YOURNAMEHERE"
alias switchname3 "name 2YOURNAMEHERE; bind F8 switchname4; echo 2YOURNAMEHERE"
alias switchname4 "name 3YOURNAMEHERE; bind F8 switchname1; echo 3YOURNAMEHERE"
-
bind space +moveup
bind f +moveup
They won't undo each other.