SHOW:
|
|
- or go back to the newest paste.
1 | os.loadAPI("ocs/apis/sensor") | |
2 | ||
3 | s = sensor.wrap("right") | |
4 | m = peripheral.wrap("top") | |
5 | term.redirect(m) | |
6 | ||
7 | while true do | |
8 | ||
9 | term.clear() | |
10 | term.setCursorPos(1, 1) | |
11 | ||
12 | t = s.getTargets() | |
13 | ||
14 | for k, v in pairs(t) do | |
15 | - | print(k.." : "..v.Name.." ("..tostring(pos.X)..", "..tostring(pos.Y)..", "..tostring(pos.Z)..")") |
15 | + | |
16 | pos = v.Position | |
17 | - | end |
17 | + | --print(k.." : "..v.Name.." ("..tostring(pos.X)..", "..tostring(pos.Y)..", "..tostring(pos.Z)..")") |
18 | ||
19 | end | |
20 | sleep(1) | |
21 | end |