Originally Posted by SDPhantom
This is where we get into listening for events. Right under where you set up your container frame, put this in.
Lua Code:
frame:RegisterEvent("PLAYER_ENTERING_WORLD")-- Load screen disapears frame:RegisterEvent("ZONE_CHANGED_NEW_AREA")-- Moved into new area frame:SetScript("OnEvent",function(self,event) self:SetShown(GetZoneText()==GetMapNameByID(978)) end)
This compares the name of the zone you enter with the localized name of Ashran.
|
Thanks a bunch. Tested and it works, pops up as soon as I step over the border between Warspear and Ashran. Now I'm ready to steal all the glory and say I did it all on my own
I was wondering something - how does it remember where I placed the frame? I can't see in the code where it is told to do that. Is that something BlizzardsUI does?