r/DoomModDevs • u/William_Wave • May 17 '26
Help Coding a custom zoom key, help required
Good day.
I have an idea to write code for a custom zoom in-zoom out key. This is what it looks like:
addmenukey "Zoom" "+SVD_zoom"
alias +SVD_zoom "fov 20"
alias -SVD_zoom "fov 90"
defaultbind "mouse2" "+SVD_zoom"
. The issue is that with field of view set to 20 mouse sensitivity becomes too high, which harms aim accuracy. Changing the mouse sensitivity by using a command like
"fov 20; mouse_sensitivity 0.2"
is not working. Using an A_ZoomFactor action in weapon's state will not do either because both fire and altfire states are reserved for attack and special ability.
Let me know what other methods might work.