Mrogo334 Posted June 28, 2017 Share Posted June 28, 2017 I'm using OnLocationChange(Location akOldLoc, Location akNewLoc) and needed help finding a way to get the Coord data from each of the location parameters. Thanks Link to comment Share on other sites More sharing options...
lofgren Posted June 29, 2017 Share Posted June 29, 2017 Locations don't have coordinates. They are groups of cells. Link to comment Share on other sites More sharing options...
TheDungeonDweller Posted June 30, 2017 Share Posted June 30, 2017 (edited) 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 EndFunctionIf 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 June 30, 2017 by TheDungeonDweller Link to comment Share on other sites More sharing options...
Recommended Posts