Diablo #1 i use the mod function for tiled mapsie. tx = (mousex() - (mousex() mod tilewidth)) / tilewidth ty = (mousey() - (mousey() mod tileheight)) / tileheight if mousehit(1) then map[tx, ty] = placetile