Banjo Posted April 7, 2020 Share Posted April 7, 2020 (edited) Simple question, related to my other thread but since nothing showed up in searches I thought it would be better to ask in a new one so others can find it for help if they want to do the same... EDIT: SOLVED! I figured it out, but for those who are wanting to know how, here's the code from Robomat's awesome Co-Ordinates Viewer mod... local absX = player:getX(); local absY = player:getY(); local cellX = absX / 300; local cellY = absY / 300; local locX = absX % 300; local locY = absY % 300; absX and absY are "absolute" co-ordinates (where in the whole game world you are) cellX, cellY, locX and locY are "relative" co-ordinates (current cell and location within it, as used in start spawns) Edited April 7, 2020 by Banjo ATPHHe and Maris 2 Link to comment Share on other sites More sharing options...
Maris Posted May 3, 2020 Share Posted May 3, 2020 player:getX() is float, and it may be 1234.5 (absX / 300) is float too! Not integer. So I think there is a mistake... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now