Weapon Switching - configs, ideas, problems etc

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Postby only_turns_right » Sun Aug 17, 2008 3:37 pm

I frown upon voice-activated voip except in the telephone setting. Voice activated for games has all kinds of issues, especially if the person using it uses speakers. Even with their headphones up a little too loud, the voice activated player causes echo. Not to mention the heavy / mouth breathers, kids yelling at their moms to bring them some chocolate milk, background noise from gf, TV , barking dog, etc etc etc.

In my Planetside outfit, Eve corp, quake clans, voice activated was forbidden, and you could be banned from the TS server for multiple violations :P
only_turns_right
Member
 
Posts: 10
Joined: Sat Aug 02, 2008 2:04 pm

Postby nifrek » Sun Aug 17, 2008 3:50 pm

Alright, while there's a subject kinda related to this... Kinda ashamed to say this, but yeah I use weapprev/weapnext binds (not on mouse wheel tho). So I'm one of those people throwing away the hagar and even sometimes the crylink because they're in the way. :(

I was wondering, will it ever be possible to change weapon order when using weapprev/next?

I thought the cycleweapon command would fix this, but unfortunately it is useless for me, because if I want to switch 2 weapons down (by pressing the key 2 times quickly) it'll only switch once, not twice. So I have to wait for the first switch to be finished before pressing the key again. I suppose this is due to the fact that info is sent to server and client is waiting for response before switching. I heard someone say that maybe this could be fixed by csqc, but I wouldn't know exactly how it would work.

I believe my reasons to use weapnext/weapprev are valid even if I understand that having each weapon bound to keys is probably the best way to go. It's simple: I do not want to have to leave ANY of my fingers from my movement keys to switch weapons. I've never been able to use my pinky for anything, and I use alt (weapprev) and spacebar (weapnext) with my thumb to switch weapons. So especially during duels, depending who I'm playing, it can be annoying because if I have to control all the weapons on the map, either I need to find lava to throw away some weapons or switch to the wrong weapons all the time. Switching to hagar when I want nex kinda suck, as well as switching to crylink when I want mortar or electro :(
nifrek
Alien
 
Posts: 208
Joined: Fri Sep 22, 2006 6:43 am

Postby Xeno » Mon Aug 18, 2008 4:50 am

nifrek wrote:I was wondering, will it ever be possible to change weapon order when using weapprev/next?


I came up with this to change weapon order/skip weapons using next and previous. Replace the full weapon names (without spaces) on the first 2 lines with the ones that you want to cycle and in the order you want to cycle them (reverse the order of line 1 for line 2). The number on the third line is how much idle time you have before it changes weapons, so you can cycle through weapons without selecting them. As you cycle, it will echo the current weapon at the top of the screen.

Just bind "weap_next" and "weap_prev" to the keys/mousewheel/whatever that you want to use.

The only problem is that there's no way to detect which weapons you currently have, so you always have to cycle. Look for aliases with the impulse commands in them and change those to cycleweapon if you want to have fallbacks for missing weapons.

Code: Select all
set weap_order_up "laser shotgun machinegun mortar nex rocketlauncher"
set weap_order_down "rocketlauncher nex mortar machinegun shotgun laser"
set weap_switch_delay 0.08

set weap_var "shotgun"
set weap_imp "shotgun"
alias weap_get_impulse "weap_imp $weap_var; weap_convert_var"
alias weap_convert_var "toggle weap_imp laser 1 shotgun 2 machinegun 3 mortar 4 electro 5 crylink 6 nex 7 hagar 8 rocketlauncher 9"

set wp1 0
set wp2 0
set wp3 0
set wp4 0
set wp5 0
set wp6 0
set wp7 0
set wp8 0
set wp9 0

alias weap_next "toggle weap_var $weap_order_up ; weap_queue"
alias weap_prev "toggle weap_var $weap_order_down ; weap_queue"
alias weap_queue "echo $weap_var; weap_get_impulse; weap_request"
alias weap_request "weap_select $weap_imp"
alias weap_select "defer $weap_switch_delay weap_select_$1; weap_cancel;wp$1 1"
alias weap_cancel "wp1 0;wp2 0; wp3 0; wp4 0; wp5 0; wp6 0; wp7 0; wp8 0; wp9 0"

