I am new to lua scripting, and I have a problem with RegisterEvent.
I was running a custom addon usually just to hide stuff like error speach or player text healing
This commands where executed on Frame:RegisterEvent("PLAYER_LOGIN") and was working ok.
Now I took it a step further and wanted to play a bit with the Buff, Debuff Frames to move an anchor them as I please.
The problem is that Frame:RegisterEvent("PLAYER_LOGIN") does not work for moving the BuffFrame.
From my understanding, it seems like my addon loads and executes the code before the Default Blizzard Action that handles the de buff positioning.
For testing, I tried to use "CHAT_MSG_YELL" and "UNIT_AURA" events. And it seems it is working as intended. When I type in chat "/y test" the addon fires and adjusts the positioning of the frame.
Same when I receive a new aura (Power world shield for example).
Is there a way, to simply execute my positioning commands just Once and not everytime I get a new aura?
(Similar behavior as Player_Login which executes commands /console reloadui)
local Frame = CreateFrame("Frame")
--Frame:SetScript("OnEvent", function(self, event, ...)
--Your hiding code goes between this line
--And this one
local pb = BuffFrame:GetName();
print("Argh, stop with the yelling!");