Could you also add this?
PHP Code:
function tiles(cx,cy,cw,ch) {
temp.ctiles = new[0];
for (temp.i=0;i<cw*ch;i++) {
ctiles.add(tiles[int(cx+(i%cw)),int(cy+int(i/cw))]);
}
return ctiles;
}
player.chat = tiles(x,y,width,height);
Would return an array of all tiles within the 'blocl' given. I get tired of having to run loops all the time to check a block of tiles.