Originally Posted by ravagernl
Hmm, this got me thinking... Would this not be possible with a custom state, or are custom states not allowed on unitframes (Is SecureUnitButtonTemplate inheriting attributes/methods of SecureHandlerStateTemplate)?
lua Code:
PlayerFrame:SetAttribute("_onstate-mousestate", [[ self:EnableMouse(newstate == "enabled") ]]); -- Normal, not listening to shift RegisterStateDriver(PlayerFrame, "mousestate", "[combat] disabled; enabled"); -- Disable clicking in combat unless ctrl/shift/alt is pressed -- RegisterStateDriver(PlayerFrame, "mousestate", "[mod] enabled; [combat] disabled; enabled");
|
If this worked then it would help me with what I'm trying to do. I was just using "PlayerFrame" as an example I really wanted get a code that would make it so that I could click through raid frames during combat unless a modifier is being used like shift,ctrl,alt. Instead of "PlayerFrame" it would be "CompactRaidGroup1Member1" (I would actually have to do it for every raid member up to 10 because I just want it for 10 mans so CompactRaidGroup1Member2, CompactRaidGroup1Member3 etc).
I just tried this and it didn't work for PlayerFrame and I tried in and out of combat.