The tunneling is possible for any balcony with the height of 1 block (16px).
Language: lua
function draw()
CamXPos = memory.readbyteunsigned(0x072A) * 256 + memory.readbyteunsigned(0x072C);
XPos = memory.readbyteunsigned(0x003B) * 256 + memory.readbyteunsigned(0x004D);
YPos = memory.readbyteunsigned(0x0029);
x = XPos - CamXPos;
y = YPos;
CamXShift = CamXPos % 16 + 1;
-- draw grid of level blocks
for i = 0, 16 do
for j = 0, 16 do
gui.box(i * 16 - CamXShift, j * 16, i * 16 + 16 - CamXShift, j * 16 + 16, "#00000040", "#00000090");
end
end
-- draw Link collision points
-- vertical
gui.line(x + 12, y, x + 12, y + 32, "cyan");
gui.line(x + 20, y, x + 20, y + 32, "cyan");
-- horizontal
gui.line(x + 9, y + 6, x + 23, y + 6, "red");
gui.line(x + 9, y + 26, x + 23, y + 26, "red");
-- draw wall signs depending on current result of collision detection
wallFlags = memory.readbyte(0x00A7);
if (AND(wallFlags, 1) > 0) then
gui.box(245, 0, 255, 240, "gray");
end
if (AND(wallFlags, 2) > 0) then
gui.box(0, 0, 10, 240, "gray");
end
if (AND(wallFlags, 4) > 0) then
gui.box(0, 220, 255, 240, "gray");
end
if (AND(wallFlags, 8) > 0) then
gui.box(0, 0, 255, 20, "gray");
end
end
emu.registerbefore(draw);