How to bind several weapons to one key (toggle between weapons) in Quake?

How to bind several weapons to one key (toggle between weapons) in Quake? - Greyscale Photo of Men

The options menu doesn't support rebinding weapons (beyond "next"/"previous", 1-9 keys by default), but console can be used for remapping, following the syntax:

bind <key> "impulse <#>"

1 - axe
2 - shotgun
3 - super shotgun
4 - nailgun
5 - super nailgun
6 - grenade launcher
7 - rocket launcher
8 - thunderbolt

For instance, bind e "impulse 7" to map the rocket launcher to the E key, and bind MOUSE4 "impulse 3" to bind the super shotgun to one of the mouse side buttons.

I assume that alias has to be used, as with the Quake-derived Source engine. Personally I'd for example find having access to both shotguns with one key as convenient.



Best Answer

As an example, this set of commands toggles between the two shotguns with the Q key:

alias select-shotgun "impulse 3; bind q select-super-shotgun"
alias select-super-shotgun "impulse 2; bind q select-shotgun"
bind q select-shotgun

select-shotgun and select-super-shotgun are arbitrary aliases — feel free to rename each to anything you desire, but avoid spaces and special characters (?). Input the lines one-by-one to the in-game console (may not be saved) or add to autoexec.cfg in your Quake folder.

You can use any other weapons by editing the impulse <number> part (see the question for syntax) and rebind by replacing the q keys in the example.


Should be compatible with the original game and more "vanilla-like" source ports such as Quakespasm and the reworked fork Quakespasm-Spiked.

source




Pictures about "How to bind several weapons to one key (toggle between weapons) in Quake?"

How to bind several weapons to one key (toggle between weapons) in Quake? - Free stock photo of adult, army, artillery
How to bind several weapons to one key (toggle between weapons) in Quake? - Four Soldiers Carrying Rifles Near Helicopter Under Blue Sky
How to bind several weapons to one key (toggle between weapons) in Quake? - Black Rifle






Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Mohamed ELamine Msiouri, Mikhail Nilov, Somchai Kongkamsri, Specna Arms