Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- prox = sensor.wrap("left")
- m=peripheral.wrap("top")
- while true do
- local targets = prox.getTargets()
- for name, basicDetails in pairs(targets) do
- -- get more details about them
- local moreDetails = prox.getTargetDetails(name)
- m.setCursorPos(math.floor(moreDetails.Position.X+30),math.floor(moreDetails.Position.Z+30))
- m.write("X "..name)
- end
- sleep(1)
- m.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement