Example..
Image/Tile | ingame x,y| image x,y
black tile | 8,39 | 384,112
pics1.png | 15,255 | 2048,512
NPC Code:
//Forumla
temp.tile = tiles[int(mousex),int(mousey)];
temp.tx = BLAH;
temp.ty = BLAH;
//Display of tile
showimg( 200, "pics1.png", screenwidth/2, screenheight/2);
changeimgvis( 200, 4);
changeimgpart( 200, temp.tx, temp.ty, 16, 16);
Basically I need help figuring out what I need to put in temp.tx and temp.ty to get the correct coords to get the image to display the tile the mouse is over.
I've been trying to do this for 2 days now, and I just can't figure out the correct formula ... So could anyone help me ..