Originally Posted by Baertram
Event_zone_changed does not fire for all changed zones afaik, only if you are e.g. inside a city and step out to the worldmap again etc.
Try EVENT_PLAYER_ACTIVATED instead (fires after login, loading screens where you changed a zone etc.). You can do the zone check there, by using
API functions like
Lua Code:
local zoneIndex = GetCurrentMapZoneIndex() --Either: local zoneName = zo_strformat(SI_UNIT_NAME, GetZoneNameByIndex(zoneIndex)) --or if you also need the zoneId: local zoneId = GetZoneId(zoneIndex) local zoneName = zo_strformat(SI_UNIT_NAME, GetZoneNameById(zoneId)) --Parent zoneId is the id of the parent's zone, e.g. if you are inside a delve in Alik'r Desert the zoneId is the one of the delve and the parentZoneId is the one of the zone (e.g. Alik'r) loca parentZoneId = GetarentZoneId(zoneId)
etc.
|
wow...so glad I checked out this thread...had no idea playeractivated is after map zone changes too
thanks baertram