r/tf2scripthelp • • Jan 22 '14

Issue Need help with Script and [SM]

2 Upvotes
bind home playsound
alias playsound playsound1
alias playsound1 "sm_play @all vo/test_two.wav"
alias playsound2 "sm_play @all vo/spy_jaratehit03.wav"
bind shift +toggleState
alias +toggleState "alias playsound playsound2"
alias -toggleState "alias playsound playsound1"

I'm not really sure if you guys will be able to help with this, but I'm trying to create a script that allows multiple binds on one key, so that a different command is executed when Shift is held down. This works in essence, but when using this, SM will read the filepath as "vo\test_two.wav ", and etc, with the extra space on the end, thus rendering the script useless. I don't know why this is happening, any help would be appreciated.


r/tf2scripthelp • • Jan 17 '14

Answered Don't use tags in the title, your post will be tagged automatically after you submit. Delete this message

2 Upvotes

How to stop console command/or script Well, i have created a tiny, ultra tiny little script that starts to record everything that has been put into the console, using con_logfile xxx.log ,this script may only run when you activate it with a button, that works to, but now i want to let it stop running at the moment you press another button/or the same button again, but i cant find any console command that stops con_logfile or stops a script(i even have read that a script cannot be stopt from running when activated)... is there a solution for this?


r/tf2scripthelp • • Jan 12 '14

Resolved Problem with Chris's medic cfg

2 Upvotes

Hi!

I have been using Chris's med cfg for the past few days and it worked perfectly fine. Now I reinstalled TF2, put the same codes again, but when I switch weapons, they are not firing or doing anything at all. If I press the appropriate buttons on my mouse, it still brings them up, but I'm unable to heal/crossbow/etc. with it.

What should I do now?


r/tf2scripthelp • • Jan 08 '14

Resolved Crosshair color flash script help needed.

2 Upvotes

Hello everybody. I've been getting some trouble with a certain script I was trying to make recently. I guess most of you guys know stabby stabby's crosshair color flash script - so, basically I was trying to get a little more fancy and wanted to make it so that you don't only switch from color to color upon changing directions, but also when switching to another slot and then change directons aswell. To be a little more accurate I want to have a certain set of colors bound to each slot, f.i.: On my primary I tried having blue, purple, magenta when moving. On my secondary yellow, orange, red, etc. However, as it turned out it didn't work out too well for me so far. Whenever I switch to slot1, the colors don't change whatsoever and on slot3 my forward key is bound to move backwards for reasons unknown, slot2 works perfectly fine though.

Here's my progress so far:

////////////////////////////////////////////////////////////////////////////////////
//=========================================================

unbind "MWHEELUP"
bind "MWHEELUP" "viewmodel_fov 0;slot1;sensitivity 1.0;bind MOUSE1 +fwone;bind MOUSE2 +bwone;bind a +mrone;bind d +mlone"

alias +fwone "-back;+forward;alias checkfwd +forward;slotonecolor"
alias -fwone "-forward;checkback;alias checkfwd none;slotonecolor"
alias checkfwd none

alias +bwone "-forward;+back;alias checkback +back;slotonecolor"
alias -bwone "-back;checkfwd;alias checkback none;slotonecolor"
alias checkback none

alias +mrone "-moveright;+moveleft;alias checkleft +moveleft;slotonecolor"
alias -mrone "-moveleft;checkright;alias checkleft none;slotonecolor"
alias checkleft none

alias +mlone "-moveleft;+moveright;alias checkright +moveright;slotonecolor"
alias -mlone "-moveright;checkleft;alias checkright none;slotonecolor"
alias checkright none

alias none ""

alias slotonecolor "slotonecolora"
alias slotonecolora "cl_crosshair_blue 153; cl_crosshair_green 0; cl_crosshair_red 76;alias slotonecolor slotonecolorb"
alias slotonecolorb "cl_crosshair_blue 153; cl_crosshair_green 0; cl_crosshair_red 153;alias slotonecolor slotonecolorc"
alias slotonecolorc "cl_crosshair_blue 76; cl_crosshair_green 0; cl_crosshair_red 153;alias dotxhaircolor slotonecolora"

