View Single Post
03-04-13, 01:19 PM   #11
Dynamicz
A Defias Bandit
Join Date: Mar 2013
Posts: 3
Originally Posted by ravagernl View Post
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:
  1. PlayerFrame:SetAttribute("_onstate-mousestate", [[
  2.     self:EnableMouse(newstate == "enabled")
  3. ]]);
  4. -- Normal, not listening to shift
  5. RegisterStateDriver(PlayerFrame, "mousestate", "[combat] disabled; enabled");
  6. -- Disable clicking in combat unless ctrl/shift/alt is pressed
  7. -- 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.
  Reply With Quote