r/Tf2Scripts • • Apr 28 '22

Satisfied [Request] Disable input for certain keys when ctrl is held

6 Upvotes

Hello,

For obs I use ctrl + . and ctrl + , for mute and unmute. Is it possible to not have the . and . buttons bound to change team/class only while ctrl is held?


r/Tf2Scripts • • Mar 10 '22

Question F6 for "record" and then "stop"

6 Upvotes

Hey!Is it possible to make a script that records a demo (named with date) and stops the recording with another F6 press


r/Tf2Scripts • • Oct 08 '21

Resolved Is there a script that when I switch to primary the r_drawviewmodel goes to 0 and when I switch back to secondary,tertiary goes back to Normal?

6 Upvotes

I use Q to switch between slot2 and slot1 and E to switch to melee


r/Tf2Scripts • • Sep 01 '21

Question Some scripts.

6 Upvotes
  1. Medic mask script. (Fake uber)

  2. Auto "uber used" in chat when you press m2.

  3. Bind Q to eat sandvich.

  4. When u press the loadout switch (f1,f2,f3,f4) I want it so it says by pressing go and such to say "switching to uber or kritz."


r/Tf2Scripts • • Aug 30 '21

Resolved Trying to make a quake-like jump sound, i discovered +jump is broken.

6 Upvotes

What the title says: (using Mastercomfig btw)

I've made a diceroll script, so that everytime i press SPACE, it would play a random voiceline and jump.

This is the diceroll script, in autoexec.cfg

//random jump sound (6 entries)

alias random "random1"

alias random1 "wait; alias diceroll dice6; random2"

alias random2 "wait; alias diceroll dice5; random3"

alias random3 "wait; alias diceroll dice4; random4"

alias random4 "wait; alias diceroll dice3; random5"

alias random5 "wait; alias diceroll dice2; random6"

alias random6 "wait; alias diceroll dice1; random"

alias dice_disabletimer "alias random"

alias dice_enabletimer "alias random random1; random"

alias dice_timerfix "dice_disabletimer; dice_enabletimer"

random

so far, so good, as expected the sound plays properly (the dice[n]s are in class configs)

so then, i bound Space to "+jump; diceroll", and noticed it would play the sound twice: at key press and key release. (if i replaced the diceroll with echo test i would get "test [random number]" in console, both on key press and key release)

so, i decided to invert the order: "diceroll; +jump", which made the sound play once, but broke my jump.

while i'm not new to scripting, i've never had this happened, i tried searching up and saw suggestions of people using a +alias, but that also didn't work


r/Tf2Scripts • • Aug 23 '21

Answered Is There Still A Bind To Turn Around A 180 Without The "Wait" Command?

6 Upvotes

Title;
I haven't been able to find a bind to do a simple 180 and turn back with just holding or pressing a button, not one i can use, since they require the "wait" command.

I'd like to have it due to my sensitivity being extremely low, and i'm just too fond of it.


r/Tf2Scripts • • Aug 17 '21

Question Struggling To Setup Engineer Binds

6 Upvotes

Hey all,

