Dual-Wielding weapons

Moderator: GZDoom Developers

User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Dual-Wielding weapons

Post by Caligari87 »

Someone gave me this idea in relation to Haloguns2.wad and some other project.

Would it be possible to add support for the following flags / keybindings?
Spoiler: Flags
Spoiler: Keys
I'm no programmer, but this seems like it would be fairly straightforward, to me at least. The biggest problem would be if a weapon fires projectiles / railguns off-center, but code checks in those routines could reverse the important values, depending.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The biggest problem is that the entire game code assumes that the player can only hold one weapon. That alone makes it very non-straightforward to change.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

Looks like you'd be very seriously fighting the system to implement that.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Post by Caligari87 »

Graf Zahl wrote:The biggest problem is that the entire game code assumes that the player can only hold one weapon. That alone makes it very non-straightforward to change.
Well, that sucks, to say the least of it. *sigh*

"Someday, somehow
Gonna make it all right
But not right now"

Nickelback, Someday

Yeah, someday, hopefully.

8-)

EDIT: I am a programmer, just not a very good one. And I only know Q-BASIC. :)
User avatar
Zell
Posts: 791
Joined: Thu Jul 24, 2003 7:47 am
Location: IN A GODDAMN BOX[In Erie.]

Post by Zell »

Didn't the old railgun.bex let you use two railgun shots from left and right? Just a thought.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

qbasic doesn't count as programming ;)
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

[offtopic]I've got that song![/offtopic]

Can't you find a cheap hack version, like perhaps malking it so that you pick up the 'twin whatevers' which is actually just two sprites of the same gun or whatever.

The trick would be, that you use alt-fire to fire one gun's projectile, and the normal fire fires the other, therefore allowing faked seperate shots. What you couldn't do is fire both at the same time, unless you had a gun where normal fire fired just one, whilst alt-fire fired both. As a technicality you could use a script to tell when the player has two weapons. The script then gives the player the dual wield of it, as an example:

Player has SMG
Player then picks up a grenade launcher

Script knows this, and gives the player both weapons, plus the dual wield equivilant, perhaps in a special 'dual-wielding' slot?

normal fire utilises rapid fire SMG whilst altfire uses grenade launcher.

Hows that for a way round?
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

sounds cool! I approve of this idea!
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

All you'd have to do to utilise my suggestion is have some serious ACS and decorate skill. Then it should be easy ;)
killingblair
Posts: 937
Joined: Mon Oct 04, 2004 9:16 pm

Post by killingblair »

Graf Zahl wrote:The biggest problem is that the entire game code assumes that the player can only hold one weapon. That alone makes it very non-straightforward to change.
However, if you 'Duel Weild' weapons, that could just count as one weapon, thats right, to trick the .exe into thinking 2 guns = 1 gun. Though I'm not sure how to do this, I'll probably think of a way.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Post by Caligari87 »

Phobus wrote:Can't you find a cheap hack version, like perhaps malking it so that you pick up the 'twin whatevers' which is actually just two sprites of the same gun or whatever.

The trick would be, that you use alt-fire to fire one gun's projectile, and the normal fire fires the other, therefore allowing faked seperate shots. What you couldn't do is fire both at the same time, unless you had a gun where normal fire fired just one, whilst alt-fire fired both. As a technicality you could use a script to tell when the player has two weapons. The script then gives the player the dual wield of it, as an example:

Player has SMG
Player then picks up a grenade launcher

Script knows this, and gives the player both weapons, plus the dual wield equivilant, perhaps in a special 'dual-wielding' slot?

normal fire utilises rapid fire SMG whilst altfire uses grenade launcher.

Hows that for a way round?
Great, except that it uses many duplicate sprites, and can't account for every possible combination without horrendous amounts of work. This was ment to be a flexable alternative to all that scripting and extra graphics, so that the player could use any two guns together.

8-)
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

Well, with enough work, or limited weapon numbers, it'd be nice and easy to account for every weapon combo.
User avatar
Cutmanmike
Posts: 11335
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Seems like a bit too much hassle to code. Also it would be VERY awkward with weapons that don't look right when dual-wielded in the first place.
User avatar
Inuyasha_989
Posts: 612
Joined: Thu Oct 16, 2003 2:51 pm
Location: Player Connector
Contact:

Post by Inuyasha_989 »

Not to mention, having the Original weapons with specially coded new ones would look plain weird...
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

Couldn't you just make the grenade not visible and make a sprite that shows the grenade being thrown with alt-fire?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”