#Anchor to players unit frame rather than the party frame of the player

33 messages · Page 1 of 1 (latest)

velvet wolf
#

As you can see when I try and anchor something to 'Unit Frames' in position settings and have a trigger for the Players health, it is anchoring to my players party frame and not my player unit frame:

https://wago.io/fXgtjV_13

Wago.io is a database of sharable World of Warcraft addon elements

#

I know I can anchor this to a specific frame and select that frame but I was hoping this WA could be a little more universal than just working with SUF.

#

Ok possibly beyond the scope of this discord but why can I not call

SUFUnitplayer.healthBar.GetHeight()

Even if I provide a bool arg it says the argument is bad but the wowpedia docs suggest that a bool is what is needed.

rare lantern
#

Eeh, remember someone asked the same question here but it was some months ago, i think you can just do

    return SUFUnitplayer or "NameOfElvuiframe" or PlayerFrame
end```
#

If PlayerFrame is the name of blizzards playerframe ^^

velvet wolf
#

And where do I return this from btw?

rare lantern
#

Anchor to -> Custom

velvet wolf
#

ty tyt y!

rare lantern
#

I think there was some issue about the frames perhaps not existing upon login or smth but give it a try

velvet wolf
#

Can I access the anchored to frame in any way from an init function for example? to set the position and size of the weakaura based on the dimensions of the anchored to frame

#

aura_env.anchoredFrame for example or something along those lines, does that exist?

rare lantern
#

!DevTool

#

!vdt

wheat wigeonBOT
velvet wolf
#

ty

#

ik how to use this, should be able to find it

rare lantern
#

gl gl!

velvet wolf
#

thanks 😄

#

bit of a mouthful

rare lantern
#

I think Suf changes the width of the healthbar when the hp changes and doesnt use SetValue, while the width of the sufplayerframe stays static (so when taking damage the width changes)

#

So be mindful of what frame you want the width from

velvet wolf
#

thats very useful info, tyvm

#

Hmm, still getting an error when trying to get the height:

print(aura_env.region.relativeTo.GetHeight())

#

Ahh, should be print(aura_env.region.relativeTo:GetHeight())

#

Ok next question sorry.

aura_env.region.height = height```

This doesn't seem to actually be updating the height of the WA despite the fact I can see the height changing in DevTools. Am I missing something critical here?
#

This code is in On Init but also doesn't work in On Show

#

aura_env.region:Update() does not seem to help monkahmm

#

sorted.

aura_env.region:SetRegionHeight()

tawdry urchin
tawdry urchin
tawdry urchin
#

or look through the github wiki

velvet wolf