Best Weapon switching script

Discuss Nexuiz gameplay here.

Moderators: Nexuiz Moderators, Moderators

Thu Sep 06, 2007 12:00 am

  • EDIT: In Nexuiz (the current version as I write this is 2.3), the bestweapon command that I use in this script doesn't always work right. Try the new script 3 posts further down in this topic.

    Okay, here's another script that goes well with the mouse wheel zoom script. If you don't use the mouse wheel to switch weapons and don't want to press 9 different keys to select a weapon, you can use the bestweapon console command to tell Nexuiz how to select the best weapon with a single key.

    Each weapon has a number associated with it. You use the weapon number in a list to tell Nexuiz what order of preference. That's great but your preference changes depending on the situation, right? So we just make multiple lists.

    In the script below, I set up a list for close range weapons and sniper weapons. Then I set up a key to cycle through all weapons (like the mouse wheel does in Nexuiz's default setup). Finally, I set up a key for the laser, which needs to be quickly accessible for trick jumps.

    You will probably want to customize most of the script to make your own lists with your own weapon orders. Also, set the key bindings to whatever is easiest for you. You might want to bind to a mouse button instead of the keyboard. My mouse driver is a little weird, so 3, 4 and 5 are actually mouse buttons for me. For most you would use MOUSE3, MOUSE4, MOUSE5 for mouse buttons.

    Anyway, here is the script. Enjoy.

    Code: Select all
    / switch weapons script based on favorite groupings
    // my mouse outputs key presses: 3=left side btn, 4=middle btn, 5=right side btn
    // Nexuiz impulse numbers: 9=rocket, 8=hagar, 7=nex, 6=crylink, 5=electro, 4=mortar, 3=machinegun, 2=shotgun, 1=laser

    //best close weapon
    bind "3" "bestweapon 7 3 2 9 8 6 5 4 1"
    //best sniper weapon
    bind "4" "bestweapon 7 3 9 8 6 5 4 2 1"
    // best splash weapon
    bind "r" "bestweapon 9 8 6 5 4 3 2 7 1"
    // cycle
    bind "f" "weapprev"
    // laser
    bind "5" "impulse 1"
    Last edited by AceOfThumbs on Tue Sep 11, 2007 10:42 pm, edited 1 time in total.
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Tue Sep 11, 2007 8:41 pm

  • I know this is a little off topic, but it relates to this. Is it actually possible to change weapon priority? I saw that you had a "bestweapon" command, could I apply that permanently so that for instance, my laser is above my shotgun?
    iSuck
    Alien
     
    Posts: 150
    Joined: Thu Apr 19, 2007 11:34 pm

Tue Sep 11, 2007 9:38 pm

  • I'm pretty sure that you can't change the order of weapon preference for the auto-swap or the order they show up in the menu.
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Tue Sep 11, 2007 10:34 pm

  • Since bestweapon isn't reliable, I wrote a script that allows a similar function. This is not as good as the bestweapon feature but it works. You can group weapons and select from that group with a single key. I have a bunch of instructions, then the script is at the bottom.

    WHY
    There are 9 weapons, so it is difficult to quickly select the right weapon with the mouse wheel. Some people bind weapons to keys, but to access all of the weapons would require....anyone? Yes, it would require 9 keys. That just seems too hard to handle in the midst of battle. Hats off to those that can pull that off.

    HOW IT WORKS
    Press the middle mouse button to select the machine gun. Press it again to select the nex. Press f to select the hagar. Again for the electro and again for the mortor. This binds 5 weapons to just 2 keys. Then I have some regular binds for the shotgun, rocket launcher and laser.

    CUSTOMIZE IT
    Please change the key binds to whatever works best for you. My mouse outputs key presses, so 4 means middle button. Most of you would use MOUSE3, MOUSE4 and MOUSE5 for your extra mouse buttons. Make your own groupings or add or delete from the groups I set up. If you look at the alias commands carefully you can see how they cycle.

    USAGE NOTES
    I use this with the auto-select weapon feature from the options screen. I think it does a pretty good job of picking the right weapon. If I don't want the weapon Nexuiz selects I can quickly switch to the one I do want.

    When you start a game, the explosive weapon selection cycles through the group from 1 to 2 to 3 . But be aware that if you have the hagar, then switch to the shotgun and switch to explosive weapons again, it is cycling to the next explosive weapon, the electro. If you want the hagar press 2 more times.

    You need to be somewhat aware of what weapons you have, so you aren't wasting time trying to select a weapon you don't have. If you don't have a weapon or you don't have ammo for a weapon, it won't select it. That means you'll still have the same weapon as before the key press (a message at the top of the screen tells you that the weapon couldn't be selected). Press again to get the next weapon in the group. With a little practice this becomes automatic.

    I didn't put the crylink in at all. I can get it via auto-select if I have only the machine gun and shotgun and that works for me. I used to have it grouped with the shotgun, but decided to keep the shotgun by itself for maximum speed. I use the shotgun for when someone is right beside me, which means there is no time for an extra button press. Feel free to add the crylink in somewhere if you want it.

    THE SCRIPT
    Code: Select all
    // AceOfThumbs weapon grouping script
    // switch weapons based on groupings by type
    // my mouse outputs key presses: 3=left side btn, 4=middle btn, 5=right side btn
    // Nexuiz impulse numbers: 9=rocket, 8=hagar, 7=nex, 6=crylink, 5=electro, 4=mortar, 3=machinegun, 2=shotgun, 1=laser

    // this sets up a toggle for sniper weapons
    // mg and nex will alternate each time this is called
    alias "aot_ws1" "alias aot_nextws aot_ws2 ; impulse 3"
    alias "aot_ws2" "alias aot_nextws aot_ws1 ; impulse 7"
    alias "aot_nextws" "aot_ws1"

    // this sets up a toggle for explosive weapons
    // hagar, electro, mortor will alternate each time this is called
    alias "aot_wp1" "alias aot_nextwp aot_wp2 ; impulse 8"
    alias "aot_wp2" "alias aot_nextwp aot_wp3 ; impulse 5"
    alias "aot_wp3" "alias aot_nextwp aot_wp1 ; impulse 4"
    alias "aot_nextwp" "aot_wp1"

    // key bindings
    // enemy close-shotgun and wide angle mode
    bind "3" "impulse 2 "

    // rocket
    bind "r" "impulse 9"

    //best sniper weapon
    bind "4" "aot_nextws"

    // best explosive weapon
    bind "f" "aot_nextwp"

    // laser
    bind "5" "impulse 1"
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Tue Jun 24, 2008 1:58 am

  • Hello, I just found your post looking for feeling more comfortable while switching weapons. You had a nice idea, but it has a problem when doing combos. If you switch from i.e.: explosive to hitscan weapon you end using the 'next' hitscan weapon. So I've made this quick customization, I know is dirty but I won't spend more time with this, it just does the work for me. Maybe it can serve to keep improving the original script. So here it is:

    Code: Select all
    // best mortarish
    alias "mortar_ws1" "alias mortar_ws mortar_ws2 ; impulse 6; alias mortar_now mortar_ws1 ; alias hitscan_ws hitscan_now ;"
    alias "mortar_ws2" "alias mortar_ws mortar_ws3 ; impulse 4; alias mortar_now mortar_ws2 ; alias hitscan_ws hitscan_now ;"
    alias "mortar_ws3" "alias mortar_ws mortar_ws4 ; impulse 5; alias mortar_now mortar_ws3 ; alias hitscan_ws hitscan_now ;"
    alias "mortar_ws4" "alias mortar_ws mortar_ws1 ; impulse 8; alias mortar_now mortar_ws4 ; alias hitscan_ws hitscan_now ;"
    alias "mortar_ws" "mortar_ws1"
    alias mortar_now mortar_ws1
    bind e "mortar_ws"

    alias "mortar_ws" "mortar_ws1"

    // best histcan
    alias "hitscan_ws1" "alias hitscan_ws hitscan_ws2 ; impulse 7 ; alias hitscan_now hitscan_ws1 ; alias mortar_ws mortar_now ;"
    alias "hitscan_ws2" "alias hitscan_ws hitscan_ws3 ; impulse 3 ; alias hitscan_now hitscan_ws2 ; alias mortar_ws mortar_now ;"
    alias "hitscan_ws3" "alias hitscan_ws hitscan_ws1 ; impulse 2 ; alias hitscan_now hitscan_ws3 ; alias mortar_ws mortar_now ;"
    alias "hitscan_ws" "hitscan_ws1"
    alias hitscan_now hitscan_ws1
    bind f "hitscan_ws"

    alias w_laser " impulse 1 ; alias mortar_ws mortar_now ; alias hitscan_ws hitscan_now ;"
    alias w_rocket " impulse 9 ; alias mortar_ws mortar_now ; alias hitscan_ws hitscan_now ;"
    alias w_last "weaplast ; alias mortar_ws mortar_now ; alias hitscan_ws hitscan_now ;"

    bind 1 w_laser
    bind r w_rocket
    bind q w_last
    bind alt " alias hitscan_ws hitscan_ws1 ; alias mortar_ws mortar_ws1 ; alias mortar_now mortar_ws1 ; alias hitscan_now hitscan_ws1 ;"


    I didn't found any better solution to this problem, so I'm sticking with this by now :)
    Cheers,
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Tue Jun 24, 2008 3:52 am

  • I haven't updated this post in a while, but I have been using a new weapon switching script since 2.4 servers started appearing that takes advantage of a new command that lets you create one or more lists of weapons in the order you prefer. Bind those to keys and the script gives you the best weapon that you have and have ammo for.

    For example, I made 3 groups, based on help from mkzelda and morfar's weapon data chart. One for the best close range weapon, one for the best medium range weapon and another for the best long range weapon. You may want to change the weapons lists for your own preference.

    Code: Select all
    // Nexuiz impulse numbers: 9=rocket, 8=hagar, 7=nex, 6=crylink, 5=electro, 4=mortar, 3=machinegun, 2=shotgun, 1=laser

    // fix for bestweapon command on 2.3 or earlier clients
    alias aot_bw "register_bestweapon clear; register_bestweapon 1 1 4096 1 9 0; register_bestweapon 2 2 1 2 6 1; register_bestweapon 3 3 2 3 7 1; register_bestweapon 4 4 4 4 8 2; register_bestweapon 5 5 8 5 9 2; register_bestweapon 6 6 16 6 9 1; register_bestweapon 7 7 32 7 9 5; register_bestweapon 8 8 64 8 8 1; register_bestweapon 9 9 128 9 8 3"

    // remove fix since most servers are 2.4+ now
    // if you are playing on a 2.3 server, delete the line below
    alias aot_bw ""

    // close - sorted by small blast radius then damage per sec
    // for crylink use alt fire for more shots at once
    alias aot_w1  "aot_bw; bestweapon 6 8 2 3 7 1 4 5 9; echo close range"

    // medium - sorted by blast radius then damage per sec
    alias aot_w2 "aot_bw; bestweapon 9 5 4 8 6 3 7 2 1; echo medium range"

    // far - sorted by speed then minimum spread then damage per sec
    // for mg use alt fire for less spread, for crylink use primary
    alias aot_w3  "aot_bw; bestweapon 7 3 6 1 8 4 5 2 9; echo long range"

    // make bestweapon groups the default wheel behavior
    in_bind 0 mwheelup "aot_weap_in"
    in_bind 0 mwheeldown "aot_weap_out"

    // uncomment the lines below to
    // restore Nexuiz's normal weapon menu
    //in_bind 0 mwheelup "weapnext"
    //in_bind 0 mwheeldown "weapprev"

    alias aot_weap1 "aot_w1; alias aot_weap_in aot_weap2; alias aot_weap_out aot_weap1"
    alias aot_weap2 "aot_w2; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap1"
    alias aot_weap3 "aot_w3; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap2"

    // start with medium range weapon
    aot_weap2


    If you read the comments, you'll see some commented code (lines that start with // are ignored) that offers a few options. If you won't need these options you can also just delete those lines and shorten the script.
    Last edited by AceOfThumbs on Tue Jun 24, 2008 6:15 am, edited 1 time in total.
    So much to do, so little time to do it
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Tue Jun 24, 2008 6:14 am

  • I forgot to point out that this script uses the mouse wheel for changing weapons instead of using keys. There are 3 settings. You start off in the medium range. Scroll up to choose a weapon better for long range or down for close range weapons.

    I think this feels more natural since the wheel is normally used to cycle through weapons, so many players will be used to using the wheel. Anyway try it out, but be aware that you can use keyboard binds if you prefer to hit a key to switch weapons.

    There is some code below to handle special cases when you may want to choose a different explosive weapon than the one that is first in the medium range list. This is great for when your opponent is also using an explosive weapon. You need one that is faster or equally as fast so you can hit him faster or cause his own explosives to detonate near him. Hagar is the fastest. Electro and mortar are tied. Rocket is the slowest.

    Also, the electro and mortar have useful secondary fire modes that let you bounce an explosive around a corner or leave a trail to hit someone following you.

    If you add the code below, you'll have the R key bound to switch to an alternate medium range explosive weapon. So if you are holding any explosive weapon you can press R to cycle through the rocket launcher, electro, mortar and hagar.

    Code: Select all
    // cycle to next medium range weapon
    bind R "cycleweapon 9 5 4 8"
    So much to do, so little time to do it
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Tue Jun 24, 2008 12:28 pm

  • hey Ace thank you very much, I think your solution is better by the fact that it chooses weapons *with ammo* :)

    I will try it when I get home

    And thanks for the explosive vs explosive exception tip ;)

    Cheers,
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Tue Jun 24, 2008 7:04 pm

  • Okay erm... I tried out the script myself.

    Tested it out on playing against BOT in maps. Ended up can't use laser AT ALL. When I press 1 for laser it says - The laser is NOT AVAILABLE on this map!

    I tried other maps, removed the script and still can't use laser :S

    but in a game on servers it works I think. So how to solve this please?
    User avatar
    Oat
    Advanced member
     
    Posts: 74
    Joined: Mon May 12, 2008 3:40 pm

