melee swap keybind.

Discussion in 'Team Fortress 2 Talk' started by YM, Apr 28, 2010.

  1. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    So I thought to myself one day "how can I streamline my weapon switching?" I set about creating myself some binds. Unfortunately I lost the first set of binds at some point when I had to redownload TF2. But after rebuilding them I ended up with a better system. so yay for me.

    Here is what I did:

    • Q no longer acts as previous weapon, but a primary/secondary slot
    • Every time 1, 2 or q is pressed the "current weapon" is stored and swapped to
    • On the surface, 1 and 2 have had no change in function and Q's only change is that it omits melee totally
    • The previously unused shift key, as well as 3 is now bound as a melee swap button
    • When 3/shift is pressed it swaps between the stored current weapon and the melee weapon

    How is this faster? well I was never really good at hitting the number keys whilst playing and q/shift are much easier to hit and when I came to do this I was literally gob-smacked that shift wasn't bound to anything already. At the time I was playing a lot of medic, healing then quickly being able to swap to my ubersaw was handy, pressing 3 was ok but then I had to think about which button to use to get back to healing (medigun seems logical as the medic's primary weapon, but its not, its slot2) so one goal was I needed an accessible button to get me a quick jab at a scout and then healing again asap. Then the primary/secondary weapon swap key came out of that, I can swap in the same manner to the needlegun and back with less thought about which buttons to press.

    The code:
    Code:
    alias primary "slot1; bind q secondary; alias cur slot1; bind shift 
    meleetoggle; bind 3 meleetoggle"
    alias secondary "slot2; bind q primary; alias cur slot2; bind shift 
    meleetoggle; bind 3 meleetoggle"
    alias current "cur; bind shift meleetoggle; bind 3 meleetoggle"
    alias meleetoggle "slot3; bind shift current; bind 3 current"
    bind 1 "primary"
    bind 2 "secondary"
    bind 3 "meleetoggle"
    bind q "primary"
    bind shift meleetoggle
    I might even bind the buttons on the pistol grip of my falcon to these too. I hope at least one other person finds these useful :)
     
  2. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,557
    A decade of playing FPS shooters, most significantly Half-Life and TFC have hard coded 1234567 weapon switching as reflexes for me. If i'm feeling exotic i'll use the mouse roller button, one cog piece movement and a click gets me to the next weapon in a fraction of a second and i don't have to sacrifice mobility by using my left hand. Shift is usually sprint but TF2 doesn't have a sprint feature so...

    This seems more complicated than what i'm doing already but if it works for you then, well well done for something that works for you.
     
  3. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    Scroll wheel works fine for me. Anyway I have Q bound to crouch. :p
     
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,768
    Positive Ratings:
    5,508
    I have mine like so...

    Code:
    alias invswap invswap2
    alias invswap1 "invprimary; alias invswap invswap2; alias invmelee invmelee3"
    alias invswap2 "invsecondary; alias invswap invswap1"
    alias invmelee invmelee3
    alias invmelee3 "invtertiary; alias invmelee invmelee2; alias invswap invswap1"
    alias invmelee2 "invsecondary; alias invmelee invmelee3"
    bind mouse4 invswap
    bind mouse5 invmelee
    What it does is make mouse4 always swap between primary and melee, and mouse5 swap between secondary and melee. When switched to melee each button gets 'reset' to bring out primary/secondary.

    The invprimary, invsecondary, invtertiary aliases are defined directly to weapon commands on a per-class basis, like this.
    Code:
    alias invprimary "use tf_weapon_rocketlauncher; use tf_weapon_rocketlauncher_directhit"
    alias invsecondary "use tf_weapon_shotgun_soldier; use tf_weapon_buff_item"
    alias invtertiary "use tf_weapon_shovel"
    This allows for two things. Bypassing "slot" commands means those damnable sourcemod votes never interfere with weapon switching. For medic I can easily define medigun as primary as far as my switching commands are concerned, even though the game puts it in slot 1.
     
  5. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    I have mouse wheel up for slot1, down for slot2, and hold mouse4 for constant melee (like l4d).
     
  6. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,492
    fixed^

    and mouse 5 for whatever else there is... build and disguise? I think engineers destroy is the only thing I don't access with the mouse.

    No fancy swapping, just one button for each slot.
     
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    Is there a way I could change my bindings so that the scroll wheel just cycles through weapons 1-3? Because that's my biggest problem. When there's only three weapons every one is just a flick away, but any more than that and I start fumbling. (I used to have it set to wheelup=1, wheeldown=2, E=3, Q=4, and wheelclick=5, and F=call for medic because I was used to it being the heal key in Bioshock. Eventually I decided I was wasting buttons and went back to defaults, but now I hate playing Engineer.)
     
  8. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,768
    Positive Ratings:
    5,508
    Code:
    alias inv1 "slot1; alias invup inv2; alias invdown inv3"
    alias inv2 "slot2; alias invup inv3; alias invdown inv1"
    alias inv3 "slot3; alias invup inv1; alias invdown inv2"
    alias invup inv2
    alias invdown inv3
    bind mwheelup invup
    bind mwheeldown invdown
    That should do it. If it goes the 'wrong' way, just reverse the wheel binds.
     
    • Thanks Thanks x 1
  9. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    It's extremely useful for when you are playing medic competitively to get a fast ubersaw on something and immediately switch back to your medigun to use the uber you just got.
     
  10. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    Sweet. Now I just have to figure out how to stop it from automatically resetting my keybindings whenever it syncs with the Steam Cloud.
     
  11. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,557
    Set your config file to read only should do it.
     
  12. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    Or put it in your autoexec
     
  13. Jimmy

    Jimmy L7: Fancy Member

    Messages:
    421
    Positive Ratings:
    222
    I use my mouse for switching weapons. Mouse wheel up is slot one, mouse wheel down is slot 2, and mouse 3 is melee. I have a mouse 4 and 5 buttons now, but both disguises and building is bound to my numpad, so I shall bind them to voice spams :D
     
  14. Passerby

    Passerby L2: Junior Member

    Messages:
    99
    Positive Ratings:
    15
    i use a pretty different setup

    q will only switch between primary and secondary, mouse 5 will switch melee and start hitting if i hold it down, when the melee is out mouse 1 will bring back my primary and q will pull out my secondary.

    and the olny other real difference is that i use shift for crouch not control