ohthatsyou Posted September 9, 2017 Share Posted September 9, 2017 Greetings everyone ! Is it possible to get the CoW teleport command coordinates (X,Y) of a specific part from the Heightmap Editor ? At the bottom of the editor there is a "Cell (-17, 15)" line for example but these are not the ingame coordinates (when I tried to use these numbers with cow it teleported me to another part of the map). Link to comment Share on other sites More sharing options...
Evangela Posted September 9, 2017 Share Posted September 9, 2017 (edited) I tested this, and cow took me to the expected cell. I opened up the hieghtmap editor and took a look and the coordinates on the map matched the cell I teleported myself too. But just in case you need to know: To get the cell coordinates as seen in the creation kit, you divide X and Y by 4096. To convert coordinates to values the game engine can understand, you multiply the coordinates by 4096. (This is mostly needed for the papyrus functions) To simplify it further: Cell -17, 15 = 69,632 (GetPositionX() will return this value), 61,440(GetPositionY() will return this value). Those values should also be visible in the heightmap UI, along with the z position. So I'm not sure what's up on your end. You can always check in the console though and use GetPositionX/Y and divide by 4096 to see if the cell you're in is indeed -17, 15. You're just not in a spot you expected to be in within the Cell. I made a function to set coordinates, and I picked the RiverwoodBridge, and I went there but I landed in water :tongue:. Specific spots require plotting down objects and just directly teleporting to them. Edited September 9, 2017 by Rasikko Link to comment Share on other sites More sharing options...
ohthatsyou Posted September 10, 2017 Author Share Posted September 10, 2017 Thank you Rasikko for the help :) ! Link to comment Share on other sites More sharing options...
Evangela Posted July 31, 2018 Share Posted July 31, 2018 (edited) Bumping this thread because the information I posted isn't entirely mathematically correct, almost a year later I corrected that. This thread also appeared in the search list as I'm looking for something else, but figured I'd do a "drive by" correction whilst en route to the intended thread lol. The calculations are sound until you go over to the negative side of either axis, thus the coordinates with be offset by 1. So if for example, your x position is -2048, it will not be (-1, 0) as expected. It'll be 0, 0(actually (-0.5, 0)). To account for this, do this: ; drop fractional part, for this is only integer calculations int posX = object.getPositionX() as int ; ensure correct negative x coordinate is returned, keeping the sign also intact. if posX < 0 return (posX / 4096) - 1 endif return posX / 4096 Edited July 31, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Recommended Posts