I want to get the position of raid members in the instance!I tried using C_map.GetPlayerPosition () and UnitPosition () but they both return nil! Is there a better way to get it! distance is greater than 100!
I want to get the position of raid members in the instance!I tried using C_map.GetPlayerPosition () and UnitPosition () but they both return nil! Is there a better way to get it! distance is greater than 100!
Is this what you're using: API GetPlayerMapPosition | WoWWiki | Fandom ?
"A one-time call to SetMapToCurrentZone() is required before GetPlayerMapPosition() will return the correct values.".
If it returns 0, the article mentions these possible reasons:
If both posX and posY are exactly 0, the position is unknown, unknowable, or not valid for the current map, i.e.
- The map hasn't been updated yet; either open the map or use SetMapToCurrentZone() after entering a new zone
- An unsupported unitId was given.
- You're actually at 0,0 in a given map, which although its unlikely, its perfectly possible and legal.
thank you for your help!but WoWWiki clearly states that nil will be returned if in a dungeon or battlefield! I want to ask is it possible to return the result correctly by means of memory editing! Such as directly calling the address of Unit_getposition ()