Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("right")
- term.redirect(monitor)
- local blah
- local x
- local y
- paintutils.drawPixel(4, 2, colors.blue)
- paintutils.drawPixel(4, 4, colors.yellow)
- paintutils.drawPixel(2, 3, colors.red)
- paintutils.drawPixel(6, 3, colors.green)
- rednet.open("top")
- while true do
- blah, blah, x, y = os.pullEvent("monitor_touch")
- if x == 4 and y == 4 then
- rednet.broadcast("backward")
- end
- if x == 4 and y == 2 then
- rednet.broadcast("forward")
- end
- if x == 2 and y == 3 then
- rednet.broadcast("left")
- end
- if x == 6 and y == 3 then
- rednet.broadcast("right")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement