Page 1 of 1

Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 2:34 am
by StroggVorbis
In vanilla Doom, you could only switch to another weapon when the current was in its Ready state. While GZDoom allows to switch mid De-/Select, there are problems when the desired weapon is not the first in a different slot than your current one. For example, if you wield the chaingun and carry both shotguns, you would instinctively press '3' two times if you want to directly select the shotgun, skipping the SSG. Except it doesn't work. You will always select the SSG first and can only switch to the Shotgun as soon as the SSG's in its Raise state. Would it be possible to implement this?

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 9:30 am
by Matt
ZScript

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 12:40 pm
by Apeirogon
Already implemented by matef
viewtopic.php?f=43&t=59498#p1040474

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 2:25 pm
by Xaser
Great job not reading the first post, y'all two. This suggestion has nothing to do with m8f's mod, and I'm not sure what the heck a single-word "ZScript" reply is supposed to mean except for "Whoops, I accidentally hit Submit too early and didn't notice." :P

The OP is pointing out an inconsistency of sorts in the way the mid-selection interrupt code works. Here's a summary/example: presume the player has the pistol selected, with both shotguns and the chaingun in inventory:
  • Press 3, then quickly press 4. The Chaingun is selected -- i.e. the initial selection (SSG) is overridden.
  • Press 3, then quickly press 3 again. The Super Shotgun is selected -- i.e. the initial selection (SSG) is not overridden.
This is undoubtedly because same-slot and different-slot weapon cycling is handled differently behind the scenes, but the inconsistency on the user side is a bit unfortunate. It makes same-slot weapon stacking quite unwieldy in practice.

There's a chance this might be a [Duplicate], though -- I swear I remember this being brought up somewhere, but I can't find it offhand. Either my search-fu is weak, or the discussion happened somewhere outside the Bugs/Feature Suggestions forum realm.

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 3:13 pm
by gwHero
Xaser wrote: There's a chance this might be a [Duplicate], though -- I swear I remember this being brought up somewhere, but I can't find it offhand. Either my search-fu is weak, or the discussion happened somewhere outside the Bugs/Feature Suggestions forum realm.
I was almost certain too - I think it's this post viewtopic.php?f=15&t=59235

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 3:16 pm
by StroggVorbis
Thank you, Xaser. I don't know what I'd do without you :D This is exactly what I was trying to bring across. :) I was afraid to fall on deaf ears, again, and you're right. This is a duplicate, also by me. Since I got no replies except from Matt and m8f in the former (where they ironically already brought up ZScript and Weapon Menu Mod before) I wasn't quite sure what to do with it. Delete it? Edit the first post and make it appear on the first page again? I thought my first attempt at stating this was so unintelligible that I found it would better fade into obscurity, the replies I got certainly didn't help either and would only add to the confusion and misunderstanding.
The thread's still there, tho viewtopic.php?f=15&t=59235
Someone more knowledgeable than me can merge them if necessary. Also, I would like to obtain the opinions of the developers about this suggestion.

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 3:21 pm
by Matt
If only there were a sane method of retrieving when a player has given a slot-related input... (and if it is something included in player.cmd someone please post here)

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 4:04 pm
by Xaser
Huh, OK. So this is a literal duplicate request -- please don't do that, then. It doesn't motivate the developers to do anything about it at all.

Re: Make weapon switching via number keys less restricted

Posted: Tue Jun 12, 2018 7:15 pm
by Rachael
Xaser said it best. Thank you Xaser.

Both about the one-word reply, as well as duplicate requests.