I'm just looking to setup some binds to instantly make sentries, teleporters etc. for Engineer. I 'm using a guide from 6 years ago [https://www.youtube.com/watch?v=CbgURrb1dEo]. I didn't have a file named 'engineer.cfg' so I figured I could just make one in my .cfg folder but it isn't seeming to work.

Any tips on how to fix this?


r/Tf2Scripts • • Jul 25 '21

Script How do I toggle transparent viewmodel

6 Upvotes

I am making a hud with four different types of viewmodel normal, min, none, and transparent and I want all to be on toggle is there a way to make the transparent viewmodel be on toggle


r/Tf2Scripts • • Jul 21 '21

Question Spin script toggle bind?

6 Upvotes

I would like to spin left for eternity, never stopping with the press of the 9 key. THEN stop spinning when I press the 9 key again.

Can u help me with this script?

Thank you.


r/Tf2Scripts • • Jul 07 '21

Request M2 for crouch for soldier only script

6 Upvotes

Hi guys,

I need a little help with scripting. I want to use M2 for crouch only for solider class but normal functions for other classes.

I would appreciate it so much if someone can help me out with this please.


r/Tf2Scripts • • Jun 27 '21

Request Ultra Crouch Jump Script

6 Upvotes

Just wondering if you it would even be possible to make a all in one script that includes:

holding ctrl to keep crouching without uncrouching

Bhoping by holding the space bar
toggle crouch jump on or off (to be used with the bhop script)
turning off the bhop script for scout, and as such making him only able to crouch jump cause he cant bhop

making it not clunky and easy to use

its a really far stretch so i dont have my hopes up high but if there is any place it could be done it would be here


r/Tf2Scripts • • Jun 09 '21

Question How do I order commands in scripts?

6 Upvotes

An issue I often face when making scripts is that I have no idea how to order the commands. I typically order ±aliases like this:

alias +posalias <stuff>
alias -posalias <stuff>
<cmds>

and in timed sequences of commands it's easy to order them.

However when it comes to core and advanced commands, I have no idea how to order them. As is the case with mat_savechanges and other material cvars, the order does make a difference sometimes.


r/Tf2Scripts • • May 01 '21

Question How can I improve my binds (and their layouts)?

6 Upvotes

So I have made a ton of binds (linked here) for my config with this recursive bind-voicemenu system that's seems to be working alright. Unfortunately it feels like I have to look at the display to select a bind, and my body feel slow at selecting a bind. (NOTE: You need my CmdMenuGenerator to make these binds.)

The neccessary script code to use my binds:

// main
bind c +open_mmenu
alias +open_mmenu0 "exec $cmenu_root"
alias -open_mmenu0 "alias -open_mmenu -open_mmenu1; alias +open_mmenu +open_mmenu1"
alias +open_mmenu1 "cmenu.exitmenu"
alias -open_mmenu1 "alias -open_mmenu -open_mmenu0; alias +open_mmenu +open_mmenu0"
-open_mmenu1
// nav mesh editing
bind v +open_navmenu
alias +open_navmenu0 "exec $cmenu_nav_mesh_editor"
alias -open_navmenu0 "alias -open_navmenu -open_navmenu1; alias +open_navmenu +open_navmenu1"
alias +open_navmenu1 "cmenu.exitmenu"
alias -open_navmenu1 "alias -open_navmenu -open_navmenu0; alias +open_navmenu +open_navmenu0"
-open_navmenu1

alias cmenu.on_cmenu_exit "-open_mmenu1; -open_navmenu1"
// Class specific page
alias ac.cs_page "cmenu.exitmenu; cmenu.on_cmenu_exit"

r/Tf2Scripts • • Apr 29 '21

Answered how to put a custom sensitivity only to sniper?

6 Upvotes

also whats a reccomend sensitivity


r/Tf2Scripts • • Apr 25 '21

Question Can i copy paste config.cfg into reset.cfg?

6 Upvotes

Im lazy lol


r/Tf2Scripts • • Apr 03 '21

Request Looking to change sniper scope settings

6 Upvotes

Is it possible to make it so holding left click will scope in and releasing it will unscope? im used to this control scheme and the default click to scope click again to unscope is throwing me off.


r/Tf2Scripts • • Mar 25 '21

Question Mouse bind toggle help

6 Upvotes

(I am using mastercomfig)

So I have my ALT key as my toggle key (for example, pressing e normally will call for medic but ALT+e will call for an ubercharge)

For my medic.cfg file, I want to have it where pressing mouse2 will pop uber normally, but ALT+mouse2 will teamsay that I used an uber according to my loadout slot.

I've had problems with this where it would continue to hold down attack2 when I press mouse2 once. Another problem I had was where it wouldn't say in teamchat at all.

This is what I have now.

What I want to achieve:

- have mouse2 behave normally

- have ALT+mouse2 teamsay whichever uber I pop, according to my loadout slot (as a medic)

- have num1 thru 4 change my loadout and prep ALT+mouse2 to teamsay appropriate uber

I'm also concerned with my mouse3 bind in my "autoexec" file

This might have a similar problem and can probably fix it with whatever solution I get for medic.cfg

Thanks for looking through my problem!


r/Tf2Scripts • • Mar 21 '21

Request How to Give Myself Any Item on Any Class in Offline Mode

Thumbnail self.tf2scripthelp
6 Upvotes

r/Tf2Scripts • • Mar 15 '21

Request Making non-original rockets come from center of the screen

6 Upvotes

In soundsmith's recent 500k qna video he talks about a concept for an original jumper at 12:53. He mentions how you can do something similar with configs. How?


r/Tf2Scripts • • Mar 07 '21

Not Scripting Colored Chat Messages

6 Upvotes

I've been wondering how you can type coloured in chat in tf2I know this is a really old post, but I've seen people still do it without being admins/mods on servers where only admins/mods can do it : https://www.reddit.com/r/Tf2Scripts/comments/29apaj/how_do_people_do_colored_chat_in_tf2_example/Supposedly it's an invisible character followed by hexcode, but I can't seem to find out how/where it is. Also it's supposedly [BEL] in Notepad++, but I can't seem to get it. If anyone knows where I can copy it or something please tell me.
Ps: Sorry if my english is bad.


r/Tf2Scripts • • Feb 02 '21

Answered i am very dumb

6 Upvotes

i keep typing quit in console and that doesnt save my demo can i just
alias quit ,,stop;quit''
?


r/Tf2Scripts • • Jan 10 '21

Impossible Automatically unscope after shooting the classic?

6 Upvotes

I've been trying to make a script that automatically unscopes after I fire a scoped shot with the classic. This is made complicated by a different script for the classic that I've been using called "classic toggle", which makes it so that instead of holding and releasing mouse1 to shoot, you just click mouse1 to start charging and then click again to shoot. The classic toggle script that I've been using looks like this:

bind mouse1 charge
bind "MWHEELUP" "-attack; slot1; bind mouse1 charge" //Binds mouse1 to "charge" so you can use the one-click Classic script.
bind "MWHEELDOWN" "-attack; slot2; bind mouse1 +attack" //Rebinds mouse1 to "+attack" so you can use SMGs normally.
bind "e" "-attack; slot3; bind mouse1 +attack" //Rebinds mouse1 to "+attack" so you can use melees normally.

alias charge "+attack; bind mouse1 fire"
alias fire "-attack; bind mouse1 charge"

I'm sorry that this script has binds inside of alias's, I copied it off GameBanana and can't figure out how to fix it. I'm also using Mastercomfig if that matters.


r/Tf2Scripts • • Jan 04 '21

Answered Variable?

6 Upvotes

Hello! Is there a way to store a variable in a tf2 script? Help would be greatly appreciated. Due to my current script setup, my binds do not carry over classes. This interferes with the script people helped with me here before (link here). Again, help would be appreciated!


r/Tf2Scripts • • Dec 26 '20

Issue Sensitivity script almost working, minor help needed

6 Upvotes

I'm currently making a sensitivity change script for soldier.

I play on 2.2 sens as scout and 4.375 on soldier and I want to be able to use a shotgun.

I made a script that changes sensitivity depending on the weapon I'm holding, but I'm running into a minor problem. Below is my script and underneath that is my problem. Thank you :)

sensitivity 4.375

-- shotgun script --

alias "weaponone" "slot1;MW1;sensitivity 4.375"

alias "weapontwo" "slot2;sensitivity 2.2"

alias "weaponthree" "slot3;MW2;sensitivity 4.375"

bind 1 weaponone

bind 2 weapontwo

bind Mouse5 weapontwo

bind 3 weaponthree

bind 4 slot4

bind 5 slot5

bind q lastinv

alias Q1 "weaponthree"

alias Q2 "weaponone"

alias MW1 "bind q Q1"

alias MW2 "bind q Q2"

weaponone

So far, everything works properly.

Except: When I press 2 or mouse 5 and I take out my shotgun, the q switch is fucked.

2 / mouse 5 -> primary

then when i press 2 / mouse5 -> melee

-> is when I press q. It rotates from primary and melee every time I press q. I want to pull out primary everytime when i press q while holding shotgun. How do I fix this?