Upvote Upvoted 10 Downvote Downvoted
1 2
What are your favorite scripts?
31
#31
1 Frags +

bind RIGHTARROW "demo_timescale 2"
bind LEFTARROW "demo_timescale 0.5"
bind UPARROW "demo_timescale 1"
bind DOWNARROW demo_togglepause

Super minor, but it saves a few headaches to be able to control demo speed without using the awful UI.

bind RIGHTARROW "demo_timescale 2"
bind LEFTARROW "demo_timescale 0.5"
bind UPARROW "demo_timescale 1"
bind DOWNARROW demo_togglepause

Super minor, but it saves a few headaches to be able to control demo speed without using the awful UI.
32
#32
0 Frags +

I use mwheelup for slot1, mwheeldown for slot2, e for slot3. I made a script that also allowed me to have a viewmodel script and a bind that would switch having viewmodels for primaries and secondaries or not (the "view" aliases) and switching mwheeldown to slot3 and e to slot2 ("switch" aliases). Both commands interacted with the same binds but never reset eachother.
This was not perfect. Especially for roamer/pocket or sniper with smg/cozy camper this could get confusing because I'd have to change class, check what my mwheeldown was bound to and if it was wrong i'd have to press the Switch bind. Made me pull out the escape plan a couple of times instead of a shotgun.

I tried to fix this by finding a workaround for the weapon switch. I wanted my mwheeldown to be "intelligent" and skip slot2 if I didn't have one by using the "invnext" command. The end result worked but if you ever ran out of ammo the script would mess up. So I ended up scrapping the project. I considered the script successful but TF2 itself was too limited. However it was definitely my favorite script to make myself because it was fun working on it. I also hadn't seen anyone attempt to script something like it before which was surprising

//standard weapons (these are regular aliases for using i/j for switching view0/1 and switch2/3 around. In your class cfgs you'd still have to define with which binds the class would start with and the View and Switch aliases also needed to be bound to a key)
alias weapon10 "slot1;r_drawviewmodel 0"
alias weapon11 "slot1;r_drawviewmodel 1"
alias weapon20 "slot2;r_drawviewmodel 0"
alias weapon21 "slot2;r_drawviewmodel 1"
alias weapon30 "slot3;r_drawviewmodel 0"
alias weapon31 "slot3;r_drawviewmodel 1"
alias view1 "alias weapon1 weapon11;alias weapon2 weapon21;bind i view0"
alias view0 "alias weapon1 weapon10;alias weapon2 weapon20;bind i view1"
alias switch2 "bind mwheeldown weapon2;bind e weapon3;bind j switch3"
alias switch3 "bind mwheeldown weapon3;bind e weapon2;bind j switch2"

//invnext weapons (this was the attempt at the invnext script)
//alias weapon10 "slot1;r_drawviewmodel 0;bind mwheeldown weaponx"
//alias weapon11 "slot1;r_drawviewmodel 1;bind mwheeldown weaponx"
//alias weaponx0 "invnext;r_drawviewmodel 0;unbind mwheeldown"
//alias weaponx1 "invnext;r_drawviewmodel 1;unbind mwheeldown"
//alias weapon31 "slot3;r_drawviewmodel 1;bind mwheeldown meleecheck"
//alias viewcheck11 "alias weapon1 weapon11;bind i viewcheck10"
//alias viewcheck10 "alias weapon1 weapon10;bind i viewcheck11"
//alias viewcheckx1 "alias weaponx weaponx1;bind j viewcheckx0"
//alias viewcheckx0 "alias weaponx weaponx0;bind j viewcheckx1"
//alias meleecheck "slot2;unbind mwheeldown"
I use mwheelup for slot1, mwheeldown for slot2, e for slot3. I made a script that also allowed me to have a viewmodel script and a bind that would switch having viewmodels for primaries and secondaries or not (the "view" aliases) and switching mwheeldown to slot3 and e to slot2 ("switch" aliases). Both commands interacted with the same binds but never reset eachother.
This was not perfect. Especially for roamer/pocket or sniper with smg/cozy camper this could get confusing because I'd have to change class, check what my mwheeldown was bound to and if it was wrong i'd have to press the Switch bind. Made me pull out the escape plan a couple of times instead of a shotgun.

I tried to fix this by finding a workaround for the weapon switch. I wanted my mwheeldown to be "intelligent" and skip slot2 if I didn't have one by using the "invnext" command. The end result worked but if you ever ran out of ammo the script would mess up. So I ended up scrapping the project. I considered the script successful but TF2 itself was too limited. However it was definitely my favorite script to make myself because it was fun working on it. I also hadn't seen anyone attempt to script something like it before which was surprising

