Thread Tools Display Modes
06/08/14, 02:04 PM   #1
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 58
Question Need More Mapping Help, May Be ESO bug?

Both

Lua Code:
  1. local MapSubzone = GetMapName()                                                                    
  2. local MapName = LMP:GetZoneAndSubzone(true)

are acting VERY strange for me, im trying to log NPCs to a database based on zone/subzone, im finding that if i go to the map and browse to another area from the one that i am in and just Esc out of the map GetMapName() and LMP:GetZoneAndSubzone(true) haved changed thier vars to the new map i was on therefor when i retarget the same NPC it relogs it again in the new area...... i am uesing SetMapToPlayerLocation() but it seems to bug the main map out untill a keypress is done on the map but does semi work to return GetMapName() and LMP:GetZoneAndSubzone(true) to the current map player location

any ideas is thier maby a better way to determain current player location other then map functions maby a way to fix this isssue?

thank you in advance

So i added
Lua Code:
  1. ZO_PreHookHandler(ZO_KeybindStripControl, 'OnHide', function()
  2.         SetMapToPlayerLocation()
  3.     end)

to my onload and it works but still seems to bug the map untill a mouse press is done still .... just seems SetMapToPlayerLocation() does set it to player position but the tiles dont refresh when you open the map untill a mouse press :S

Last edited by SkOODaT : 06/08/14 at 02:34 PM.
  Reply With Quote
06/08/14, 02:25 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
All map functions are linked with WolrdMap, so you have to make sure that map is set to player location. The best way is probably to use:

Lua Code:
  1. if SetMapToPlayerLocation() == SET_MAP_RESULT_MAP_CHANGED then
  2.    CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged")
  3. end
Set map to the player location and if map is changed, fire callback to update the WorldMap.
  Reply With Quote
06/08/14, 02:39 PM   #3
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 58
Originally Posted by Garkin View Post
All map functions are linked with WolrdMap, so you have to make sure that map is set to player location. The best way is probably to use:

Lua Code:
  1. if SetMapToPlayerLocation() == SET_MAP_RESULT_MAP_CHANGED then
  2.    CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged")
  3. end
Set map to the player location and if map is changed, fire callback to update the WorldMap.
Wow Thank you so much again lol this worked flawless
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Need More Mapping Help, May Be ESO bug?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off