Solved it myself with this:
But its not pretty !, must be an better way of doing it than what I'm doing :/
Function return_tile(xtemp,ytemp,ly) x=layer(ly)\x_offset# tilex = (xtemp-x)/64 tilex=(tilex+layer(ly)\x_map)+1 Text 100,340,"Tile X:"+tilex,True,True tilex2=xtemp/64 offsetx=xtemp - tilex2 * 64 offsetx=offsetx+(64-x) If offsetx>64 offsetx=offsetx-64 Text 200,340,"Offset X:"+offsetx,True,True End Function
But its not pretty !, must be an better way of doing it than what I'm doing :/