-
Posted by malzy on Wed, 18 Mar 2015 20:59:18
Alright, so I'm completely new to this whole AddOn thing, but i just recently started turning scripts into AddOns etc.
As I am using the default blizzard raidframe for arenas, i wanted a way to make sure the frames stayed where i wanted them at all times. So far i got this.
--Bottom Target LoadAddOn("Blizzard_CompactRaidFrames") CRFSort_Group=function(t1, t2) if UnitIsUnit(t1,"YYYY") then return false elseif UnitIsUnit(t2,"YYYY") then return true else return t1 < t2 end end CompactRaidFrameContainer.flowSortFunc=CRFSort_Group --Top Target LoadAddOn("Blizzard_CompactRaidFrames") CRFSort_Group=function(t1, t2) if UnitIsUnit(t1,"XXXX") then return true elseif UnitIsUnit(t2,"XXXX") then return false else return t1 < t2 end end CompactRaidFrameContainer.flowSortFunc=CRFSort_Group
XXXX being the name of the player i want on top, and YYYY being the name of the player i want on bottom. As of right now, the code works, but i wondered if there was any way to change names of XXXX and YYYY via an in-game command. This is probably way more complicated, but it would be cool if it was doable.
Thanks,
Malyzion