#Custom attach to frame
1 messages · Page 1 of 1 (latest)
Eh?
Curious, what are you trying to do that you need to Change the parent?
my healthBar wa(luxthos wa) has different position depending on a class/spec, i want to attach debuffs weakaura to it(so i have debuffs on hp bar) but i dont want to make a copy for each class i play
like this
You'd probably have to utilise scan events to tell which Aura is loaded, not sure if an aura can tell what another aura state is.
But it seems like WA does have a function to set anchors to other auras
local region = aura_env.region
region:SetAnchor("BOTTOMLEFT", WeakAuras.GetRegion("Other Aura"), "TOPRIGHT")
-- Anchors the aura to another aura.
SetAnchor(anchorPoint, relativeTo, relativePoint)
https://github.com/WeakAuras/WeakAuras2/wiki/Editing-Aura-Regions
I'm also going to assume that partial names don't work, so you'd probably have to create 38 conditions for each scan event for each spec
its each class actually, each class has its own hp bar
and i thought its possible to set anchors to other auras because you can do it in wa as on screenshot above
It is, but I generally only do it through the WA Options interface
and the Function above looks like the one you'd use if you wanted to code it.
So given the position of the ? in the SS above
SetAnchor("TOPLEFT", WeakAuras.GetRegion("HP bar name"), "TOPLEFT")
i'll try it, thank you for this
If you're gona do this for Multiple Auras, it might be easier to make a "Blank" aura that moves around and just have the debuffs anchor to the "Blank" in the options menu