Pistol Script Help
nIn
Join Date: 2004-09-20 Member: 31826Members
<div class="IPBDescription">Only for people who like scripting</div> Ok,
I know a lot of you frown on scripting. Well I am one of those that don't. So if you can't help with this post please don't post. I know how some people in the community feel about scripting and that is their belief. I am not here to start a war between scripts and non-scripts.
Here is my problem I have this script but I want it to only be active when my pistol is out. I don't want to assign another key to my pistol and is it possible?
alias +pscript "+attack;"
alias -pscript "-attack; wait; +attack; wait; -attack;"
So basically if I hit my previous weapon to switch back to my pistol I want this pistol script to be active. Is this possible?
I know a lot of you frown on scripting. Well I am one of those that don't. So if you can't help with this post please don't post. I know how some people in the community feel about scripting and that is their belief. I am not here to start a war between scripts and non-scripts.
Here is my problem I have this script but I want it to only be active when my pistol is out. I don't want to assign another key to my pistol and is it possible?
alias +pscript "+attack;"
alias -pscript "-attack; wait; +attack; wait; -attack;"
So basically if I hit my previous weapon to switch back to my pistol I want this pistol script to be active. Is this possible?
Comments
i.e bind 2 "exec pistol.cfg"
closest i can get. :<
alias +xreload "-attack; wait; +reload"
alias -xreload "-reload"
alias +pistol "+attack"
alias -pistol "-attack; wait; +attack; wait; -attack;"
bind r "+xreload"
bind 1 "-attack; kk1a"
bind 2 "-attack; kk2a; bind mouse1 +pistol;"
bind 3 "-attack; kk3a"
bind 4 "-attack; kk4a"
alias kk1a "-attack; wait; wait; wait; kkslot1"
alias kk1b "-attack; wait; wait; wait; kkslot1; bind q kk2a"
alias kk1c "-attack; wait; wait; wait; kkslot1; bind q kk3a"
alias kk1d "-attack; wait; wait; wait; kkslot1; bind q kk4a"
alias kkslot1 "-attack; wait; wait; wait; slot1; bind 1 kk1a; bind 2 kk2a; bind 3 kk3a; -attack; bind 4 kk4a; bind mouse1 +attack;"
alias kk2a "-attack; wait; wait; wait; kkslot2; bind q kk1b; bind mouse1 +pistol"
alias kk2b "-attack; wait; wait; wait; kkslot2; bind mouse1 +pistol"
alias kk2c "-attack; wait; wait; wait; kkslot2; bind q kk3b; bind mouse1 +pistol"
alias kk2d "-attack; wait; wait; wait; kkslot2; bind q kk4b; bind mouse1 +pistol"
alias kkslot2 "-attack; wait; wait; wait; slot2; bind 1 kk1b; bind 2 kk2b; bind 3 kk3b; -attack; bind 4 kk4b; bind mouse1 +attack;"
alias kk3a "-attack; wait; wait; wait; kkslot3; bind q kk1c"
alias kk3b "-attack; wait; wait; wait; kkslot3; bind q kk2c"
alias kk3c "-attack; wait; wait; wait; kkslot3"
alias kk3d "-attack; wait; wait; wait; kkslot3; bind q kk4c"
alias kkslot3 "-attack; wait; wait; wait; slot3; bind 1 kk1c; bind 2 kk2c; bind 3 kk3c; -attack; bind 4 kk4c; bind mouse1 +attack;"
alias kk4a "-attack; wait; wait; wait; kkslot4; bind q kk1d"
alias kk4b "-attack; wait; wait; wait; kkslot4; bind q kk2d"
alias kk4c "-attack; wait; wait; wait; kkslot4; bind q kk3d"
alias kk4d "-attack; wait; wait; wait; kkslot4"
alias kkslot4 "-attack; wait; wait; wait; slot4; bind 1 kk1d; bind 2 kk2d; bind 3 kk3d; -attack; bind 4 kk4d; bind mouse1 +attack;"
-attack; kk1a;
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
This will rebind mouse1 everytime you switch to the pistol, then switch back to +attack when you switch away. I wrote this about 3 months ago based off romano's lastinv script, very simple thing to add, only draw backs are when you spawn you have to switch weapons, otherwise it wont work right, and sometimes if you die with your pistol out and firing, you'll spawn firing. If this happens you can either just switch weapons or just reload. This script is written assuming you use q for lastinv and 1-4 for weapons. This also wont work too well for aliens, so you'll need some kind of marine.cfg.
Any mistakes let me know.
I appreciate everyones input, but I sat in #nslearn last night and a guy by the name of civilian helped me quite a bit. We took romano's lastinv script and came up with this. It works like magic:
alias +pscript "+attack;"
alias -pscript "-attack; wait; +attack; wait; -attack;"
alias kk1 "kk1a"
alias kk2 "kk2a"
alias kk3 "kk3a"
alias kk4 "kk4a"
alias kklastinv "kk1a"
alias kk1a "kkslot1"
alias kk1b "kkslot1; alias kklastinv kk2a"
alias kk1c "kkslot1; alias kklastinv kk3a"
alias kk1d "kkslot1; alias kklastinv kk4a"
alias kkslot1 "slot1; alias kk1 kk1a; alias kk2 kk2a; alias kk3 kk3a; alias kk4 kk4a; bind mouse1 +attack"
alias kk2a "kkslot2; alias kklastinv kk1b"
alias kk2b "kkslot2"
alias kk2c "kkslot2; alias kklastinv kk3b"
alias kk2d "kkslot2; alias kklastinv kk4b"
alias kkslot2 "slot2; alias kk1 kk1b; alias kk2 kk2b; alias kk3 kk3b; alias kk4 kk4b; bind mouse1 +pscript"
alias kk3a "kkslot3; alias kklastinv kk1c"
alias kk3b "kkslot3; alias kklastinv kk2c"
alias kk3c "kkslot3"
alias kk3d "kkslot3; alias kklastinv kk4c"
alias kkslot3 "slot3; alias kk1 kk1c; alias kk2 kk2c; alias kk3 kk3c; alias kk4 kk4c; bind mouse1 +attack"
alias kk4a "kkslot4; alias kklastinv kk1d"
alias kk4b "kkslot4; alias kklastinv kk2d"
alias kk4c "kkslot4; alias kklastinv kk3d"
alias kk4d "kkslot4"
alias kkslot4 "slot4; alias kk1 kk1d; alias kk2 kk2d; alias kk3 kk3d; alias kk4 kk4d; bind mouse1 +attack"
bind 1 "kk1"
bind 2 "kk2"
bind 3 "kk3"
bind 4 "kk4"
bind f "kklastinv"
bind pgup "switch"
alias "switch" "bind mwheelup invlast; bind mwheeldown invnext"
alias "pistol" "bind mwheelup +attack; bind mwheeldown +attack"
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I'm <i>pretty sure</i> that this script works but my gaming computer is broken right now so I can't test it. Basically what it is supposed to do is with a push of pgdn you can have your mousewheel to scroll-shoot, and with a push of pgdn you can go back to the default scroll-to-change-weapons setting.
I'm still a nubmuffin with scripting so don't spaz at me. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink-fix.gif' border='0' style='vertical-align:middle' alt='wink-fix.gif' /><!--endemo-->