//=========================================================
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
//=========================================================

unbind "MOUSE4"
bind "MOUSE4" "viewmodel_fov 0;slot2;sensitivity 1.0;bind MOUSE1 +fwtwo;bind MOUSE2 +bwtwo;bind a +mrtwo;bind d +mltwo"

alias +fwtwo "-back;+forward;alias checkfwd +forward;slottwocolor"
alias -fwtwo "-forward;checkback;alias checkfwd none;slottwocolor"
alias checkfwd none

alias +bwtwo "-forward;+back;alias checkback +back;slottwocolor"
alias -bwtwo "-back;checkfwd;alias checkback none;slottwocolor"
alias checkback none

alias +mrtwo "-moveright;+moveleft;alias checkleft +moveleft;slottwocolor"
alias -mrtwo "-moveleft;checkright;alias checkleft none;slottwocolor"
alias checkleft none

alias +mltwo "-moveleft;+moveright;alias checkright +moveright;slottwocolor"
alias -mltwo "-moveright;checkleft;alias checkright none;slottwocolor"
alias checkright none

alias none ""

alias slottwocolor "slottwocolora"
alias slottwocolora "cl_crosshair_blue 153; cl_crosshair_green 0; cl_crosshair_red 0;alias slottwocolor slottwocolorb"
alias slottwocolorb "cl_crosshair_blue 153; cl_crosshair_green 76; cl_crosshair_red 0;alias slottwocolor slottwocolorc"
alias slottwocolorc "cl_crosshair_blue 153; cl_crosshair_green 153; cl_crosshair_red 0;alias slottwocolor slottwocolora"

//=========================================================
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
//=========================================================

unbind "MWHEELDOWN"
bind "MWHEELDOWN" "viewmodel_fov 0;slot3;sensitivity 1.0;bind MOUSE1 +fwthree;bind MOUSE2 +fwthree;bind a +mrthree;bind d +mlthree"

alias +fwthree "-back;+forward;alias checkfwd +forward;slotthreecolor"
alias -fwthree "-forward;checkback;alias checkfwd none;slotthreecolor"
alias checkfwd none

alias +fwthree "-forward;+back;alias checkback +back;slotthreecolor"
alias -fwthree "-back;checkfwd;alias checkback none;slotthreecolor"
alias checkback none

alias +mrthree "-moveright;+moveleft;alias checkleft +moveleft;slotthreecolor"
alias -mrthree "-moveleft;checkright;alias checkleft none;slotthreecolor"
alias checkleft none

alias +mlthree "-moveleft;+moveright;alias checkright +moveright;slotthreecolor"
alias -mlthree "-moveright;checkleft;alias checkright none;slotthreecolor"
alias checkright none

alias none ""

alias slotthreecolor "slotthreecolora"
alias slotthreecolora "cl_crosshair_blue 76; cl_crosshair_green 153; cl_crosshair_red 0;alias slotthreecolor slotthreecolorb"
alias slotthreecolorb "cl_crosshair_blue 0; cl_crosshair_green 153; cl_crosshair_red 76;alias slotthreecolor slotthreecolorc"
alias slotthreecolorc "cl_crosshair_blue 0; cl_crosshair_green 153; cl_crosshair_red 153;alias slotthreecolor slotthreecolora"

//=========================================================
////////////////////////////////////////////////////////////////////////////////////

I have a nonmovement cancel script added in aswell, hope it ain't too confusing to read, sorry. And yes, I have M1 and M2 bound to move around (I'm weird like that). I'd sincerely appreciate any kind of help (also, this is my first actual post, I hope I did everything correctly)!


r/tf2scripthelp • • Jan 06 '14

Answered What is that crosshair people use on Sniper and Amby Spy?

2 Upvotes

Question I'm not sure how to describe it, but I drew a picture. http://i.imgur.com/n4jPhSY.png Like, what's it called and where can I find a download link?


r/tf2scripthelp • • Jan 01 '14

Resolved Engi mini to shotgun toggle isn't fully working

2 Upvotes
bind mouse1 "+attack_swap"
bind 4 "build 2 0; alias weapon_swap 'slot1; r_drawviewmodel 0;'"
bind 5 "build 0 0; alias weapon_swap 'slot1; r_drawviewmodel 0;'"
bind 6 "build 1 0; alias weapon_swap 'slot1; r_drawviewmodel 0;'"
bind 7 "build 1 1; alias weapon_swap 'slot1; r_drawviewmodel 0;'"
bind 8 "destroy 2 0; r_drawviewmodel 1" // destroy sentry
bind 9 "destroy 0 0; r_drawviewmodel 1" // destroy dispenser
bind - "destroy 1 0; r_drawviewmodel 1" // destroy teleporter enterance
bind = "destroy 1 1; r_drawviewmodel 1" // destroy teleporter exit
alias weapon_swap
alias +attack_swap "+attack"
alias -attack_swap "-attack; weapon_swap; alias weapon_swap"
bind 1 "slot1; r_drawviewmodel 0;"
bind 2 "slot2; r_drawviewmodel 1;"
bind 3 "slot3; r_drawviewmodel 1;"

This isn't working the way it should, in that it's not swapping to slot 1 once I place down the thing I'm building. Anyone know what I can do to fix it?


r/tf2scripthelp • • Dec 30 '13

Answered How to delete a script?

2 Upvotes

Alright, tf2 is pretty messed up.

I didn't have a spy.cfg file, so I made one successfully. I applied a script to disable spy primary viewmodel, but the script also disabled all other classes primary viewmodels. I knew what I did wrong, but I deleted my spy.cfg config in hopes of deleting the script. It didn't work, I tried remaking a spy.cfg file and applying a new script that would fix the other errors but it still didn't work, the first script still was applied.

In a last ditch effort, I deleted my tf folder and verified the integrity of the cache in hopes of getting a fresh start, but it didn't work either.

This is getting very frustrating, how do I permanently delete a script?


r/tf2scripthelp • • Dec 28 '13

Resolved +attack stuck on after switching weapons whilst firing, please help!

2 Upvotes

Here's my config, it was partly written by a friend, but I've edited it since then because it didn't work. Its a bit of a frankenstein's monster:

defaultcfg

// villds new brilliant cfg that asa wont understand
unbind mwheeldown
unbind mwheelup

IPST1

bind 2 "r_drawviewmodel 0;slot2;m1attack;bind mouse4 +useuber;bind mouse2 medatt"
bind 3 "r_drawviewmodel 0;slot1;m2attack;unbind mouse4;bind mouse1 medibind"
bind 4 "r_drawviewmodel 1;slot3;m2attack;unbind mouse4;bind mouse1 medibind"
bind v "+voicerecord"

alias m1attack "bind mouse1 +attack"
alias m2attack "bind mouse2 +attack"
alias medibind "r_drawviewmodel 0;slot2;m2attack;m1attack;bind mouse4 +useuber;bind mouse2 medatt"
alias medatt "randomvvoice; spec_prev"
alias chargefaked "say_team >>>*FAKING CHARGE*<<<"

bind "t" chargefaked
bind mouse2 +attack	
cl_crosshair_scale 0

medibind

// radar
bind mouse3 +medradar
alias "+medradar" "hud_medicautocallersthreshold 300"
alias "-medradar" "hud_medicautocallersthreshold 75"
    
// uber
bind mouse4 "+useuber"
alias +useuber "dropitem;+attack2;chargeused"
alias -useuber "-attack2"

alias ChargeUsed "say_team >>>*UBER DEPLOYED*<<<"

