Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
donevan427

Mousewheel bound as the fire key

Recommended Posts

I tried to bind the fire key as mousewheel in GZdoom and it did nothing for some reason. Is there a reason for or can you not use the mousewheel for the fire key?

Share this post


Link to post

[edit: woops maybe I should read posts before commenting]

Share this post


Link to post
2 hours ago, donevan427 said:

I tried to bind the fire key as mousewheel in GZdoom and it did nothing for some reason. Is there a reason for or can you not use the mousewheel for the fire key?

The mousewheel action (the context here being rolling it, not the middle mouse button) is not a button; it produces a movement value, not a button down/up signal, and as such its effects are completely unpredictable in any software that tries to use the mousewheel in a non-value methodology.

As such, it's likely one of 2 things are happening in GZDoom: The wheel is being processed as either just an up signal or as an actual analogue value, preventing any kind of action to take place for a binary bind. Or it's processing both the button down and up events at the same time, preventing the command builder from producing any tangible action for shooting because the signal is being immediately switched off the moment it turns on. Neither of these would be technically bugs, given the square peg/round hole nature of the issue.

 

Generally speaking, asking any developer to "fix" this is usually met with "it's not broken, please stop trying to do that". Because it's extremely weird behaviour to try and design any kind of consistent logic around.

Share this post


Link to post

I tried "bind mwheelup +attack" that does the same as if i went into options and set mwheelup as the fire key. It says its bound to mwheel but scrolling the wheel does nothing in-game. It works to cycle through weapons with each notch of the mousewheel with "next/previous weapon".

Share this post


Link to post

If you used mwheelup to attack, how would you stop attacking? mwheeldown? Or would you just only attack as long as you're scrolling the wheel?

Share this post


Link to post

The next/previous weapon commands are not button commands (they don't have + and - "phases" so to speak), so they work with the mousewheel, but the same is not true for the attack function.

 

Something you may try is this (type in console):

alias kludgeattack "+attack; wait; -attack"
bind mwheelup kludgeattack

It does result in attacking when you scroll up with the mousewheel. Keep one thing in mind, however: doing things like this will prevent you from holding fire, it'll just be a quick click-and-release every time. For some weapons, it can result in a slower fire rate... (But for those weapons that let you shoot every time you click, it should be quite efficient.)

Share this post


Link to post

I tried using prboom + and i can use mousewheel to fire with that sourceport.

5 minutes ago, plums said:

If you used mwheelup to attack, how would you stop attacking? mwheeldown? Or would you just only attack as long as you're scrolling the wheel?

 Each notch of mousewheel counts as one input. You can use this roll down (or up) on the mousewheel to get a bunch of inputs very quickly. Its useful for firing a semiautomatic weapon very quickly, or getting alot of jump inputs in a short period of time (useful for bunny hopping).

 

Share this post


Link to post
12 minutes ago, Gez said:

The next/previous weapon commands are not button commands (they don't have + and - "phases" so to speak), so they work with the mousewheel, but the same is not true for the attack function.

 

Something you may try is this (type in console):


alias kludgeattack "+attack; wait; -attack"
bind mwheelup kludgeattack

It does result in attacking when you scroll up with the mousewheel. Keep one thing in mind, however: doing things like this will prevent you from holding fire, it'll just be a quick click-and-release every time. For some weapons, it can result in a slower fire rate... (But for those weapons that let you shoot every time you click, it should be quite efficient.)

just tried this out and it is very close to what im trying to achieve, but the rate of fire is slower than spam clicking the mouse. I'm using a mod that has a gun that lets you fire as fast as you can click the mouse. I think the problem is the "wait;" part taking too long.

 after some more testing you can fire very fast if you time the scroll, this might be because the gun does have a maximum fire rate. holding the fire button will only get 1 shot. scrolling fast on the mousewheel only shoots once, but timing the scroll slightly slower can get very fast shots. again though if you scroll too fast you only get the one shot.

Edited by donevan427

Share this post


Link to post

donevan427,

 

Even if you could get this to work (it works elsewhere), it won't work very well as a fire button. You won't be able to do the attack rapidly, it would only register one shot per mouse wheel movement. So the chaingun, chainsaw, plasma gun, etc. will all become useless beyond single-shot bursts. It's not meant to be a button for a reason.

Edited by alLAN95th

Share this post


Link to post
3 hours ago, alLAN95th said:

donevan427,

 

Even if you could get this to work (it works elsewhere), it won't work very well as a fire button. You won't be able to do the attack rapidly, it would only register one shot per mouse wheel movement. So the chaingun, chainsaw, plasma gun, etc. will all become useless beyond single-shot bursts. It's not meant to be a button for a reason.

 

Respectfully,

 

-alLAN95th

 It wouldn't be useful with vanilla weapons, but with mods it can be useful. More importantly im curious as to why it doesn't work in gzdoom, other sourceports let me bind mousewheel to fire and work ingame. gzdoom lets me bind mousewheel to fire but does nothing ingame.

Share this post


Link to post
18 minutes ago, donevan427 said:

 It wouldn't be useful with vanilla weapons, but with mods it can be useful. More importantly im curious as to why it doesn't work in gzdoom, other sourceports let me bind mousewheel to fire and work ingame. gzdoom lets me bind mousewheel to fire but does nothing ingame.

Your "other ports" listed is just prboom+, which up until a specific semi-public release only used SDL1, which had very different mousewheel logic. And, as I previously stated, the semantics of this behaviour is incredibly unpredictable given the circumstances.

When updating Strife:Veteran Edition to SDL2, we ran headfirst into this problem for even changing weapons because the input interface has no logic for how a mousewheel actually acts. I had to fake it using simulated button down/up actions that occur on the same frame, and as a result it only works for weapon selection, nothing else.

Share this post


Link to post

Using mousewheel as fire button for "fire as fast as you can click" weapons is very common. And binding mousewheel as jump is really common speedrunner trick. I don't know if it requires special mouse or just different handling of the input, but it is common thing. I don't know if it will be actually useful in Doom since as far as I know you can't register  that you clicked in less than 2 ticks anyway.

Share this post


Link to post

Honestly, if you're gonna do an exploit like this, why not just go into the mod's code and edit the weapon to fire full auto? It's probably really easy.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×