I'm sick of trying to get my rocket jumps accurate enough to actually jump places, that I'm left trying to jump instead of killing the enemy.

This would be helpful in Half Life 2 too. As they have the same engine, doing something in one should be the same in the other, right?

How can I bind a series of keys to a single button?

  • Try, try and try again. Building skill need time and patience. Scripting is not satisfying as learning to do manually. – Drake Jul 7 '10 at 22:40
  • I take it you mean Half-Life 2. Half-Life and Team Fortress 2 don't share the same engine. TF2 has the same engine as HL2, the Source engine. Half-Life, and Team Fortress Classic, use the GoldSrc engine. Just so you know. – user56 Jul 7 '10 at 22:41
  • Sorry, it was neigh on 6am when I posted that. I thought HL was synonymous with HL2. Altered. – glasnt Jul 7 '10 at 23:06

You need an alias. Create a file called autoexec.cfg in your Steam\steamapps\YOUR_ALIAS_HERE\team fortress 2\tf\cfg and add the following:

//Rocket Jump
alias +rocketjump "+jump;+duck;wait;+attack"
alias -rocketjump "-jump;-attack;wait;wait;wait;-duck"
bind mouse2 "+rocketjump"

Change mouse2 to your desired key. You can do so much with scripting, this is just one example. Check out the TF2 Wiki for more.

  • Since this is a soldier-specific script, you might consider storing this in soldier.cfg (which executes every time you choose Soldier during a game) rather than autoexec.cfg (which executes every time you change classes). – Austin Mohr Apr 13 '14 at 19:59


in steam right-click on tf2, press "OPTIONS", click on Set Launch Options then type -console. Start TF2, press `~then type

alias +hop "+jump;+duck;wait;+attack"

alias -hop "-jump;-attack;wait;wait;wait;-duck"

bindKeytobind "+hop""-hop"

  • I do not recommend storing gameplay scripts in launch options. There are class-specific configuration files for this purpose. – Austin Mohr Apr 13 '14 at 19:57
  • 1
    @AustinMohr It's not being set in launch options. The launch option is just to enable the console. – MrPyber May 21 '14 at 7:04
  • My mistake. In that case, I believe one can enable the developer console from the Advanced Options menu in-game. – Austin Mohr May 21 '14 at 17:40
  • @AustinMohr I dd know that but for me when I do it that way it is unreliable, so I just did it this way. – MrPyber Jun 30 '14 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.