#anchor to party frames

28 messages · Page 1 of 1 (latest)

vast gull
#

I figured out how to anchor to my playerFrame but I want to dynamically position the icon to my party frames. I am using a custom trigger that uses a combo of cast triggers. I then check the source and target of the cast. When the cast target is someone in the party, I want to position the icon next to the player its targeting. I want this to work with vuhdoo as well as the defaul party frames. I saw I can use /fstack to see what the frame is but I was wondering, if I have the target GUID, whats the easiest way to acquire the correct frame to anchor it to?

for example my current proof of concept custom function in the 'on show'

local targetFrame = _G["PlayerFrame"]
print("target frame: ", targetFrame)

if targetFrame then
    print(aura_env.region)
    aura_env.region:ClearAllPoints()  -- Clear previous anchoring
    aura_env.region:SetMovable(true)  -- Ensure the region is movable
    aura_env.region:SetUserPlaced(true)  -- Allow manual positioning
    aura_env.region:SetPoint("LEFT", targetFrame, "RIGHT", 10, 0)  -- Position to the right of the player frame (change LEFT to RIGHT if needed)
    aura_env.region:Show()
end
cerulean fjord
#

You're making is way harder than it needs to be. Making direct changes to aura_env.region will break built-in functions of weakauras.

You can anchor to party frames in the display tab, that looks for the variable unit in the trigger state and then anchors to the associated frame.

#

You can easily anchor to JUST your party by using a trigger with smartgroup as the unit.

#

but if you want it to swap between your player frame and party frame then you'll need a custom trigger to update the unit variable in the trigger state when appropriate.

desert jacinth
#

What phoenix said is just better unless you want a specific reason for your player frame to be a unique anchor or just don't have yourself on party frames. But would just be better to have 2 auras then. 1 for your party based anchor and 1 for your player frame anchor

vast gull
#

My intention is to have the icon positioned next to the player the spell in targeting in the party frames, which contain me, and the four others. My trigger state does return unit but I cant find the anchor suggestion to save my life. I have ttried looking at the icon, as well as group and dynamic group

north sundial
#

it doesn't have to return a unitId, it needs to have unit field in the state table

#

if you got that, then you can simply use the "anchored to: unit frames" option from the display tab

vast gull
#

ok thank you ill try that

#

Im sorry im not seeing the suggested anchored to: unit frames in any display tab.
The display tab of both the dynamic group and the display tab are the same.
The second image is the group tab of the dynamic group
I tried both nameplates and unit frames but they did nothing.

Is there something I could show from the trigger tab or the code of the custom trigger that could help?

north sundial
#

Im sorry im not seeing the suggested anchored to: unit frames in any display tab.
well yeah if it's in a dynamic group then the dynamic group controls all that

#

is there any reason to have it in a dynamic group?

#

you don't need it if you want to anchor a cloning aura to unit frames

#

I tried both nameplates and unit frames but they did nothing.
group by unit frames should still work though, if your TSU is set up properly

vast gull
#

I moved the icon out of the dynamic group. I applied the unit frames anchor, I increased the icon size and text size. I also printed out the keys and values of state from the custom trigger and I see unit is set to "player" (also tried "Player") I hardcoded that for testing. I also tried the dynamic values for unit from the trigger such as "eonworm-target"

but none of these options are working. Is there something I should take a screenshot of or sent the custom trigger to help debug?

north sundial
#

just export your aura

vast gull
#

https://wago.io/hjZZhAFPU

In the custom options im using flash of light to test for the spellId as a holy paladin. SpellName doesnt work yet and unless im forgetting something you dont need to pick any audio in the custom options for the current testing

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

north sundial
#

that's not a valid unitId for that

#

you need partyX or raidX

vast gull
#

should "player" work as well?

north sundial
#

yes

vast gull
#

did that work for you? perhaps ive implement that test incorrectly, but player doesnt work on my end

north sundial
#

yes it did

#

anchoring to player

vast gull
#

huh, thats helpful. I suppose I should turn off all my other weak auras and addons since it didnt work for me. Ill try sorting out what the difference is on my end but unless Im stumped, I believe this should be enough for now

north sundial
#

anchoring to party4

vast gull
#

I really appreciate your help!

north sundial
#

it's a string btw, unit = "player" not unit = player