Convert True _x; coord ToMapX

Hi guys


I have a little problem, I want to set an animation on an image.
I get the picture coor with those function


$gameScreen._pictures[205]._x;


$gameScreen._pictures[205]._y;


But I need found formula to convert to map X, Y
Somes have an idea ?


I kwno some function like:


SceneManager._screenWidth ;


$gameMap.width() ;


$gameMap.tileWidth();


And this work


$gameMap.canvasToMapX(TouchInput.x);


But only for mouse ... :stare:


Tank you
the picture coordinates are in pixels, the map coordinates as grid numbers - and the grid is based on 48x48 pixel tiles.


So simply divide by 48 and drop the rest to full integers
the picture coordinates are in pixels, the map coordinates as grid numbers - and the grid is based on 48x48 pixel tiles.


So simply divide by 48 and drop the rest to full integers

yes i understant but this give me only the screen map X on screen


its a large map , a need the true coor X of the map 
either there is something you didn't tell us about the problem, or you're thinking too much.


There is no need for animations outside the screen area - they're invisible anyway.


And converting between picture coordinates and screen coordinates would be a simple offset that can be remembered from the time of the picture placement.

Original thread: https://forums.rpgmakerweb.com/threads/convert-true-_x-coord-tomapx.66599/