I was just wondering if it is possible to make your binds class sensetive. For example: if i was gorg then the "r" would build an rt and if im an marine then the "r" would reload my weapon.
<!--QuoteBegin--Ic3Man+Nov 12 2003, 05:35 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Ic3Man @ Nov 12 2003, 05:35 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I was just wondering if it is possible to make your binds class sensetive. For example: if i was gorg then the "r" would build an rt and if im an marine then the "r" would reload my weapon. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> This is probably possible (e.g. Commander's hotkeys), but I am unsure if there is a simple bind command to do it.
It's possible with a considerable amount of scripting. I rebind a lot of my keys depending on class. Best start learning about HL scripting if thats what you want to do.
console binding is stored in an array in caps, so bining is not case senstive, if it was and u hit caps lock, insted of tab, u would wonder why your keys did not work.
u have 101 keys (about) that u can bind, cosider that.
my binds
f9 - jointeamone ( Rine) f10 - jointeamtwo (Kahraa) f11 - givepoints (sv_cheats res hack) f12 - addbot (add 1 rcbot) b - kill (before i get devoured)
amckern, your mistake is understandable and an honest one, but what he asked is if they're "class sensitive", not case. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
MadCap, maybe you can point him in the direction of knowledge. =P
CLASS sensitive, not case sensitive. And actually you can do some neat stuff with alt+keys and control+keys or any other button so you aren't actually limited to 104 (or whatever your keyboard has) keys but this of course takes more scripting and is kind of not the best idea since it's more of a hack (in the coding work-around sense, not OMG H4X sense).
Edit I'd love to point you in the right direction but unfortunately the greatest online guide to HL scripting is no longer available on the web as of about a month ago. Google searching might find you some tutorials (or maybe a cache of the once great guide, in which case let me know). You might have success just finding scripts and using them to learn, some people are good at that. PM me if you have any questions or want any other help.
...just make some XYZ.cfg files, like marine.cfg and gorge.cfg (comm.cfg... skulk.cfg.. fade.cfg.. whatever) and put them in your NS directory.
Put all your marine/gorge/whatever specific binds into those files, then use "exec gorge.cfg" to execute your gorge config while playing. You can even bind a key (say, f9) to "exec gorge.cfg" and another key (say, f10) to "exec marine.cfg", then you can easily switch between the two.
<!--QuoteBegin--romano^_^+Nov 12 2003, 10:22 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (romano^_^ @ Nov 12 2003, 10:22 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ...just make some XYZ.cfg files, like marine.cfg and gorge.cfg (comm.cfg... skulk.cfg.. fade.cfg.. whatever) and put them in your NS directory.
Put all your marine/gorge/whatever specific binds into those files, then use "exec gorge.cfg" to execute your gorge config while playing. You can even bind a key (say, f9) to "exec gorge.cfg" and another key (say, f10) to "exec marine.cfg", then you can easily switch between the two.
Fun times. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> That's exactly how I have it. I was going to tell you how to do it but then I saw that post... so I'll just say nothing now.
Aye, what romano said. You could bind a key to evolve to the desired form and <i>then</i> execute the config; then, whenever you evolved, you'd activate the right bind set. One problem, though, is that it wouldn't reset when you died. You'd have to press your Skulk button when you respawned (the evolve command would be ignored, but the config would still be executed).
Woot, found the google cache for that scripting site. But all the links go to the original, you have to manually go to each cached page. <a href='http://216.239.39.104/search?q=cache:Rj-_0I8137QJ:half-life.gamehelp.com/console/' target='_blank'>http://216.239.39.104/search?q=cache:Rj-_0...lp.com/console/</a>
devicenullJoin Date: 2003-04-30Member: 15967Members, NS2 Playtester, Squad Five Blue
Yea, it appears that gamehelp.com got bought by someone else, and they weren't nice enough to leave the scripting page up.. why dont you save each page to your hd, and get rid of the annoying yellow, then zip it and send it to me <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> That would be a good thing to save <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Yeah, you can do that, it's not too hard either. I am not sure what the command for an rt is but I think it's an impulse command. So all you would do is bind in this case, r to "impulse x; +reload". The gorge doesn't use reload and the marines don't use that impulse command, therefore you can bind both commands to one key and they will both function when you are a marine and when you're an alien.
Btw, you can make binds to case sensitive characters. In buyscripts for counter strike, I'd use it a lot. You can bind shift with an alias so when pushed, it will bind all the keys on the keyboard to something different and when you let go, it will rebind all the keys back to the way they were.
i think the best answer would be the idea about .cfg's thats how i do it i like to have a lot of marine hot keys, skulk hotkeys and gorge hotkeys. so i have a config.cfg with bind "f9" "jointeamone;wait;exec rine.cfg;wait" . . . then bind ins "ev_goge;wait;exec gorg.cfg"
ev_gorge and jointeamone are aliases.
only problem with this is when you die you need to re exec skulk.cfg so bind some obscure key like f5 as exec skulk.cfg. this way you can have a different keybinding for every alien and 1 for marine too.
Yup thats how I do it too, except I use alias' <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--> alias "marine" "jointeamone; exec marine.cfg" bind "f2" "marine"
alias "fade" "impulse x; exec fade.cfg" bind "x" "fade"
a_civilianLikes seeing numbersJoin Date: 2003-01-08Member: 12041Members, NS1 Playtester, Playtest Lead
edited November 2003
<!--QuoteBegin--Ic3Man+Nov 12 2003, 08:35 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Ic3Man @ Nov 12 2003, 08:35 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->I was just wondering if it is possible to make your binds class sensetive. For example: if i was gorg then the "r" would build an rt and if im an marine then the "r" would reload my weapon.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> For your example, you could simply do bind r "+reload; wait; -reload; impulse 90" ("+reload; impulse 90" might work; I'm not sure how +commands are handled when there are other commands bound to the same key)
However, that approach only works if the commands you are binding are exclusive to the class you want to use them with (as they are in your example; gorges cannot reload, and marines cannot place resource chambers).
<!--QuoteBegin--Dead_Dan+Nov 12 2003, 08:35 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Dead_Dan @ Nov 12 2003, 08:35 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Btw, you can make binds to case sensitive characters. In buyscripts for counter strike, I'd use it a lot. You can bind shift with an alias so when pushed, it will bind all the keys on the keyboard to something different and when you let go, it will rebind all the keys back to the way they were. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Along with this idea of holding shift and pressing keys to get different binds, you can do the same thing when caps lock is on or off.
In TFC, the clan that I'm part of sent us scripts to allow us to comunicate with greater efficiency. When caps lock was turned on, we would say "I am now on offense", and the keys we had bound to a specific message would be set to offensive commands, i.e. when we press f1, we would say "Going for enemy flag". Likewise, when caps lock was off, we'd automatically say "I'm on defense", and if we hit f1 we would say "I am defending the flagroom". When we changed class, it would say "I am now a (insert class here)".
Although it does take some work to set up all of this, and NS would be a bit different to script for, it becomes very helpful in game.
The bad thing about impulse commands is that impulse x as alien will do something different for a marine...not all the time but sometimes.
I personally would like to see an NS scripting forum setup so that I can help out with these questions a lot faster than trolling around all the forums when I am bored at work.
Yes, you can do that. I seem to recall reading somewhere that it wasn't encouraged though and was generally a bad idea. I'll see if I can dig that up where it explains how and why.
Yeah, I can't find it.
A scripting forum would be cool but given the general attitude towards scripting around here I don't think it would go over well. Depending on who you ask you'll hear that even changing your config at all beyond the ingame menus is a bannable offense.
<!--QuoteBegin--MadcapMagician+Nov 13 2003, 09:08 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MadcapMagician @ Nov 13 2003, 09:08 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Yes, you can do that. I seem to recall reading somewhere that it wasn't encouraged though and was generally a bad idea. I'll see if I can dig that up where it explains how and why. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Because if it fubars, lag, something, your binds could get stuck :/
you guys all seem to be pointing in the same direction what most of you are talking about is meta-binding a good example is this: suppose all your keys are bound except ctrl now you bind ctrl like this alias +switchbinds "exec newcfg.cfg" alias -switchbinds "exec cfg.cfg" bind ctrl +switchbinds
this script lets you do things like ctrl+z does something different than just z, can be very useful. i have been scripting HL for a little over 4 years now 8) i dunno if anyone remembers Oct@gon, but he was the man
anyways back to the original post, you can definately have r be different for 2 different things, and you have a choice of how you want to go about doing it
you can use meta-binding (i personally dont use it, cause i need that many scrpits ever) you can set it up using 2 cfg's and just switch between the 2 with one button you can use 2 cfgs with 2 different buttons you can have 1 cfg, then have a button that toggles what 'r' is used for. the only thing is that it requires another buttton
outta all these options, for just one rebind, i would choice the last one, but if u have more than more bind you change, then think about the 2nd or 3rd.
hope this helps
if you need more scripting help, i can definately help, just email me.
I use a toggle that cycles through all the different setups I have. I've bound it to keypad +. So I press it once and I'm in marine mode, press it again and I'm in fade mode, etc. As soon as a mode is activated it rebinds the keys appropriately. Seems to work pretty well. Use echo to make sure you know what you have active.
A basic toggle is something like:
alias "mode1" "do_something;bind x mode2" alias "mode2" "do_something2;bind x mode3" alias "mode3" "do_something3;bind x mode1"
Comments
This is probably possible (e.g. Commander's hotkeys), but I am unsure if there is a simple bind command to do it.
I rebind a lot of my keys depending on class.
Best start learning about HL scripting if thats what you want to do.
console binding is stored in an array in caps, so bining is not case senstive, if it was and u hit caps lock, insted of tab, u would wonder why your keys did not work.
u have 101 keys (about) that u can bind, cosider that.
my binds
f9 - jointeamone ( Rine)
f10 - jointeamtwo (Kahraa)
f11 - givepoints (sv_cheats res hack)
f12 - addbot (add 1 rcbot)
b - kill (before i get devoured)
MadCap, maybe you can point him in the direction of knowledge. =P
And actually you can do some neat stuff with alt+keys and control+keys or any other button so you aren't actually limited to 104 (or whatever your keyboard has) keys but this of course takes more scripting and is kind of not the best idea since it's more of a hack (in the coding work-around sense, not OMG H4X sense).
Edit
I'd love to point you in the right direction but unfortunately the greatest online guide to HL scripting is no longer available on the web as of about a month ago. Google searching might find you some tutorials (or maybe a cache of the once great guide, in which case let me know). You might have success just finding scripts and using them to learn, some people are good at that. PM me if you have any questions or want any other help.
Put all your marine/gorge/whatever specific binds into those files, then use "exec gorge.cfg" to execute your gorge config while playing. You can even bind a key (say, f9) to "exec gorge.cfg" and another key (say, f10) to "exec marine.cfg", then you can easily switch between the two.
Fun times.
Put all your marine/gorge/whatever specific binds into those files, then use "exec gorge.cfg" to execute your gorge config while playing. You can even bind a key (say, f9) to "exec gorge.cfg" and another key (say, f10) to "exec marine.cfg", then you can easily switch between the two.
Fun times. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
That's exactly how I have it.
I was going to tell you how to do it but then I saw that post... so I'll just say nothing now.
<a href='http://216.239.39.104/search?q=cache:Rj-_0I8137QJ:half-life.gamehelp.com/console/' target='_blank'>http://216.239.39.104/search?q=cache:Rj-_0...lp.com/console/</a>
That would be a good thing to save <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Btw, you can make binds to case sensitive characters. In buyscripts for counter strike, I'd use it a lot. You can bind shift with an alias so when pushed, it will bind all the keys on the keyboard to something different and when you let go, it will rebind all the keys back to the way they were.
thats how i do it
i like to have a lot of marine hot keys, skulk hotkeys and gorge hotkeys.
so i have a config.cfg
with bind "f9" "jointeamone;wait;exec rine.cfg;wait"
.
.
.
then
bind ins "ev_goge;wait;exec gorg.cfg"
ev_gorge and jointeamone are aliases.
only problem with this is when you die you need to re exec skulk.cfg
so bind some obscure key like f5 as exec skulk.cfg.
this way you can have a different keybinding for every alien and 1 for marine too.
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
alias "marine" "jointeamone; exec marine.cfg"
bind "f2" "marine"
alias "fade" "impulse x; exec fade.cfg"
bind "x" "fade"
etc
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
Just remember not to use capital letters ( bind D "fade" won't work if you just press d).
For your example, you could simply do
bind r "+reload; wait; -reload; impulse 90"
("+reload; impulse 90" might work; I'm not sure how +commands are handled when there are other commands bound to the same key)
However, that approach only works if the commands you are binding are exclusive to the class you want to use them with (as they are in your example; gorges cannot reload, and marines cannot place resource chambers).
Along with this idea of holding shift and pressing keys to get different binds, you can do the same thing when caps lock is on or off.
In TFC, the clan that I'm part of sent us scripts to allow us to comunicate with greater efficiency. When caps lock was turned on, we would say "I am now on offense", and the keys we had bound to a specific message would be set to offensive commands, i.e. when we press f1, we would say "Going for enemy flag". Likewise, when caps lock was off, we'd automatically say "I'm on defense", and if we hit f1 we would say "I am defending the flagroom". When we changed class, it would say "I am now a (insert class here)".
Although it does take some work to set up all of this, and NS would be a bit different to script for, it becomes very helpful in game.
I personally would like to see an NS scripting forum setup so that I can help out with these questions a lot faster than trolling around all the forums when I am bored at work.
alias capson rebind
alias rebind rebindA rebindB
alias rebindA bind r '<drop res tower>'
I don't know, it's been forever since I've done scripting.
Yeah, I can't find it.
A scripting forum would be cool but given the general attitude towards scripting around here I don't think it would go over well. Depending on who you ask you'll hear that even changing your config at all beyond the ingame menus is a bannable offense.
Because if it fubars, lag, something, your binds could get stuck :/
Please someone of power let us know what the official word on scripts is going to be.
Either they are good, they are bad, or it is still in the grey area (depends on scripts)...
what most of you are talking about is meta-binding
a good example is this:
suppose all your keys are bound except ctrl
now you bind ctrl like this
alias +switchbinds "exec newcfg.cfg"
alias -switchbinds "exec cfg.cfg"
bind ctrl +switchbinds
this script lets you do things like ctrl+z does something different than just z, can be very useful. i have been scripting HL for a little over 4 years now 8) i dunno if anyone remembers Oct@gon, but he was the man
anyways
back to the original post, you can definately have r be different for 2 different things, and you have a choice of how you want to go about doing it
you can use meta-binding (i personally dont use it, cause i need that many scrpits ever)
you can set it up using 2 cfg's and just switch between the 2 with one button
you can use 2 cfgs with 2 different buttons
you can have 1 cfg, then have a button that toggles what 'r' is used for. the only thing is that it requires another buttton
outta all these options, for just one rebind, i would choice the last one, but if u have more than more bind you change, then think about the 2nd or 3rd.
hope this helps
if you need more scripting help, i can definately help, just email me.
A basic toggle is something like:
alias "mode1" "do_something;bind x mode2"
alias "mode2" "do_something2;bind x mode3"
alias "mode3" "do_something3;bind x mode1"
Then make sure you:
bind x mode1