bind 8 "FWDspawn"
bind 0 KRITZ
bind 9 MEDIGUN
alias MEDIGUN "IPST1;alias FWDspawn IPST2"
alias KRITZ "IPST3;alias FWDspawn IPST4"

alias ipst1 "load_itempreset 0;alias FWDspawn IPST2"
alias ipst2 "load_itempreset 1;alias FWDspawn IPST1
alias ipst3 "load_itempreset 2;alias FWDspawn IPST4"
alias ipst4 "load_itempreset 3;alias FWDsaawn IPST3"

I think problem occurs when I switch to my syringe gun, fire it, then switch back to my medi gun without reloading. When the bug happens I can't switch my healbeam to anybody else, and when I switch back to my syringe gun it doesn't stop firing. I believe the problem can also occur when I'm using my melee, and then switch to the medi gun - however it's hard to replicate by myself though. It tends to happen in matches at the worst possible time.

If +attack is on I can normally fix it by switching to my syringe gun, then clicking the mouse2 until my gun reloads, although I could be wrong - I tend to switch to my syringe gun and spazz out until it stops firing.

I really like my config, but this bug can be crippling in matches. Any help solving the issue or cleaning up my cfg would be greatly appreciated :)


r/tf2scripthelp • • Dec 27 '13

Answered Help with my amby script? New and confused

2 Upvotes

http://tf2.gamebanana.com/scripts/5445 What exactly would this script do? I know it would decrease fov to make it easier to snipe with my amby, but I'm unsure of how much much it would decrease it by, and what it would revert it to. Also, how do I make it work? Do I just put "exec (cfg name here) into the autoexec? Thanks :D also, if someone could recommend some other useful spy scripts, or a better amby zoom script, that would be very appreciated.


r/tf2scripthelp • • Dec 14 '13

Archived I'd like to make a script so I can scroll through the engineer weapons without the PDAs.

2 Upvotes

I tried making one, but it wouldn't work. I'm on mobile and can't show it to you. Could anyone tell me how to do it?


r/tf2scripthelp • • Dec 09 '13

Resolved I put a script in to my spy config, now it does it for all classes

2 Upvotes

Thanks in advance


r/tf2scripthelp • • Nov 22 '13

Answered Help with Medic scripts, I can't find medic.cfg

2 Upvotes

When I try to use Medic scripts for ÜberCharges, autocall and autohealing options, I can't find the files medic.cfg. Same for other classes.

Questions:

  1. Do I need to create .cfg for every class?

  2. IMPORTANT. What other files do I need?

  3. What is the right folder to save my customs?

  4. Can you help me with a script to display a message when I'm charged, when I deploy and when I'm faking it? Or a hint to create it by myself.

Thanks.


r/tf2scripthelp • • Nov 16 '13

Answered How would I make my script class-preset specific?

2 Upvotes

I like my scripts on one of my Engineer Presets, but no so much on the other ones. How would I make it so my script only affected preset A?


r/tf2scripthelp • • Nov 15 '13

Answered What is the name of the heavy .cfg file?

2 Upvotes

I have all my class .cfg files with exec reset in them, but the only one that doesn't work is the heavy. I had it named heavy.cfg but that is clearly wrong. What is the proper name for the file?


r/tf2scripthelp • • Nov 14 '13

Answered Engie Auto-Build sentry help?

2 Upvotes

Would this work for building the sentry? And If I pressed it again would it destroy it? If not could you explain how I could.

bind F "build 2; say_team Building Sentry; destroy 2"


r/tf2scripthelp • • Nov 02 '13

Answered looking for command to switch vaccinator resist types

2 Upvotes

i thought it was +attack3, but that seems not to be working for me at all. i even tried switching back to the stock HUD and binding "special attack" in the game options, but nothing i do will switch the resist types, not even typing "+attack3" in the console. if anyone knows if they changed the command name / this is just some random bug with the new update, your input is greatly appreciated. relevant parts of my script would be

bind KP_PLUS +attack3

