// wherever these are bound bind"MOUSE1""+fire1" bind"MOUSE2""+fire2"
// in core.cfg alias +fire1 "+f1" alias -fire1 "-f1" alias +fire2 "+f2" alias -fire2 "-f2"
alias +f1 "+attack" alias -f1 "-attack" alias +f2 "+attack2" alias -f2 "-attack2"
alias +e "alias +e1 +d1; alias -e1 -a1; alias +e2 +d2; alias -e2 -a2" alias -e "alias +e1; alias -e1; alias +e2; alias -e2"
alias +e1 "+d1" alias +d1 "+a1" alias +a1 "+attack; wait 2; +b1" alias +b1 "+c1" alias +c1 "-a1"
alias -e1 "-a1" alias -a1 "-attack; wait 2; -b1" alias -b1 "-c1" alias -c1 "+e"
alias +e2 "+d2" alias +d2 "+a2" alias +a2 "+attack2; wait 2; +b2" alias +b2 "+c2" alias +c2 "-a2"
alias -e2 "-a2" alias -a2 "-attack2; wait 2; -b2" alias -b2 "-c2" alias -c2 "+e"
aliaswait"echo WAIT DISABLED BY HOST; alias wait; exec restricted.cfg" wait
// in restricted.cfg alias +fire1 "+attack" alias -fire1 "-attack" alias +fire2 "+attack2" alias -fire2 "-attack2"
alias +a1 "-attack; -attack2" alias -a1 "-attack; -attack2" alias +a2 "-attack; -attack2" alias -a2 "-attack; -attack2"
// in demoman.cfg exec core.cfg
alias +f1 "alias +c1 +e; alias -c1 +a1; alias +b2 -a2; alias -b2 +a1; alias +d2 -a1; +e1; -e" alias -f1 "alias +c1 -a1; alias -c1 +e; alias +b2 +c2; alias -b2 -c2; alias +d2 +a2; -e1; -e" alias +f2 "alias +b1 -a1; alias -b1 +a2; alias +c2 +e; alias -c2 +a2; alias +d1 -a2; +e2; -e" alias -f2 "alias +b1 +c1; alias -b1 -c1; alias +c2 -a2; alias -c2 +e; alias +d1 +a1; -e2; -e"
The primary and secondary attacks retain functionality when pressed independently but rapidly cycle between them when pressed together. Other classes are unaffected. If the host has disabled the wait command, the script will restore default attack functionality to prevent the client from freezing.
7 years ago:
I cant get this to work, I tried the tuts but they dont cover the restricted.cfg or core.cfg and when I made my own the way I made autoexec none of my guns fire at all. Please help I really love this script =(
7 years ago:
I tried it again, works like a charm. my one gripe is that its a fast fire script for mostly the secondary weapon, thus i bound fire1 and 2 to mouse 5 and 4 respectively, however, i tried adding "slot2" to bind mouse5 +fire1 and it caused a continued fire. meh, i guess ill just have to get used to switching on my owns. otherwise GREAT JOB!
Posted by jmingrao
It seems your script gets into a loop and cannot stop for some reason. even if you type in -attack into console. id love to see that fixed. keep up the good work man.
I corrected a small error in demoman.cfg, but I don't think it is the cause.
I corrected another error that involved the disabling code that caused attack to stick when joining a server where wait is disabled, but I don't think it is the cause either.
It works for me so I'm not sure how to replicate your error. Try this version, and if I doesn't work, let me know what steps you took after joining a server, i.e. which class and in what order you pressed the attack buttons, so I can try to replicate it.