Question About Binds

Ic3ManIc3Man Join Date: 2003-02-23 Member: 13875Members
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.

Comments

  • GlissGliss Join Date: 2003-03-23 Member: 14800Members, Constellation, NS2 Map Tester
    <!--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.
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    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.
  • amckernamckern Join Date: 2003-03-03 Member: 14249Members, Constellation
    no u can't

    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)
  • typical_skeletontypical_skeleton Join Date: 2003-02-24 Member: 13944Members
    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
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    edited November 2003
    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.
  • romanoromano Join Date: 2002-11-02 Member: 4296Members
    ...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.
  • 2_of_Eight2_of_Eight Join Date: 2003-08-20 Member: 20016Members
    <!--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.
  • UzguzUzguz Join Date: 2003-06-05 Member: 17016Members, Constellation
    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).
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    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>
  • devicenulldevicenull Join Date: 2003-04-30 Member: 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-->
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    That would also take hours, and i'm not even sure if all the pages are there.
  • TeiohTeioh Canadia Join Date: 2002-11-20 Member: 9453Members, Constellation
    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.
  • BenaiahBenaiah Join Date: 2003-11-11 Member: 22517Members
    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.
  • MMZ_TorakMMZ_Torak Join Date: 2002-11-02 Member: 3770Members
    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"

    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).
  • a_civiliana_civilian Likes seeing numbers Join Date: 2003-01-08 Member: 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).
  • GrimmGrimm Join Date: 2003-04-13 Member: 15448Members
    <!--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.
  • Robert_PaulsonRobert_Paulson Join Date: 2003-07-29 Member: 18543Members
    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.
  • Ic3ManIc3Man Join Date: 2003-02-23 Member: 13875Members
    i want to thank u guys for replying.
  • uranium_235uranium_235 Join Date: 2002-11-20 Member: 9478Banned
    edited November 2003
    I think you could make it so you press 'shift' and it rebinds certain keys, then releasing 'shift' will revert them. Something like:

    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.
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    edited November 2003
    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.
  • uranium_235uranium_235 Join Date: 2002-11-20 Member: 9478Banned
    <!--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 :/
  • Ic3ManIc3Man Join Date: 2003-02-23 Member: 13875Members
    some impulses like impulse 7 (Follow me/Chuckle) is used by both races. how does the system know which race is using it at that moment?
  • Robert_PaulsonRobert_Paulson Join Date: 2003-07-29 Member: 18543Members
    Scripts are your friend...

    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)...
  • StingSting Join Date: 2003-03-23 Member: 14806Members
    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.
  • MadcapMagicianMadcapMagician Join Date: 2003-04-07 Member: 15265Members, Constellation
    edited November 2003
    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"

    Then make sure you:
    bind x mode1
Sign In or Register to comment.