#Custom Anchor
19 messages · Page 1 of 1 (latest)
This is the following code:
function() if GetSpecialization() == 2 then return WeakAuras.GetRegion("Aura_1") else return WeakAuras.GetRegion("Aura_2") end end
what is the trigger
but group have weakauras in them
Sure, there a lot of auras inside, all of them track buffs
And even if they are updated, the custom anchor function is never fired
easiest way would be make 2 groups for each spec
Ye sure, but The are a lot of aura in that should be shared
Or i could solve this problem if it would possible to use a dynamical group inside to another dynamical group
PLAYER_TALENT_UPDATE is the event you want for that.
Yes but this is a custom anchor function of a group, not of an aura. So it's not fiered in any trigger update since groups don't have any. Also when a aura inside the group is triggered, the anchor function of the group is not fired. To fired it i can only relod ui or open/close the editor inside this function
If from another aura I get the region of the interested group, is possible to use a function of region to SetAnchorPoint?
So it’s not fired from custom anchor function but inside a trigger of another aura
what are you anchoring it to? if its not anchored to something moving and its gonna stay in a static location on the screen thenyou could probably do this in using custom some custom code in animations maybe? something like instead of changing the anchor when spec is changed, change it from startX and startY to deltaX and deltaY. (no actual animation, just moving it from one spot to another)
Follow up: i just tested this on a group and it seems to work. no need to reload or open the options, just changing the variable does it. ```function(progress, startX, startY, deltaX, deltaY)
if VARIABLE == "SOMETHING"
then
return deltaX , deltaY
else
return startX, startY
end
end``` swap out the VARIABLE and the SOMETHING for the appropriate info and then set the variable in one of the auras using the code you posted above. this again is only really a viable solution if what youre trying to anchor it to isnt something thats going to move around.
How did you test this on a group? Group doesn’t has any animation sections, so you are adding this shifting in every aura inside the group, and it’s not the best solution
It would very easy if in anchor custom code I can specify a list of event that fire the function, like trigger or custom condition, otherwise the purpose to have a custom function for groups when it is never fired, is completely useless