Lore archive · Warcraft Wiki, 2023 dump
CLOSE WORLD MAP
Last wiki revision 2019-04-26
Supposed to fire whenever the world map is closed/hidden, though it doesn't. A workaround for this is to use "WORLD_MAP_UPDATE" to set a global variable to use elsewhere with an OnUpdate function; e.g.
"CLOSE_WORLD_MAP"
local Map_Changed = false; function MyAddon_OnEvent if ( (event == "WORLD_MAP_UPDATE") and WorldMapFrame:IsVisible ) then Map_Changed = true; end end function MyAddon_OnUpdate if ( (Map_Changed) and not WorldMapFrame:IsVisible ) then ...do this... Map_Changed = false; end end
When the second function is called, it checks to see if the map has been opened/closed (Map_Changed), then checks to see if the map is currently open (WorldMapFrame). The effect is a code that executes only when the map closes.
Categories
- API events/Unformatted
Source
https://warcraft.wiki.gg/wiki/CLOSE_WORLD_MAP · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.