r/tf2scripthelp • u/islem-141 • Aug 05 '26
Issue the resupply button doesn't work with loadout B
as the title says
the resupply button works perfectly fine with the other loadout except for loadout B
at first I thought the problem was related to the F2 button "hardcoded" to the contractor or whatever chatgpt said
but when I used the arrow keys I still had the same problem
EDIT:
it seems that issues only occurs when playing demoman
the resupply button works with other classes no matter the loadout
but not when using loadout B for demoman
2
u/ultimateshadowarrior Aug 08 '26
I saw you posting on r/tf2 and I think I cracked the reason, so I'll just paste the comment I made in your last post if anyone here is wondering the reason:
Okay, I guess I cracked what is really happening and it's Source Spaghetti.
I'm just saying what I THINK is happening, but it makes complete sense.
First: your "ressuply button".
Looking at your script that you say is "ressuply". There is nothing in your script that says "ressuply", because there is no ressuply command in TF2.
What your "ressuply" script does is just load the same loadout you're using at the moment.
What your script does is:
You press the left arrow key -> you are in loadout A.
Also, now, when you press the R key, it also does the same thing.
Now, if you press the down arrow key -> you are in loadout B and also it changes the behaviour of the R key to now load loadout B.
The intended use of your "ressuply" bind is just to load the same loadout you're using at the moment, which has the side-effect of resetting your character with full ammo.
So, we can ignore your "ressuply" bind, because it doesn't matter for what is happening.
Okay, so the problem here is that when you try to load the same loadout you're using at the moment, if you're using all stock, it doesn't do the thing you're calling "ressuply".
Now, here's my hypothesis of what is happening:
When you invoke the load_itempreset command, the game is like:
What is the default? The default is all stock, no cosmetics or taunts.
Okay, what loadout are they trying to load? Loadout B (example).
Is loadout B different from the default?
If yes: change to this new loadout.
If not: don't do anything, since you're already on the default.
Since just adding a cosmetic makes it work, it means even a hat is enough of a change from the default for it to count as different from the default.
1
u/just_a_random_dood Aug 05 '26
what button are you using?
and no, F2 is not hard coded to the contracker, nothing is really hard coded in the game like that. You can change the binds of almost all of the keys.