[quote]//standard weapons (these are regular aliases for using i/j for switching view0/1 and switch2/3 around. In your class cfgs you'd still have to define with which binds the class would start with and the View and Switch aliases also needed to be bound to a key)
alias weapon10 "slot1;r_drawviewmodel 0"
alias weapon11 "slot1;r_drawviewmodel 1"
alias weapon20 "slot2;r_drawviewmodel 0"
alias weapon21 "slot2;r_drawviewmodel 1"
alias weapon30 "slot3;r_drawviewmodel 0"
alias weapon31 "slot3;r_drawviewmodel 1"
alias view1 "alias weapon1 weapon11;alias weapon2 weapon21;bind i view0"
alias view0 "alias weapon1 weapon10;alias weapon2 weapon20;bind i view1"
alias switch2 "bind mwheeldown weapon2;bind e weapon3;bind j switch3"
alias switch3 "bind mwheeldown weapon3;bind e weapon2;bind j switch2"

//invnext weapons (this was the attempt at the invnext script)
//alias weapon10 "slot1;r_drawviewmodel 0;bind mwheeldown weaponx"
//alias weapon11 "slot1;r_drawviewmodel 1;bind mwheeldown weaponx"
//alias weaponx0 "invnext;r_drawviewmodel 0;unbind mwheeldown"
//alias weaponx1 "invnext;r_drawviewmodel 1;unbind mwheeldown"
//alias weapon31 "slot3;r_drawviewmodel 1;bind mwheeldown meleecheck"
//alias viewcheck11 "alias weapon1 weapon11;bind i viewcheck10"
//alias viewcheck10 "alias weapon1 weapon10;bind i viewcheck11"
//alias viewcheckx1 "alias weaponx weaponx1;bind j viewcheckx0"
//alias viewcheckx0 "alias weaponx weaponx0;bind j viewcheckx1"
//alias meleecheck "slot2;unbind mwheeldown"[/quote]
33
#33
-3 Frags +

i woke up on monday after 5 hours of sleep total over the last 72 hrs and i thought i was a javascript script for about an hour

i woke up on monday after 5 hours of sleep total over the last 72 hrs and i thought i was a javascript script for about an hour
34
#34
0 Frags +
PoliphobiasopsRentQNsopsbind q "slot1;slot2;slot1" or something and a resupply bind
I think with "slot1; slot2" you can switch back and forth between your secondary and primary?
No idea what that extra ";slot1" would be good for.

correct
the extra slot1 is there so when you have a melee out and you press q it will go to your slot 1 and not your slot 2

IIRC isn't it a bit more complicated? I made my own way back then and it was something like this:

//weapon switch script
bind q "one"
alias one "slot1;r_drawviewmodel 0; viewmodel_fov 0; bind q two"
alias two "slot2;r_drawviewmodel 1; viewmodel_fov 80; tf_use_min_viewmodels 1; bind q one"
bind e "slot3;r_drawviewmodel 1; viewmodel_fov 80; tf_use_min_viewmodels 1; bind q one"

Slot2;slot1 works perfectly.
You only need your script if you want different viewmodels for slot1 and slot2.
But in that case I'd use
alias "s1" "slot1;r_drawviewmodel 0; viewmodel_fov 0"
alias "s2" "slot2;r_drawviewmodel 1; viewmodel_fov 80"
bind "key" "s2;s1"

I don't like having binds in my aliases.
Makes it harder to change binds, because you have to go into the aliases and chance multiple binds there instead of just changing one bind in the console in-game.

[quote=Poliphobia][quote=sops][quote=RentQN][quote=sops]bind q "slot1;slot2;slot1" or something and a resupply bind[/quote]

I think with "slot1; slot2" you can switch back and forth between your secondary and primary?
No idea what that extra ";slot1" would be good for.[/quote]

correct
the extra slot1 is there so when you have a melee out and you press q it will go to your slot 1 and not your slot 2[/quote]

IIRC isn't it a bit more complicated? I made my own way back then and it was something like this:

//weapon switch script
bind q "one"
alias one "slot1;r_drawviewmodel 0; viewmodel_fov 0; bind q two"
alias two "slot2;r_drawviewmodel 1; viewmodel_fov 80; tf_use_min_viewmodels 1; bind q one"
bind e "slot3;r_drawviewmodel 1; viewmodel_fov 80; tf_use_min_viewmodels 1; bind q one"[/quote]

Slot2;slot1 works perfectly.
You only need your script if you want different viewmodels for slot1 and slot2.
But in that case I'd use
alias "s1" "slot1;r_drawviewmodel 0; viewmodel_fov 0"
alias "s2" "slot2;r_drawviewmodel 1; viewmodel_fov 80"
bind "key" "s2;s1"

I don't like having binds in my aliases.
Makes it harder to change binds, because you have to go into the aliases and chance multiple binds there instead of just changing one bind in the console in-game.
Please sign in through STEAM to post a comment.