Help Wanted
Mapper @ GG Nuts (See All)
Search
Username:
Password:

Register or Reset Password

SUBMISSIONS





Class specific autoreload
Author(s): Dark Applepolisher Sturmeh H
Category: TF2 > Weapon Scripts
Notes/Usage Instructions:

(NOTE: I borrowed and modified Sturmeh/Huster/purplehaz3's fast scout pistol script for inclusion in my autoreload script http://www.fpsbanana.com/scripting/3293)

Some weapons in TF2 respond very well to autoreloading (all shotguns, rocket, gl), while others do not (pistols, flamethrower,ac, etc). This script allows for swapping of weapons and toggling of firemodes so that each weapon can behave desirably.

I tried to make this script as clear and defined as possible to make it very easily modifiable for combination with other scripts. For example, the following aliases.
weapon1a AND weapon2b make up the weapons of a class with an autoreloadable slot1 weapon, but not their slot2. (demoman)
weapon1apis AND weapon2bpis are the same as last, except are made for scout and engineer, to accomodate a modified version of Sturmeh's fast pistol shooting script.
weapon2b AND weapon2a make up the weapons of a class with a non autoreloadable slot1 weapon, but an autoreloadable slot2 weapon. (heavyweapons and pyro)
Soldier ALWAYS autoreloads.
Spy, sniper, and medic NEVER autoreload.

As such, it's fairly easy to modify the script to bind the aliases to different keys instead of using my default "q to swap between primary and secondary weapons"

Cycling q once or twice will fix any potential issues for spawning as a same class that was just using a slot2 weapon before dying. I also leave an "unjam" script on my r button. It doesn't cause the r button to lose ANY of its functionality, but quickly fixes any freak script jam accidents, almost all of which caused by a class change after dying and using a particular firemode. Also useful for adding more "-'s" for any other script you use that may suffer similar problems.

I make ZERO guarantees about functionality when interacting with other scripts, but hopefully you have basic enough script knowledge to know how to combine mine with others.
Script Code:
//ALIASES REQUIRED IN MOST/ALL CLASS CONFIG FILES OR A MASTER CONFIG
alias "+dareload" "-reload; +attack"
alias "-dareload" "-attack; +reload"

bind r unjam
alias unjam "+reload; wait 2; -reload; -attack; -attack2; -attackloop"

//FOR USE IN YOUR DEMOMAN.CFG

bind q "weapon2b"
alias "weapon2b" "slot2; -reload; bind mouse1 +attack; bind q weapon1a"
alias "weapon1a" "slot1; +reload; bind mouse1 +dareload; bind q weapon2b"

//FOR USE IN YOUR ENGINEER.CFG AND SCOUT.CFG

bind q "weapon2bpis"
alias "weapon2bpis" "slot2; -reload; bind mouse1 +attack; bind q weapon1apis; holdfiremode"
alias "weapon1apis" "slot1; +reload; bind mouse1 +dareload; bind q weapon2bpis; -attackloop"

alias holdfiremode bind mouse1 +attackloop
alias "+attackloop" "-reload; wait 5;alias reps +rsse;+rsse"
alias "+rsse" "+attack;wait 3;-rsse"
alias "-rsse" "-attack;wait 3;reps"
alias "reps" "+rsse"
alias -attackloop "alias reps none"

//FOR USE IN YOUR HEAVYWEAPONS.CFG AND PYRO.CFG

bind q "weapon2a"
alias "weapon2a" "slot2; +reload; bind mouse1 +dareload; bind q weapon1b"
alias "weapon1b" "slot1; -reload; bind mouse1 +attack; bind q weapon2a"

//FOR USE IN YOUR SPY.CFG AND MEDIC.CFG AND SNIPER.CFG

bind mouse1 +attack
bind q "select2"
alias select2 "slot2; bind q select1"
alias select1 "slot1; bind q select2"

//FOR USE IN YOUR SOLDIER.CFG

bind mouse1 +dareload
bind q "select2"
alias select2 "slot2; bind q select1"
alias select1 "slot1; bind q select2"
Added: 2 months ago
Feedback (1)
Sturmeh .
Oh dear, i've made quite a mess.Y2M
Posted 2 months ago
I've always hesitated to post my full class config here, because it's pretty much packed with every script.

I also have auto-reload for everything except the spy revolver.
- Oh dear, i've made quite a mess.
Add Feedback
Provide constructive feedback. What is "constructive"?
You must login or register to access this!
Assessment
The community's verdict.
No assessments made... please vote!
You cannot assess yet!
Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this submission register or login.
Stamps
This script in a nutshell...
No stamps recorded
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.
Added by...
Not ranked

[+] Donate
Vote for Submitter
Like this script? Vote Dark Applepolisher . for one or more monthly awards.
You must login or register to access this!
Related Scripts
Want more? Find related scripts.