Tue Jun 24, 2008 8:22 pm

  • try

    bind 1 "impulse 1"
    Dokujisan
    Forum addon
     
    Posts: 1199
    Joined: Sat Oct 07, 2006 4:31 pm
    Location: Louisville, Kentucky

Tue Jun 24, 2008 8:31 pm

  • it's already there in my autoexec.cfg
    User avatar
    Oat
    Advanced member
     
    Posts: 74
    Joined: Mon May 12, 2008 3:40 pm

Wed Jun 25, 2008 1:26 am

  • Well I have no time for adapting and testing the script today, so this is post is for Oat

    It seems to me like a weird server config problem .. so:

    - Do you saw the other players using the laser while you cant use it?
    - Do you have the same problem using any server?
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Wed Jun 25, 2008 11:10 am

  • While playing on galts and other servers, the laser works just fine.

    When i play on my own to test things out (binds etc)

    The laser is simply not available.. I don't know how this happened but it happened after i tried out this script...

    :S
    User avatar
    Oat
    Advanced member
     
    Posts: 74
    Joined: Mon May 12, 2008 3:40 pm

Thu Jun 26, 2008 8:48 am

  • If you are using this script you will want to bind a key or mouse button just for the laser. This is a good idea anyway, since you will want to use the laser often for laser jumps. Add this line to the end of the script:
    Code: Select all
    bind MOUSE5 "impulse 1"


    I use mouse button 5 for the laser, but you can change this to whichever mouse button or keyboard key you prefer.
    So much to do, so little time to do it
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Thu Jun 26, 2008 9:05 am

  • Deaf-OAT wrote:While playing on galts and other servers, the laser works just fine. When i play on my own to test things out (binds etc) The laser is simply not available.. I don't know how this happened but it happened after i tried out this script... :S

    Sorry, I posted above before reading through the other replies. If the laser is working for you on Galt's Gulch, it should be working in matches you create on your own computer (your own computer is the server in that case). Make sure you are using Nexuiz 2.4 or higher. The script uses commands that weren't available in Nexuiz 2.3.

    Are you pressing the 1 key (number one) to switch to the laser? Or are you trying the get the laser using the mouse wheel? If you are using the mouse wheel, be aware that the long range setting is the only one that is likely to give you the laser and then only if you don't have the nex, machine gun or crylink since they are earlier in the list than the laser.

    I hope this helps.
    So much to do, so little time to do it
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Mon Jun 30, 2008 7:09 pm

  • Sorry for the long reply.

    I figured it out by wiping the config.cfg clean and and it worked :)

    Thanks anyway.
    User avatar
    Oat
    Advanced member
     
    Posts: 74
    Joined: Mon May 12, 2008 3:40 pm

Tue Feb 17, 2009 4:21 pm

  • Oh hai.

    How do i get this script to work in the svn? (works on 2.4x servers)

    kthx

    Code: Select all
    // Nexuiz impulse numbers: 9=rocket, 8=hagar, 7=nex, 6=crylink, 5=electro, 4=mortar, 3=machinegun, 2=shotgun, 1=laser

    // fix for bestweapon command on 2.3 or earlier clients
    alias aot_bw "register_bestweapon clear; register_bestweapon 1 1 4096 1 9 0; register_bestweapon 2 2 1 2 6 1; register_bestweapon 3 3 2 3 7 1; register_bestweapon 4 4 4 4 8 2; register_bestweapon 5 5 8 5 9 2; register_bestweapon 6 6 16 6 9 1; register_bestweapon 7 7 32 7 9 5; register_bestweapon 8 8 64 8 8 1; register_bestweapon 9 9 128 9 8 3"

    // remove fix since most servers are 2.4+ now
    // if you are playing on a 2.3 server, delete the line below
    alias aot_bw ""

    // close - sorted by small blast radius then damage per sec
    // for crylink use alt fire for more shots at once
    alias aot_w1  "aot_bw; bestweapon 6 8 2 3 7 1 4 5 9; echo close range"

    // medium - sorted by blast radius then damage per sec
    alias aot_w2 "aot_bw; bestweapon 9 5 4 8 6 3 7 2 1; echo medium range"

    // far - sorted by speed then minimum spread then damage per sec
    // for mg use alt fire for less spread, for crylink use primary
    alias aot_w3  "aot_bw; bestweapon 7 3 6 1 8 4 5 2 9; echo long range"

    // make bestweapon groups the default wheel behavior
    in_bind 0 mwheelup "aot_weap_in"
    in_bind 0 mwheeldown "aot_weap_out"

    // uncomment the lines below to
    // restore Nexuiz's normal weapon menu
    //in_bind 0 mwheelup "weapnext"
    //in_bind 0 mwheeldown "weapprev"

    alias aot_weap1 "aot_w1; alias aot_weap_in aot_weap2; alias aot_weap_out aot_weap1"
    alias aot_weap2 "aot_w2; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap1"
    alias aot_weap3 "aot_w3; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap2"

    // start with medium range weapon
    aot_weap2
    paperclips
    Alien trapper
     
    Posts: 346
    Joined: Mon Jan 12, 2009 10:27 am
    Location: internets