i don't know if this script i was testing would've caused an issue, but here it is.

//vacinator resist on key //original concept by /u/Kairu927 | see https://gist.github.com/kbrougham/7090528 for their script

alias b2e 				"+attack3; alias +bres; alias +eres e2f; alias +fres e2f"
alias e2f 				"+attack3; alias +bres f2b; alias +eres; alias +fres f2b"
alias f2b 				"+attack3; alias +bres b2e; alias +eres b2e; alias +fres"

alias +bres				""
alias -bres				"-attack3"
alias +eres				"e2f"
alias -eres 			"-attack3"
alias +fres				"e2f"
alias -fres 			"-attack3"

alias bres_reset		"alias +bres; alias +eres e2f; alias +fres e2f"
alias eres_reset		"alias +bres f2b; alias +eres; alias +fres f2b"
alias fres_reset		"alias +bres b2e; alias +eres b2e; alias +fres"

alias +modify 			"alias ubres bres_reset;	alias ueres eres_reset;	alias ufres fres_reset"
alias -modify			"alias ubres +bres;			alias ueres +eres;		alias ufres +fres"
-modify

with binds

bind 1 ubres
bind 2 ueres
bind 3 ufres
bind shift +modify

edited for spelling


r/tf2scripthelp • • Oct 30 '13

Resolved +attack3 not changing Vaccinator resistance type

2 Upvotes

I've been using Chris's Competitive Medic Configs for a while now, but it hasn't been updated since 2011. I've been trying to bind +attack3 for when I use the Vaccinator, but while the bind has been successful (it shows properly in the options menu and when doing bind "]" in the console), the Vaccinator doesn't actually switch resistances when I use it. I've tried putting the bind into medic.cfg along with Chris's medic config, putting the bind into autoexec.cfg, and changing the bind in-game using the options menu.


r/tf2scripthelp • • Aug 12 '13

Answered Changing Views when Spectating

2 Upvotes

Hi, just a quick question.

