View Single Post
02-12-16, 06:20 PM   #23
tyroneexe
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Feb 2016
Posts: 13
Originally Posted by SDPhantom View Post
This is where we get into listening for events. Right under where you set up your container frame, put this in.
Lua Code:
  1. frame:RegisterEvent("PLAYER_ENTERING_WORLD")--  Load screen disapears
  2. frame:RegisterEvent("ZONE_CHANGED_NEW_AREA")--  Moved into new area
  3. 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?
  Reply With Quote