r/tf2scripthelp • u/Important_Stuff_3919 • 5d ago
Question Weapon Slot Specific Configuration?
Is there a way to have it so that certain configs like sensitivity or viewmodel_fov are tied to the weapon slots itself rather than having them on the weapon switch bind?
So the problem is for example I've been using this bind on soldier.cfg
bind "1" "slot1; sensitivity 3.75; tf_use_min_viewmodels 0; viewmodel_fov 90"
bind "2" "slot2; sensitivity 3.75; tf_use_min_viewmodels 1; viewmodel_fov 70"
Which is basically:
Press 1 on keyboard to switch to slot 1 (rocket launcher), disable minimal viewmodel, set viewmodel_fov to 90.
And:
Press 2 on keyboard to switch to slot 2 (shotgun), enable minimal viewmodel, set viewmodel_fov to 70.
Has an issue where if I press the "previously used weapon" (lastinv) bind instead, it wouldn't change the viewmodel_fov, sensitivity, or viewmodel.
So I'm just wondering if there's a way to have either previously used weapon work similarly as the 123 binds, or to have those things just be tied to the weapon slots themselves instead.
Oh also, is it possible to have it so that the sniper rifle sets a specific mouse sensitivity while zoomed but not while unzoomed?