Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Mousewheel +/- events fire in the same frame, can cancel each other out #200

Closed
meag opened this issue Mar 1, 2017 · 1 comment
Closed
Assignees

Comments

@meag
Copy link
Contributor

meag commented Mar 1, 2017

If mousewheel is assigned to a +alias, the + and - versions will be fired in the same frame.

bind mwheelup +gl
alias +gl "weapon 6;+attack"
alias -gl "wait;-attack"

The wait command is required to delay the -attack from being executed before the user command is sent to server. This means aliases that work with keys or other mouse buttons need changed to work on mousewheel.

Just posting this as a reminder as it has come up before, my memory failed me and I had to work it out from scratch last night.

@meag meag added the Input label Mar 1, 2017
@meag meag self-assigned this Mar 1, 2017
@meag
Copy link
Contributor Author

meag commented Nov 1, 2020

Apologies, correct script is:

bind mwheelup +gl
alias +gl "weapon 6;+attack"
alias -gl "-attack;weapon 2"

Without wait; at start of -gl, will fire shotgun instead of grenade launcher

@meag meag closed this as completed in b0abd7c Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant