Problem with weaponbank


(KygoHereForYou) #1

Hello. Is it possible to select specific weapon instead of searching it in weaponbank? For example, “weaponbank 3” have 2 weapons: MP40 and Thompson in both teams (axis and allies). When I’m opening this weaponbank (command “/weaponbank 3” is bound to button “3” on keyboard) in allied team firstly I am getting Thompson, in axis I am firstly getting MP40. Is it possible to bound button “3” to select Thompson always and never MP40? I’ve tried to use console commands like this “/weapon Thompson”, “/weapon THOMPSON”, “/weapon 3”… useful. Thank you!


(KeMoN) #2

Unfortunately, the /weaponbank command only supports one variable for the bank and doesn’t have another one for the weapon index name.
So what you want to do is not possible.

The only case where someone has MP40 AND Thompson is Soldier level 4.
After your post we had a thorough discussion in the Legacy team, what we could do about it.

One approach was to assign one SMG to weaponbank 2 and one to weaponbank 3.
That way you could replace one SMG with other primaries and one with other secondaries and you could easily differentiate between the two by pressing either 2 or 3, depending where you put your Thompson.
However, that would significantly blow up the code, since it would also require that the secondary SMG is handled as a completely different weapon than the primary SMG.

Another approach was to create a new command “/weaponbank [bank-index] [weapon-index]” where you could bind a key to “/weaponbank 3 WP_THOMPSON”. That way, it would always select the Thomson and wouldn’t cycle through weaponbank 3. However, that would first of all add another cvar, because it’s not possible to change the current one to that syntax. Plus, it would not completely solve the issue, which means we would add code complexity with a semi-great work-around.

We are actually thinking about this, but it doesn’t look too promising.

If anyone has any thought about this, feel free to hop into Discord.