Page 1 of 1
Toggle between two weapons
Posted: Sat Apr 08, 2006 1:11 am
by surgeon62
I'm hoping this is an easy one, although I didn't find anything like this searching the forum. Say you have two favorite weapons RL and PG for instance. Can you bind one key to togle between them?
Posted: Sat Apr 08, 2006 6:08 am
by [xeno]Julios
set plasmy "weapon 8; bind x vstr rocky"
set rocky "weapon 5; bind x vstr plasmy"
bind x "vstr plasmy"
try that - haven't tested it and it's been years since i've cfg'ed, so i might be mistaken.
Posted: Sat Apr 08, 2006 3:23 pm
by surgeon62
Thanks man, that worked!
OK, here's a more difficult one: I see you are using variables to set up the toggle, but what if you want to set up another weapon to switch to from the RL if you don't have the PG (the SG for instance)? It seems like you need an if statement here, but I don't think you have that ability in a cfg. Is there another way to handle this?
Posted: Sat Apr 08, 2006 5:56 pm
by [xeno]Julios
set up a prioritization script,
so something like
set bestweapon "weapon 1; weapon 2; weapon 3; weapon 4; etc"
that way, if u have weapon 4, it'll select it. If you don't, it'll select weapon 3 (if u have it), and so on.
That's how i did it in q2 - should work in q3 - and i don't think u'll get a cost in delay - test it out.
Posted: Sat Apr 08, 2006 6:54 pm
by menkent
that works in q3... it's not usually the greatest idea though since you don't know what weapon you're actually gonna end up with. same with that toggle above.
scenario: you switch to PG ("x") and spam a little then RG ("r") and after sniping at someone another guy pops around the corner and you need PG again... oh noes! "x" is now bound to RL and you kill yourself with splash damage as he rapes you with a point-blank hit from his ssg! gg.
an example
demo (osp)
Posted: Sat Apr 08, 2006 8:45 pm
by [xeno]Julios
yep - best solution, imo, is to have an individual key bound for each and every weapon.
Posted: Sun Apr 09, 2006 2:31 am
by surgeon62
menkent wrote:scenario: you switch to PG ("x") and spam a little then RG ("r") and after sniping at someone another guy pops around the corner and you need PG again... oh noes! "x" is now bound to RL and you kill yourself with splash damage as he rapes you with a point-blank hit from his ssg! gg.
an example
demo (osp)
LOL... I watched the demo. Yeah, I am wanting to do this because I initally learned to play with the bad habit of making the bind for the RL the only one that was in reach with my config because it's my favorite. As a result, I don't do well with switching to the right weapon for the occasion. So as a solution, I would like to use this toggle which will create another problem... This is the kind of thinking that will get you promoted in corporate America. I know from experience... Dilbert is non-fiction.
Posted: Sun Apr 09, 2006 4:40 am
by Cooldown
surgeon62, you should check out my post relating to setting up your controls in this thread:
http://www.quake3world.com/forum/viewto ... t=tertiary (it's a bit ways down)
As everyone else has stated, you should bind each weapon to an individual key. It might take some time to adjust to but it's for the best. As far as the layout is concerned, you should place your weapon binds in very close proximity to your movement keys, ie. surrounding them.