Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- -- pull a laser head for new target
- type, x_, y_, z_, id, meta, res = laser.getScanResult()
- if res ~= -1 then
- firedCount = firedCount + 1
- -- send serialized target info
- target = textutils.serialize( { x = x_, y = y_, z = z_ } )
- print("Target#" .. firedCount .. " is " .. target)
- -- init main laser with target
- modem.transmit(3, 1, target)
- -- init boost (remove comment on next line if you use boosters)
- -- modem.transmit(4, 1, "go")
- end
- sleep(0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement