WoW:API GetSubZoneText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetSubZoneText to WoW:API GetSubZoneText without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Returns the subzone name.
Returns the subzone name.
subzone = GetSubZoneText();


GetSubZoneText();
== Returns ==
;subzone : String - subzone name or an empty string (if not in a subzone).


----
== Related events ==
;''Arguments''
One or more of the following fire when the player enters a new zone:
* {{api|t=e|ZONE_CHANGED}}
* {{api|t=e|ZONE_CHANGED_INDOORS}}
* {{api|t=e|ZONE_CHANGED_NEW_AREA}}


:''none''
== See also ==
 
* {{api|GetZoneText}}
----
* {{api|GetMinimapZoneText}}
;''Returns''
 
:String subzone
:;subzone : string, subzone name or an empty string (if not in a subzone).
 
----
;''Example''
local subzone = GetSubZoneText();
message(subzone);
 
;''Result''
Message box appears with current subzone text.
 
----
;''Description''
 
: Returns the subzone text, if the player is in a subzone. The event '"ZONE_CHANGED"' is triggered when the text changes. See also the related functions [[API_GetMinimapZoneText|GetMinimapZoneText]] and [[API_GetZoneText|GetZoneText]].
: Additional note: Blizzard also registers the event '''ZONE_CHANGED_INDOORS'''. If you know what this event is used for, please edit the page.
 
The event '''ZONE_CHANGED_INDOORS''' is fired (for example) when you walk from "Dun Morogh" into "Ironforge". This sample [http://www.wowace.com/wiki/WelcomeHome_-_Your_first_Ace2_Addon Your first Ace2 Addon] doesn't work when you walk that way cause it is missing the last zone change.

Latest revision as of 04:46, 15 August 2023

WoW API < GetSubZoneText

Returns the subzone name.

subzone = GetSubZoneText();

Returns

subzone
String - subzone name or an empty string (if not in a subzone).

Related events

One or more of the following fire when the player enters a new zone:

See also