edit: is there any hook to se if a breakable entry thing has been damaged
edited 1×, last 26.06.11 03:42:45 pm
local rect = {x, y, width, height} xsize, ysize = (1+map("xsize")), (1+map("ysize")) output = {} for i = rect.x+rect.y*xsize, (rect.x + rect.width)+(rect.y + rect.height)*xsize -1 do 	local x,y = i%ysize, math.floor(i/ysize) 	if entity(x, y, "type") == 25 then table.insert(output, {x,y}) end end
xsize, ysize = (1+map("xsize")), (1+map("ysize")) cache = {} for i = 0, xsize * ysize -1 do 	local x,y = i%ysize, math.floor(i/ysize) 	if entity(x,y,"type") == 25 then table.insert(cache, {x,y}) end end