alias weap_select_1 "weap_select_1_$wp1"
alias weap_select_1_0 ""
alias weap_select_1_1 "impulse 1"

alias weap_select_2 "weap_select_2_$wp2"
alias weap_select_2_0 ""
alias weap_select_2_1 "impulse 2"

alias weap_select_3 "weap_select_3_$wp3"
alias weap_select_3_0 ""
alias weap_select_3_1 "impulse 3"

alias weap_select_4 "weap_select_4_$wp4"
alias weap_select_4_0 ""
alias weap_select_4_1 "impulse 4"

alias weap_select_5 "weap_select_5_$wp5"
alias weap_select_5_0 ""
alias weap_select_5_1 "impulse 5"

alias weap_select_6 "weap_select_6_$wp6"
alias weap_select_6_0 ""
alias weap_select_6_1 "impulse 6"

alias weap_select_7 "weap_select_7_$wp7"
alias weap_select_7_0 ""
alias weap_select_7_1 "impulse 7"

alias weap_select_8 "weap_select_8_$wp8"
alias weap_select_8_0 ""
alias weap_select_8_1 "impulse 8"

alias weap_select_9 "weap_select_9_$wp9"
alias weap_select_9_0 ""
alias weap_select_9_1 "impulse 9"
Xeno
peregrinus originis incognitae
 
Posts: 396
Joined: Wed Nov 15, 2006 10:42 pm

Postby nifrek » Mon Aug 18, 2008 7:21 pm

Nice.

Just to be sure I understand, if I press the prev key, it'll cycle thru weapons and wait 0.08sec (of whatever delay is set to) is finished, then switch to that weapon? I think this could work for me, I'll give it a try tonight or tomorrow. It's possible it's going to take me a while to get used to it, but if there is no plan to "fix" this directly in nexuiz, I'll probably have to use something like this.

Thanks a lot for the script, I appreciate it a lot.
nifrek
Alien
 
Posts: 208
Joined: Fri Sep 22, 2006 6:43 am

Postby Xeno » Tue Aug 19, 2008 11:39 pm

nifrek wrote:Just to be sure I understand, if I press the prev key, it'll cycle thru weapons and wait 0.08sec (of whatever delay is set to) is finished, then switch to that weapon?


Basically, yeah. Just like the normal next/prev commands, if you press the keys/roll the wheel fast enough, it will skip weapons instead of pulling up each one in between. If you don't press a key for 0.08 seconds, it will switch to the last selected weapon. Tweak that time if it feels too fast or too slow. I don't scroll through weapons anymore, so I'm not sure what the default time is. I just set it to what felt right.
Xeno
peregrinus originis incognitae
 
Posts: 396
Joined: Wed Nov 15, 2006 10:42 pm

Postby nifrek » Wed Aug 20, 2008 7:55 pm

Alright so I did some testing. I was on a server in warmup mode. After playing around with the delay, I finally set it to 0.0001 in the script. I started playing around on a map and I was like "OMG! YAY! IT WORKSDG!!!KLJHKJFH!!!!" It was absolutely perfect. It was exactly the same as using normal weapprev/next binds, no delay between switches.

Yep, I felt pretty stupid when I actually started to play a match, I was so enthusiastic that I forgot that you obviously made the delay function and the weapon names echoing at the top for the fact that the script can't know which weapons you have/don't have. So yeah, it's absolutely perfect in warmup because you have all weapons, but if I have only electro + rl, it's useless because I'd have to press weap_prev 3 times to make combos. :oops: hehe. It gets a bit confusing during fights when things are going fast :(

I guess the good news is I can finally play LMS now, so thanks a lot again for this script. I always wanted to play this mode for so long but since I couldn't throw weapons away it was impossible for me to do weapon combos.

I'm guessing CSQC would indeed be the only way to fix this but I don't suppose there's anyone up to working on this for now.
nifrek
Alien
 
Posts: 208
Joined: Fri Sep 22, 2006 6:43 am

Previous

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron