View Single Post
07/27/15, 10:49 AM   #16
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I permit myself to bump this thread about an issue I'm having. I would like to calculate coordinates of player..

So:

Go to grahtwood (it's a good exemple)

Lua Code:
  1. /script d(GetCurrentMapZoneIndex())

= 4294967296

Move outside the tree

Lua Code:
  1. /script d(GetCurrentMapZoneIndex())

= 181 (Grahtwood main zoneindex)


Go back to the wayshrine

still 181. not 4294967296.

Open your map, 4294967296 is back

So is there a way to update the good ID without opening map?

Grahtwood is a simple exemple but it happens in every city with a submap and my need is precisly based on cities.

In fact, I'd like to get the actual zoneIndex without reloading map. Or something else but correct wich permits me to calculate coords, because coords 12x23 of belkarth are not 12x23 of craglorn.
Or at least if anyone know how to update this thing without opening map ?

I calculate coords with GetMapPlayerPosition wich sounds correct, but if the map name is wrong, I get wrong coordinates.
GetMapTileTexture() get the same issue, same for GetMapName().
Once you didn't refresh your map by pressing M, function returns incorrect value.

I just looked at libmappins which got this small issue, harvestmap same, and map code is.. way very big and still didn't found what is causing this refresh.