Tue Feb 17, 2009 4:30 pm

  • bestweapon and cycleweapon have be deprecated and have been replaced with cl_weaponpriority. and explanation can be found here.

    I'm not sure if AoT updated this script for svn
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Tue Feb 17, 2009 4:41 pm

  • take one from those:

    // impulse 200 for prev gun according to next list, 210 for best gun from next list, 220 for next gun from next list
    seta cl_weaponpriority0 "14 9 8 4" // "explosives (RL Hagar Mortar)"
    // impulse 201 for prev gun according to next list, 211 for best gun from next list, 221 for next gun from next list
    seta cl_weaponpriority1 "13 7 6 5 1" // "energy (Nex Crylink Electro Laser)"
    // impulse 202 for prev gun according to next list, 212 for best gun from next list, 222 for next gun from next list
    seta cl_weaponpriority2 "15 11 7 3" // "hitscan exact (Nex MG)"
    // impulse 203 for prev gun according to next list, 213 for best gun from next list, 223 for next gun from next list
    seta cl_weaponpriority3 "15 11 7 3 2" // "hitscan all (Nex MG Shotgun)"
    // impulse 204 for prev gun according to next list, 214 for best gun from next list, 224 for next gun from next list
    seta cl_weaponpriority4 "13 8 6 5 2" // "spam (Hagar Crylink Electro Shotgun)"
    // impulse 205 for prev gun according to next list, 215 for best gun from next list, 225 for next gun from next list
    seta cl_weaponpriority5 "1 12 10" // "for moving (Laser Hook Port-O-Launch)"
    // impulse 206 for prev gun according to next list, 216 for best gun from next list, 226 for next gun from next list
    seta cl_weaponpriority6 ""
    // impulse 207 for prev gun according to next list, 217 for best gun from next list, 227 for next gun from next list
    seta cl_weaponpriority7 ""
    // impulse 208 for prev gun according to next list, 218 for best gun from next list, 228 for next gun from next list
    seta cl_weaponpriority8 ""
    // impulse 209 for prev gun according to next list, 219 for best gun from next list, 229 for next gun from next list
    seta cl_weaponpriority9 ""
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Thu Feb 19, 2009 7:55 pm

  • I've been away from Nexuiz for several months, so I haven't tried this with the current SVN. It works with 2.4.2 and it sounds like things haven't changed since that release. Anyway, check out the latest version of my weapon switching script at the link below:
    http://www.nexuizninjaz.com/forum/showt ... 76#pid4776
    So much to do, so little time to do it
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

Thu Feb 19, 2009 8:48 pm

  • AceOfThumbs wrote:I've been away from Nexuiz for several months, so I haven't tried this with the current SVN. It works with 2.4.2 and it sounds like things haven't changed since that release. Anyway, check out the latest version of my weapon switching script at the link below:
    http://www.nexuizninjaz.com/forum/showt ... 76#pid4776


    Nice! thanks a bunch! :D

    The script in the link above works with current SVN and the 2.4.2 release.
    I post the (although bit cut) script here so people can find it in here as well:

    Code: Select all
    // Nexuiz impulse numbers: 9=rocket, 8=hagar, 7=nex, 6=crylink, 5=electro, 4=mortar, 3=machinegun, 2=shotgun, 1=laser

    set cl_weaponpriority0 "6 8 2 3 7 1 4 5 9"
    set cl_weaponpriority1 "9 5 4 8 6 3 7 2 1"
    set cl_weaponpriority2 "4 9 5 8 6 3 7 2 1"
    set cl_weaponpriority3 "5 4 9 8 6 3 7 2 1"
    set cl_weaponpriority4 "7 3 6 1 8 4 5 2 9"

    // close - sorted by small blast radius then damage per sec
    // for crylink use alt fire for more shots at once
    alias aot_w1  "impulse 210; bestweapon $cl_weaponpriority0"

    // medium - sorted by blast radius then damage per sec
    set aot_wx "1"
    alias aot_w2_1 "impulse 211; bestweapon $cl_weaponpriority1"
    alias aot_w2_2 "impulse 212; bestweapon $cl_weaponpriority2"
    alias aot_w2_3 "impulse 213; bestweapon $cl_weaponpriority3"
    alias aot_w2 "aot_w2_1"
    alias aot_w2_next "toggle aot_wx 1 2 3; aot_w2_next2"
    alias aot_w2_next2 "alias aot_w2 "aot_w2_${aot_wx}"; aot_w2_next3"
    alias aot_w2_next3 "aot_w2"

    // far - sorted by speed then minimum spread then damage per sec
    // for mg use alt fire for less spread, for crylink use primary
    alias aot_w3  "impulse 214; bestweapon $cl_weaponpriority4"

    // uncomment to make weapon menu the default wheel behavior
    //bind mwheelup "weapnext"
    //bind mwheeldown "weapprev"

    // make bestweapon groups the default wheel behavior
    in_bind 0 mwheelup "aot_weap_in"
    in_bind 0 mwheeldown "aot_weap_out"

    alias aot_weap_echo "echo $1"

    alias aot_weap1 "aot_w1; aot_weap_echo close; alias aot_weap_in aot_weap2; alias aot_weap_out aot_weap1"
    alias aot_weap2 "aot_w2; aot_weap_echo medium; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap1"
    alias aot_weap3 "aot_w3; aot_weap_echo far; alias aot_weap_in aot_weap3; alias aot_weap_out aot_weap2"
    aot_weap2
    paperclips
    Alien trapper
     
    Posts: 346
    Joined: Mon Jan 12, 2009 10:27 am
    Location: internets

Wed Oct 14, 2009 3:22 am

  • Posting my current weapon switching script :)

    Code: Select all
    // Reset
    set wpc_impulse_hitscan 210
    alias wpc_reset_hitscan "set wpc_impulse_hitscan 210"

    set wpc_impulse_splash 211
    alias wpc_reset_splash "set wpc_impulse_splash 211"

    // Hitscan
    set cl_weaponpriority0 "7 13 3 2"

    // Splash / Spam
    set cl_weaponpriority1 "4 5 6 8 14"

    // Rifle
    set cl_weaponpriority2 "15"
    bind x "wpc_reset_splash; wpc_reset_hitscan; impulse 212; bestweapon $cl_weaponpriority2;"

    // F: Hitscan / E: Splash
    bind f "wpc_reset_splash; impulse $wpc_impulse_hitscan; set wpc_impulse_hitscan 220;"
    bind e "wpc_reset_hitscan; impulse $wpc_impulse_splash; set wpc_impulse_splash 221;"

    // Rocket
    bind r "impulse 9"

    // Previous weapon
    bind q "wpc_reset_splash; wpc_reset_hitscan; weapprev"
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am



Return to Nexuiz - Gameplay




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest