/r/tf2scripthelp

Photograph via snooOG

Come here to learn how to write scripts for the game Team Fortress 2. Please don't post anything except content related to scripting. To request scripts, check out r/TF2Scripts.

Disable stylesheet (beta)


The /r/NewToTF2/ of /r/Tf2Scripts

Lines starting with four spaces are treated like code. You can format your scripts here by highlighting your entire script and pressing tab.

Bind to crouchjump:

alias +crouchjump "+jump; +duck; spec_mode"
alias -crouchjump "-jump; -duck"
bind space +crouchjump

Reset all binds:

exec config_default

Reset all cvars: steam://runsafe/440


Make sure to read the rules before posting. Read the Rules

If you're new in town, start here.

Request a script

New to scripts? Ask a question! Ask a question

Script got you stumped? Get help! Get help

Show off your work. Submit a script

If it's 2D and on your screen, it's not a script. Get HUD help

  • Tutorials
  • Reference
  • Example Scripts
  • Closed Captions
  • Hitsounds
  • All pages
  • FAQ/Help!
  • Related
    • Request scripts there
  • /r/TF2HUDs
    • For all your HUD needs
  • /r/Sprays+TF2Sprays
    • An assortment of sprays
    • Also take requests
  • /r/MannWorkshop
    • Maps, models and skins
  • /r/TF2Developers
    • External tools for TF2
  • /r/TF2Files
    • Sprays, hitsounds, skins

    /r/tf2scripthelp

    932 Subscribers

    1

    any way to modify/change things about the voiceline menu?

    so a while ago, i got a script to only have to press C,V, or B depending on which voicelines wanted from each voiceline menu, but now i want to see the voicemenus when i press one of the buttons.

    and that should be quite easy (but i'll take suggestions for how to do it), except since im not choosing one of the options, im just press the buttons, so it will only go away after a couple seconds. ik this isn't that much of an issue, but if anyone knows how to modify the voice menu's timer or make it go away when i say the voiceline, it's be greatly appreciated.

    here's the voiceline script for anyone who wants it/wants it for suggestions:

    //===========Concise Voicemenu===============
     
        //keys
     
        bind ctrl resetcvm // Change the mouse4 to any key you want to use to reset your key-combination.
        bind c vc_0 //first voice menu, z by default
        bind v vc_1 //second voice menu, x by default
        bind b vc_2 //third voice menu, c by default
     
     
     
        //voice menu 0
        alias vc_0_0 "voicemenu 0 0;resetcvm"
        alias vc_0_1 "voicemenu 0 1;resetcvm"
        alias vc_0_2 "voicemenu 0 2;resetcvm"
        alias vc_0_3 "voicemenu 0 3;resetcvm"
        alias vc_0_4 "voicemenu 0 4;resetcvm"
        alias vc_0_5 "voicemenu 0 5;resetcvm"
        alias vc_0_6 "voicemenu 0 6;resetcvm"
        alias vc_0_7 "voicemenu 0 7;resetcvm"
     
        //voice menu 1
        alias vc_1_0 "voicemenu 1 0;resetcvm"
        alias vc_1_1 "voicemenu 1 1;resetcvm"
        alias vc_1_2 "voicemenu 1 2;resetcvm"
        alias vc_1_3 "voicemenu 1 3;resetcvm"
        alias vc_1_4 "voicemenu 1 4;resetcvm"
        alias vc_1_5 "voicemenu 1 5;resetcvm"
        alias vc_1_6 "voicemenu 1 6;resetcvm"
        alias vc_1_7 "voicemenu 1 7;resetcvm"
     
        //voice menu 2
        alias vc_2_0 "voicemenu 2 0;resetcvm"
        alias vc_2_1 "voicemenu 2 1;resetcvm"
        alias vc_2_2 "voicemenu 2 2;resetcvm"
        alias vc_2_3 "voicemenu 2 3;resetcvm"
        alias vc_2_4 "voicemenu 2 4;resetcvm"
        alias vc_2_5 "voicemenu 2 5;resetcvm"
        alias vc_2_6 "voicemenu 2 6;resetcvm"
        alias vc_2_7 "voicemenu 2 7;resetcvm"
     
        //voicemenusubsets
        //vc0
        alias vc0_02 "alias vc_0 vc_0_0; alias vc_1 vc_0_1; alias vc_2 vc_0_2"
        alias vc0_35 "alias vc_0 vc_0_3; alias vc_1 vc_0_4; alias vc_2 vc_0_5"
        alias vc0_67 "alias vc_0 vc_0_6; alias vc_1 vc_0_7; alias vc_2"
        //vc1
        alias vc1_02 "alias vc_0 vc_1_0; alias vc_1 vc_1_1; alias vc_2 vc_1_2"
        alias vc1_35 "alias vc_0 vc_1_3; alias vc_1 vc_1_4; alias vc_2 vc_1_5"
        alias vc1_67 "alias vc_0 vc_1_6; alias vc_1 vc_1_7; alias vc_2"
        //vc2
        alias vc2_02 "alias vc_0 vc_2_0; alias vc_1 vc_2_1; alias vc_2 vc_2_2"
        alias vc2_35 "alias vc_0 vc_2_3; alias vc_1 vc_2_4; alias vc_2 vc_2_5"
        alias vc2_67 "alias vc_0 vc_2_6; alias vc_1 vc_2_7; alias vc_2"
     
        //General Bindings
        alias vm0 "alias vc_0 vc0_02; alias vc_1 vc0_35; alias vc_2 vc0_67"
        alias vm1 "alias vc_0 vc1_02; alias vc_1 vc1_35; alias vc_2 vc1_67"
        alias vm2 "alias vc_0 vc2_02; alias vc_1 vc2_35; alias vc_2 vc2_67"
     
        //initiate
        alias initz "vm0; voicemenu 0"
        alias initx "vm1; voicemenu 1"
        alias initc "vm2; voicemenu 2"
        alias resetcvm "alias vc_0 initz; alias vc_1 initx; alias vc_2 initc"
        resetcvm
    0 Comments
    2024/11/03
    16:06 UTC

    1

    How to impove my current autoexec?

    My autoexec right now is very unorganized and some commands don't even work.

    mat_specular 0

    mat_bumpmap 1

    sv_allow_point_servercommand always

    cl_mute_all_comms 0

    voice_enable 1

    fps_max 500

    viewmodel_fov 90

    tf_use_min_viewmodels 1

    bind "KP_END" "join_class scout"

    bind "KP_DOWNARROW" "join_class soldier"

    bind "KP_PGDN" "join_class pyro"

    bind "KP_LEFTARROW" "join_class demoman"

    bind "KP_5" "join_class heavyweapons"

    bind "KP_RIGHTARROW" "join_class engineer"

    bind "KP_HOME" "join_class medic"

    bind "KP_UPARROW" "join_class sniper"

    bind "KP_PGUP" "join_class spy"

    bind k "kill"

    bind j "explode"

    bind q "+attack3"

    tf_use_min_viewmodels 1

    cl_cmdrate 66

    cl_interp 0

    cl_interp_ratio 2

    cl_lagcompensation 1

    cl_pred_optimize 2

    cl_smooth 0

    cl_smoothtime 0.01

    cl_updaterate 66

    rate 60000

    hud_combattext_batching 1

    cl_enable_text_chat 1

    tf_hud_target_id_alpha 255

    tf_hud_target_id_offset 0

    cl_crosshair_file "crosshair7"

    m_customaccel 0

    m_customaccel_max 0

    m_customaccel_scale 0

    m_customaccel_exponent 1

    m_forward 1

    m_filter 0

    m_yaw .022

    m_pitch .022

    m_side .8

    m_mouseaccel1 0

    m_mouseaccel2 0

    m_mousespeed 0

    m_rawinput 1

    1 Comment
    2024/11/02
    17:36 UTC

    1

    Rocket + Flare Jump Script Help

    [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.

    4 Comments
    2024/10/29
    18:04 UTC

    1

    How can i make a +left +right bind for just demo?

    im sure it has something to do with making a demoman.cfg file, but im not sure exactly what to put in there to make it work. im trying to bind m4 and m5 to +left and +right respectively, any help is appreciated

    0 Comments
    2024/10/01
    15:47 UTC

    2

    How do I make a resupply bind that doesn’t change my loadout?

    I’ve been trying to make a resupply bind that doesn’t change my loadout but whenever I press the bind it goes to my first loadout.

    3 Comments
    2024/10/01
    01:11 UTC

    2

    I have an autoexec.cfg, and a reset.cfg, and individual class.cfgs. For some reason my class.cfgs seem to randomly reset, does anyone know why?

    Okay so I have my class .cfgs set up like this:

    exec reset
    [class specific binds]

    For example, in reset.cfg, I have bind g +taunt. But in sniper.cfg, I want to use g for quick Huntsman tauntkill attempts, so I have bind g "taunt 0"

    For some reason, sometimes I'll be playing Sniper, and then my g button will bring up the taunt menu, as if it were set to +taunt instead of "taunt 0". I have to go into console and exec sniper to get it to reset.

    Same thing happens to Engineer. In reset.cfg, I have a certain button set to a "Nice shot" voice command bind home "voicemenu 2 6". But for Engineer, I have it set to bind home "voicemenu 2 7"; this is Engineer's "Good job" voice command, which is unusually quiet, so I use this voice command to mask me moving/building stuff. However for some reason sometimes when I'm in the middle of playing Engi it'll change to the "Nice shot" voice command, as if it went to the reset.cfg, and again I have to go into console and exec engineer to get it to work again. I do not change class or die, it just seems to happen in the middle of a life. I have exec reset at the very beginning of my class.cfgs, so it happens before any class specific rebindsm and no other exec is anywhere else in there.

    For clarity this is the entirety of my sniper.cfg if it helps -

    exec reset
    
    sniper_respawn_default
    
    alias item_preset_a "alias sniper_respawn load_itempreset 0;load_itempreset 0"
    alias item_preset_b "alias sniper_respawn load_itempreset 1;load_itempreset 1"
    alias item_preset_c "alias sniper_respawn load_itempreset 2;load_itempreset 2"
    alias item_preset_d "alias sniper_respawn load_itempreset 3;load_itempreset 3"
    
    alias sniper_respawn_default ""
    
    bind g "taunt 0"
    
    bind del sniper_respawn

    Has anyone experienced this? Any idea what's up?

    0 Comments
    2024/09/22
    00:47 UTC

    1

    I can't get all 3 configs to run simultaneously, only the null-canceling movement one works Can anyone help me please?

    3 Comments
    2024/09/17
    01:13 UTC

    3

    My Scripts do not seem to be working

    I am running Mastercomfig. I have downloaded the templates from here and the templates are in tf/cfg/ where they belong according to that document.

    I haven't played TF2 or messed around with scripting for it for quite a long time now so it's possible I've forgotten to do something or used an obsolete script that wouldn't function due to changes with how things are done.

    Here is a one of my shorter scripts that is not functioning.

    Echo **Running Heavy**
    
    alias +heavy_shoot "slot1; +attack"
    alias -heavy_shoot "-attack"
    alias +heavy_sandvich "slot2; +attack"
    alias -heavy_sandvich "-attack"
    alias +heavy_melee "slot3; +attack"
    alias -heavy_melee "-attack"
    
    bind mouse1 "+attack"
    bind mouse2 "+attack2"
    bind mouse3 "+heavy_melee"
    bind mwheelup "+heavy_shoot"
    bind mwheeldown "+heavy_secondary"

    Aside from the bindings not functioning the echo command is not printing Running Heavy* when it should be running the script.

    Not only was the script not doing what it should when I switched to playing a different class I was unable to use any of their weapons. I just hit the mouse button to fire and nothing would happen. Am I missing a command that would clear rebound keys between switching classes or something?

    Edit: Me being unable to use my weapons may in fact be a problem I was having with the server I was on. It continued to happen even when I deleted all the scripting leaving the scripts blank. Attempting again with exec config_default in the pre-comfig.cfg file and all other scrips blank to see if resetting everything not effected by Mastercomfig fixes it. I doubt Mastercomfig itself is at fault because other than the heavyweapons.cfg not running everything else was working fine.

    Edit: I have solved the issue with no longer being able to use my weapons by use of exec config_default. Currently still having the issue of my class.cfg files not seeming to function. Will see what I can do about that later in the day.

    3 Comments
    2024/09/15
    03:15 UTC

    1

    Need help, ds processing time exceeded

    Can't join my own server, says "Processing time Exceeded" and doesn't let me join. How can I fix this? Is there a way to change net_chan_limit_msec?

    0 Comments
    2024/09/10
    22:05 UTC

    2

    How do I change my lerp?

    I can't find a tutorial that shows me it with pictures

    5 Comments
    2024/09/04
    00:29 UTC

    3

    Autoexec/Class scripts not working/recognized by the game

    I am using mastercomfig, and on this 3 year old post from this subreddit it said make the execs in tf/cfg/user
    Created a folder named user but it still won't work.

    Besides that, will this work? I have some experience from creating autoexecs in csgo, and I want to hide pyro's flames

    exec autoexec in every class

    Autoexec:
    bind "1" "slot1"
    bind "2" "slot2"
    bind "3" "slot3"
    r_drawviewmodel 1
    
    Pyro:
    exec autoexec
    
    unbind "1"
    unbind "2"
    unbind "3"
    
    alias "flamethrower" "slot1; r_drawviewmodel 0; viewmodel_fov 1"
    alias "flaregun" "slot2; r_drawviewmodel 1; viewmodel_fov 90"
    alias "hammer" "slot3; r_drawviewmodel 1; viewmodel_fov 90"
    
    bind "1" "flamethrower"
    bind "2" "flaregun"
    bind "3" "hammer"
    1 Comment
    2024/09/03
    21:40 UTC

    2

    Need help with spy script!

    Whenever I hit "q" to do a quickswap, it always defaults to sapper and knife. Is there a way to make quickswap work as intended or at the very least swap from pistol to knife?

    This is my spy.cfg.

    unbind mouse1

    exec config
    exec custom

    unbind mouse2
    bind mouse2 +attack2
    bind mwheelup "+jump"
    bind mwheeldown "+jump"
    hud_combattext_batching_window .5
    unbind n

    slot3
    r_drawviewmodel 1
    knife_vm_mode

    // replace [KEY] with the your Keybinds for the sapper♥♥♥♥♥♥♥ambassador/watch

    bind "2" +equip_sap // Key/button for sapper
    bind "3" +equip_knife // Key/button for knife
    bind "1" +equip_amby // Key/button for ambassador
    bind "mouse2" "+watch;spec_prev" // Key for watch (mouse2 default)

    //re-bind mouse1

    alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
    alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
    alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)

    // causes viewmodel to go off or on when you shoot

    alias +viewmodel_knife "+attack;r_drawviewmodel 1;spec_next" // attacks, turns viewmodel on
    alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

    alias +viewmodel_amby "+attack;r_drawviewmodel 0;spec_next" // attacks, turns viewmodel off
    alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

    alias +viewmodel_sap "+attack;r_drawviewmodel 1;spec_next" // shows sapper when sapping
    alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released

    // Equip item, turn vm on/off, set vm toggle for attack

    alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
    alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

    alias +equip_amby "slot1" // Equips amby
    alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

    alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
    alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

    alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
    alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard

    bind Q quickswap

    1 Comment
    2024/08/27
    05:38 UTC

    2

    How can i toggle mouse2 for heavy's minigun?

    I recently enjoyed playing heavy but my right click kinda broke, probably because i been holding it down too hard but it's not entirely broken and i can still click it but it made heavy unplayable since i can't rev up for long periods, can anyone help me to toggle my mouse2 for heavy so i don't have to hold it down and break my mouse even further?

    2 Comments
    2024/08/23
    06:17 UTC

    5

    what ELSE can I do with configs?

    i recently made a post asking about how to fix my config (which you might be able to find cause GODDAMN this sub moves so slow) which got resolved.

    i'll just get to the point, basically the title but im curious what i can/should do with configs. they seem quite helpful, and it could be nice to know my options.

    like i already did a script which skips the engineer's (and for some reason also spy's) PDA'S, so that's nice.

    1 Comment
    2024/08/21
    22:53 UTC

    2

    tf2 crashes after creating autoexec, all the classes, and reset configs

    i have no idea what im doing but i tried doing what one post said (to create autoexec.cfg, all the class ones, etc, etc...) and once i did that the game would just crash once i picked a class. no error warning or anything else, it just closes. i did have this line of code in every single one of them though:

    map_background preload_room; wait 10; disconnect

    i do have things in my custom folder that have to do with viewmodels (like horsie's and all of my classes have viewmodel mods.) can anyone help?

    4 Comments
    2024/08/18
    15:32 UTC

    2

    Is there a script that allows you to hide vie model or change view model using the mouse button?

    I was watching this video and I saw that when he shot out particles from the flame thrower using his mouse button. It changes his fob because it hides the particles and when he releases the button it became normal. How do you get this bind??? The link: https://youtu.be/G7p-NsU9eWw?si=Mve1QVvl3xix-VGP Time stamp: 5:34-5:36

    3 Comments
    2024/08/14
    21:16 UTC

    2

    Script that taunts then teleports in spawn

    Recently in a casual match, in spawn, I saw this demo execute his primary taunt, then halfway though it, teleport to his side and repeat this over and over again. It was honestly pretty funny and I've been trying to replicate it.
    However, I can't seem to get close to the speed that he did it at, which leads me to believe this might be an exploit/external script, does anyone know more about this or know of a way to implement this using the console?

    For reference this is what I came up with:

    alias taunt_spam ts_start
    
    alias ts_start "alias taunt_spam ts_stop; alias ts ts_loop; ts_loop"
    alias ts_stop "alias ts; alias taunt_spam ts_start"
    alias ts_loop "taunt; wait 200; join_class random; wait 109; join_class demoman; wait 192; ts"

    If the latter two wait commands are used with any lower values, the script starts being inconsistent and some taunts might be skipped (tested on local server). The first wait command needs a value of 200 to cutoff the taunt at the correct time.

    2 Comments
    2024/08/10
    17:40 UTC

    1

    config scripts wont work

    i have a config with lots of scripts and aliases and not a single one will work, i put the .cfg files in the cfg directory and .vpks in custom but they never work. it might have something to do with this message i got in the console but im not sure: Steam config directory: D:\steam games\steamapps\common\Team Fortress 2\platform\config

    i would greatly appreciate some help

    8 Comments
    2024/08/07
    23:11 UTC

    1

    Retrying when the server is about to ping kick me

    I use a server which has ping kick and i get kicked due to high ping. The server types message in chat that it is my 10th warning before kicking me. I want to be able to execute retry when it detects the particular message about ping kick. It should be possible i think. Any help is appreciated!

    5 Comments
    2024/08/04
    18:57 UTC

    3

    My bind stopped working Idk why

    sec;prim

    bind 1 "-attack2;slot1;sec;prim"

    bind 2 "-attack2;sec2;prim2;slot2"

    bind 3 "-attack2;sec2;prim2;slot3"

    bind mouse4 "-attack;-attack2"

    alias toggle "enable"

    alias enable "alias toggle disable; +attack2"

    alias disable "alias toggle enable; -attack2"

    alias ptoggle "penable"

    alias penable "alias ptoggle pdisable;+attack"

    alias pdisable "alias ptoggle penable;-attack"

    alias sec "bind mouse2 toggle"

    alias prim "bind mouse1 ptoggle"

    alias sec2 "bind mouse2 +attack2"

    alias prim2 "bind mouse1 +attack"

    I have this script so I can toggle my reving and shooting for heavy.
    After the summer update when I press secondary fire the minigun doesn't rev when I click mouse2. The bind for mouse 2 is literally the same and it doesn't work.

    3 Comments
    2024/07/22
    18:02 UTC

    2

    tf2- spy script help

    is there a way i can make it so when i take out my sapper i can have z,x,c say a custom voicechat line like "tele down push" or something along those lines i saw a vid but it didnt work and i cannot figure it out. but i do have my z,x,c binded to voicelines i just want it to be when i take out my sapper that i can use the team ones that i wrote down myself can anyone help? i am new to tf2

    1 Comment
    2024/06/17
    20:11 UTC

    3

    Script on respawn

    Is there a way to do a script each time you respawn?
    I have a rev toggle and when I respawn it automatically revs because I didn't unrev before death and it's really annoying.

    1 Comment
    2024/05/27
    14:53 UTC

    2

    Help with heavy bind

    alias toggle "enable"

    alias enable "alias toggle disable; +attack2"

    alias disable "alias toggle enable; -attack2"

    alias ptoggle "penable"

    alias penable "alias ptoggle pdisable; +attack"

    alias pdisable "alias ptoggle penable; -attack"

    alias b bind mouse1 ptoggle

    alias d bind mouse2 toggle

    alias c bind mouse1 +attack

    alias e bind mouse2 +attack2

    alias f bind mouse2 "+attack2"

    b;d

    bind 1 "slot1;b;d"

    bind 2 "slot2;c;f"

    bind 3 "slot3;c;e"

    How do I make so after throwing a lunchbox item it uses the slot specific bind?

    2 Comments
    2024/05/23
    00:07 UTC

    2

    My script doesn't work like this should.

    alias autoalt "startalt"

    alias startalt "+attack2;alias autoalt stopalt"

    alias stopalt "-attack2;alias autoalt startalt"

    bind mouse2 "autoalt"

    This is script is supposed to make so I can toggle reving up.
    But instead I can only rev up but not unrev.
    Idk why.

    4 Comments
    2024/05/21
    22:54 UTC

    1

    Any way to make a bind toggle that has different echoes based on the value it toggles to?

    I want a single button to toggle voice_enable, and for it to correctly post in my console that VC is either ON or OFF.

    Is there a way to do that?

    4 Comments
    2024/05/14
    22:35 UTC

    3

    Chat bind for medic also bind for other class.

    i have this medic specific script

    alias Uber_Ready "say_team Ze Uber is zeady my friend; voicemenu 1 7"

    bind t Uber_Ready

    to bind uber ready in chat with the uber charged voiceline but now after i switch to medic it also stay binded for all the other class. Is there a way to make this script specifically only for the medic?

    3 Comments
    2024/04/28
    10:52 UTC

    2

    Issues with overlapping attack commands

    So I've been working on a bit of an unorthodox pyro layout, shown below:

    alias "+flamethrower" "slot1; +attack; viewmodel_fov 0.1"
    alias "-flamethrower" "-attack"
    alias "+airblast" "slot1; +attack2; viewmodel_fov 0.1"
    alias "-airblast" "-attack2"
    alias "+punch" "slot2; +attack; viewmodel_fov 75"
    alias "-punch" "-attack"
    alias "+axe" "slot3; +attack; viewmodel_fov 75"
    alias "-axe" "-attack"
    bind mouse1 "+flamethrower"
    bind mouse2 "+airblast"
    bind mouse4 "+punch"
    bind q "+axe"
    bind 1 "+attack2"             

    Essentially, the idea is to eliminate the need for dedicated weapon switch bindings and have them tied to my attacks directly. So, mouse1 will switch to my flamethrower and attack as soon as possible, mouse2 will switch to my flamethrower and airblast as soon as possible, mouse4 with my secondary, and q with melee. It helps make it easier to be aggressive with degreaser switch speed for how my brain works.

    There's just one problem. If, for example, I am currently pressing mouse4 to fire a flare, but while the button is still pressed, I hit mouse1 to start flaming, I will switch to my primary but not fire until I let go of the button and press it again. It really throws me off when it happens. I could commit to trying to press, release, press and hold, but that defeats the purpose of not having weapon switch binds. I'm wondering if there's any more complicated scripting I could do that would help defeat this problem, or if it's just a skill issue and I need to get used to letting go of one before pressing another.

    2 Comments
    2024/04/20
    05:11 UTC

    2

    My game text and texture are blurry at 1280x600 resolution

    After the 64bits update and the end of dxlevel 80/81, the game texture and in-game texts were completely blurred. Before the update, I played at 1280x600 resolution with -dxlevel 81 in launch options, and the text wasn't blurred, but after this update, it's no longer possible to play at the same resolution without it getting blurry (something that doesn't happen with dx81), however It always happens with any other. I play at 1280x600 resolution due to how it is more "stretched" than other resolutions, and I got used to playing at it a long time ago, so, if possible, I would like to know how I can play at 1280x600, with -dxlevel at 90/95/98, without the texture becoming unreadable. Also, my computer is a potato so keep this in mind. Thank you to everyone who read until the end, I will leave below the commands I use in my autoexec.cfg and launch options.

    launch options> -dxlevel 98 -w 1280 -h 600 -full -noborder -high -novid -console -nohltv -precachefontchars -noquicktime (the game textures and text becomes blurry with this dxlevel)

    my cfg:

    ////////// GUSTIN'S AUTOEXEC 2023-CURRENTLY \\\\\\\\\\
    >>> BINDS <<<
    // FAST SWITCH LOADOUT //
    bind "LEFTARROW" "load_itempreset 0"
    bind "UPARROW" "load_itempreset 1"
    bind "RIGHTARROW" "load_itempreset 2"
    bind "DOWNARROW" "load_itempreset 3"
    tf_respawn_on_loadoutchanges 1
    // EUREKA EFFECT //
    bind "h" "eureka_teleport 0"
    bind "j" "eureka_teleport 1"
    // GENERAL BINDS //
    bind "F3" "say ( ͡° ͜ʖ ͡°)"
    bind "-" "say_team spy base"
    bind "=" "say_team passou spy"
    bind "7" "cl_trigger_first_notification"
    bind "8" "cl_decline_first_notification"
    >>> SETTINGS <<<
    // MOUSE OPTIONS //
    m_rawimput 0
    // SOUND OPTIONS //
    tf_dingaling_lasthit_pitchmaxdmg 100
    tf_dingaling_lasthit_pitchmindmg 100
    tf_dingaling_pitchmaxdmg 100
    tf_dingaling_pitchmindmg 100
    // NETWORK OPTIONS //
    cl_cmdrate 66
    cl_interp 0
    cl_interp_ratio 1
    cl_interp 0
    cl_lagcompensation 1
    cl_pred_optimize 2
    cl_smooth 0
    cl_smoothtime 0.01
    cl_updaterate 66
    rate 60000
    net_compresspackets_minsize 1200
    net_compresspackets 0
    net_graph 1
    // MISC OPTIONS //
    fps_max 0
    fov_desired 90
    viewmodel_fov 95
    hud_fastswitch 1
    cl_autoreload 1
    hud_combattext 1
    hud_combattext_batching 1
    hud_combattext_healing 1
    tf_remember_activeweapon 0
    tf_sniper_fullcharge_bell 1
    tf_simple_disguise_menu 1
    cl_autorezoom 1
    tf_medigun_autoheal 1
    hud_medichealtargetmarker 1
    hud_medicautocallers 1
    hud_medicautocallersthreshold 75
    tf_enable_glows_after_respawn 1
    hud_freezecamhide 1
    tf_spectate_pyrovision 0
    tf_romevision_opt_in 0
    tf_hud_target_id_disable_floating_health 0
    tf_scoreboard_ping_as_text 1
    tf_use_min_viewmodels 1
    tf_spec_xray_disable 1
    cl_jiggle_bone_framerate_cutoff 0
    r_drawtracers_firstperson 0
    cl_hud_minmode 1
    // SHADOWS //
    r_shadowmaxrendered 0
    r_shadowrendertotexture 0
    r_shadows 0
    nb_shadow_dist 0
    // WATER //
    r_waterdrawreflection 0
    r_waterdrawrefraction 1
    r_waterforceexpensive 0
    r_waterforcereflectentities 0
    // RAGDOLLS AND GIBS //
    cl_ragdoll_fade_time 0
    cl_ragdoll_forcefade 1
    cl_ragdoll_physics_enable 0
    g_ragdoll_fadespeed 9999
    g_ragdoll_lvfadespeed 9999
    ragdoll_sleepaftertime 0
    cl_phys_props_enable 0
    cl_phys_props_max 0
    props_break_max_pieces 0
    r_propsmaxdist 0
    // FACIAL EXPRESSIONS //
    r_eyes 0
    r_flex 0
    r_teeth 0
    // PERFORMANCE //
    [mat commands]
    mat_mipmaptextures 0
    mat_compressedtextures 1
    mat_managedtextures 0
    mat_antialias 1
    mat_aaquality 0
    mat_colorcorrection 0
    mat_disable_bloom 1
    mat_disable_fancy_blending 1
    mat_disable_lightwarp 1
    mat_filterlightmaps 1
    mat_filtertextures 1
    mat_forceaniso 0
    mat_hdr_level 0
    mat_autoexposure_max 0
    mat_autoexposure_min 0
    mat_bloomscale 0
    mat_bloom_scalefactor_scalar 0
    mat_debug_postprocessing_effects 0
    mat_debugdepth 0
    mat_postprocessing_combine 0
    mat_non_hdr_bloom_scalefactor 0
    mat_bufferprimitives 1
    mat_framebuffercopyoverlaysize 0
    mat_hdr_enabled 0
    mat_hdr_manual_tonemap_rate 0
    mat_picmip 1
    mat_reducefillrate 1
    mat_reduceparticles 1
    mat_specular 0
    mat_bumpmap 0
    mat_phong 0
    mat_trilinear 0
    mat_motion_blur_enabled 0
    mat_vsync 0
    [r commands]
    r_rimlight 0
    r_worldlights 0
    r_worldlightmin 0.0001
    r_lod -1
    r_rootlod 2
    r_3dsky 0
    r_3dnow 1
    r_ambientboost 0
    r_ambientfactor 0
    r_ambientmin 0
    r_cheapwaterstart 1
    r_cheapwaterend 1
    r_decals 0
    r_dynamic 0 r_entityclips 0 r_flashlightdepthtexture 0
    r_forcewaterleaf 1
    r_lightaverage 0
    r_occlusion
    r_pixelfog 1
    r_propsmaxdist 0
    r_renderoverlayfragment 0
    [other commands]
    fog_enable 0

    1 Comment
    2024/04/19
    05:58 UTC

    2

    How do I show damage only in Hud.

    Basically, I have Quakehud and decided to have my damage number on hud and not on the enemy I am firing (having it in between health and ammo or above ammo counter), but the damage counter on enemy is still on as well as the damage number on hud. Any advice?

    0 Comments
    2024/04/18
    16:58 UTC

    3

    How do I bind specific buttons to crouch jump?

    And not just space. I want to try different keys for crouch jumping, where can I find scripts for this?

    1 Comment
    2024/03/27
    22:43 UTC

    Back To Top