Jump to content

[LE] Does anyone know how to get Coord data (x,y) from a Location?


Recommended Posts

Get the X and Y position of the object and divide both by 4096.

 

Something like(tested)

Float CoordX
Float CoordY

Function GetCellCoordinates(ObjectReference akRef)
                    
    CoordX = akRef.GetPositionX() / 4096.0
    CoordY = akRef.GetPositionY() / 4096.0

EndFunction

If you don't want absolute coordinates and just the X Y of the Cell seen in the editor, cast both as int to remove the decimals to the right.

 

Now in case you get the idea that you can move things to position based on cell coordinates, I can confirm that being possible, but I believe some knowledge in trigonometry is needed as my testing shows that moving based on coordinates alone will have actors/objects in mid air.

Edited by TheDungeonDweller
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...