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