By default, when you are spectating somebody (Like while you're waiting to respawn), if you press space you can alternate between First-person and third-person view.

I rebound 'space' to another command (Crouch jumping) and now when I press space while spectating, it does nothing.

How can I make it so that I can also alternate between spectating views as well as Crouch-Jumping?

I know that I need to bind 'Space' to it, but I dont know which command I need (I can't find it anywhere).

Thanks in advance


r/tf2scripthelp • • Aug 06 '26

Issue Eureka effect script stops working after I restart game

1 Upvotes

I use the default solar light script where B is for Spawn room and Shift+B is for tele exit. It works after I input the script, but stops working after I restart the game, and I have to redo the whole script. I don't get it. My other scripts work just fine


r/tf2scripthelp • • Jan 05 '26

Issue Need help solving a minor issue on a custom pyro weapon switch script

1 Upvotes

About a year ago, I made this post asking for help with unwanted -attack inputs, and u/Stack_Man was kind enough to throw together a solution involving alias commands, shown below.

//Keep track of how many buttons are held by calling addHeld or subHeld
alias +primary "slot1; +attack; addHeld"
alias -primary "maybeCancelAttack; subHeld"

alias +secondary "slot2; +attack; addHeld"
alias -secondary "maybeCancelAttack; subHeld"

alias +melee "slot3; +attack; addHeld"
alias -melee "maybeCancelAttack; subHeld"

//Only cancel the attack if an alias indicating less than two buttons are being held was called
alias maybeCancelAttack "cancelAttack"
alias cancelAttack "-attack"
alias dontCancelAttack ""

//Re-alias on every press/release to keep track of how many buttons are being held
alias addHeld "oneHeld"
alias subHeld "zeroHeld"

//Called by addHeld/subHeld to to change whether -attack should be called
//And updates add/sub held to enable the counting
alias zeroHeld "alias addHeld oneHeld"
alias oneHeld "alias maybeCancelAttack cancelAttack; alias addHeld twoHeld; alias subHeld zeroHeld;"
alias twoHeld "alias maybeCancelAttack dontCancelAttack; alias addHeld threeHeld; alias subHeld oneHeld"
alias threeHeld "alias subHeld twoHeld"

bind mouse1 "+primary"
bind mouse4 "+secondary"
bind q "+melee"

For the most part it's been working excellently. It allows me to, for example, hold M4 to shoot fire, and then while still holding M4, start holding M1 to swap and shoot a flare as soon as possible.

However, there is one unnecessary interaction that is kind of annoying. If I'm holding M2 to airblast, and then start holding down M4 to shoot fire, it just spams airblast, and catches me off guard and messes with my gameplay.

I'd appreciate some help in getting this kink ironed out. Thank you in advance.


r/tf2scripthelp • • Dec 24 '24

Issue Help I don’t know how to make this a press and hold and not a toggle pls help

1 Upvotes

Zoom in as any class. The script I’m using is. Bind “t” “zoomi1” Bind “y” “zoomi2”

alias “zoomi2 “zoomin” alias “zoomi1” “zoomout” alias “zoomin” “fov_desired 70; view model_fov 65; sensitivity 4” alias “zoomout” “fov_desired 90; viewmodel_fov 100; sensitivity 4”


r/tf2scripthelp • • Dec 22 '24

Question Last Weapon Used

1 Upvotes

So as a lot of people know the taunt menu does not have a marked bind to cancel the taunt menu, however as some people also know "Last Weapon Used" is the bind that is used to cancel the taunt menu, When I enter (bind "q" "lastinv") in my script I make sure that I save the text file and make sure it is on read only, I boot up TF2 right and it shows up that it is bound to "Last Weapon Used" and q is bound, However when I queue into a tf2 casual match it disappears and it is no longer bound, am I doing something wrong here?


r/tf2scripthelp • • Oct 29 '24

Issue Rocket + Flare Jump Script Help

1 Upvotes

[I use Mastercoms and have all 9 "class.cfgs" and the "autoexec.cfg" in the //Overides folder]

So I recently learned about scripts and had a ton kf fun customizing viewmodels and binds and all sorts of shit.

However I have a few problems with the current rocket jump script I have. Allow me to elaborate.

I use this script to allow me to rocket jump with the simple push of a button.

| alias +rocketjump "+jump; +duck; wait; +attack"

| alias -rocketjump "-jump; -attack; wait; wait; wait; -duck"

| bind "mouse3" "+rocketjump"

This is where the complications start. Yesterday I would tell you I had no problems and was perfectly fine with this.

Until I realized that, after I swap off Soldier, this bind stays on all the other classes.

Which is a problem considering I want a script for Detonator Jumping on the Pyro. I believe that all the same inputs are necessary, but with an additional input of holding m2 so that the detonator instantly pops after firing, sending me flying farther in my desired direction.

I feared these two binds would conflict with each other, since the Cow Mangler has an m2 input and I use that weapon.

I also want feedback on if I'm using configs with Mastercomms correctly. From what I read when people want to use configs for that the files should be put in the overides folder.

I believe I have thought of a solution to the Pyro Soldier thing, adding an "unbind m3" to the beginning of the script.

So when I begin on Soldier, my rocket jump only uses M1 to fly. But then when I swap to Pyro, m3 is unbound and rebounded to use both keys and then unbounds again whenever I swap to soldier.

Question 1: How can I stop my Rocket Jump Soldier bind from bleeding into the other classes. (possible solution is to add unbind command in beggingging)

Question 2: Need a Detonator jump script (people said you have to hold down both M1 and M2 so that the flare detonates instantly)

Question 3: Clarify how Mastercom interacts with scripts.

Thanks so much, hopefully I'll see yalls comments in the morning.


r/tf2scripthelp • • Mar 13 '24

Question how do i stop TF2 from creating sound.cache files

1 Upvotes

it keeps screwing up my attempts for custom hitsounds