#Disable specific keybindings in combat
1 messages · Page 1 of 1 (latest)
no
You should be able to hook a script to it so that if you are in combat and open the bags or maps it instantly closes (you won't notice it's open). The keyword here is "should", not exactly sure how opening bags and maps is handled on an event level
I'm sure someone with some spare time on the hands can help you with that if you ask for it.
If not I'd be happy to help when I'm done with some of my own work later
But like Spaten said, you can't disable the keybinds themselfs
you just hook the OnShow handler of the bag frame
like ContainerFrameCombinedBags:HookScript("OnShow", function() if InCombatLockdown() then CloseAllBags() end end)
ContainerFrameCombinedBags being my bag frame, yours might be different
and instead of CloseAllBags() you can do ContainerFrameCombinedBags:Close() as well, which should actually be better
worth noting though that hooks are permanent until you reload or use SetScript
but I guess using SetScript on default frames is not a nice idea, don't know what you might mess up with that
Wago.io is a database of sharable World of Warcraft addon elements
here u go
updated to toggle M and B key
No
SetBinding can't be called in combat.
For obvious reasons, it would allow huge amount of automation and trivialize combat
no it does not for me
SetBinding is protected and can't be called in combat
not saying it didn't work for whatever you tested, but it doesn't for me and that's consistent with it being a protected function 🤷♂️
how did u test it, so i can maybe reproduce it for me
get in combat with a mob
but if it works for the one that's concerned, whatever I guess