Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local laser = peripheral.find("warpdriveLaserCamera")
- local speaker = peripheral.find("warpdriveSpeaker")
- -- Sets the frequency of the laser to 1420
- laser.beamFrequency(1420)
- while true do
- os.sleep(0.5)
- local event, key = os.pullEvent()
- if event == "laserScanning" then
- local type, lx, ly, lz, block = laser.getScanResult()
- block = block or "nil" -- if the block type is nil, replace it with "nil"
- speaker.speak("Laser Coordinates:" .. block .. ", x=" .. tostring(lx) .. ", y=" .. tostring(ly) .. ", z=" .. tostring(lz))
- end
- end
Add Comment
Please, Sign In to add comment