Don't like ads? PRO users don't see any ads ;-)
Guest

startup

By: a guest on Sep 6th, 2012  |  syntax: Lua  |  size: 0.43 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. rednet.open( "right" )
  2. print( "My ID is 4" )
  3. print( "I'm listening" )
  4. while true do
  5.  local scrap, msg = rednet.receive()
  6.  if msg == "forward" then
  7.   turtle.forward()
  8.   print( "Moving forward" )
  9.  elseif msg == "back" then
  10.   turtle.back()
  11.   print( "Moving backward" )
  12.  elseif msg == "left" then
  13.   turtle.turnLeft()
  14.   print( "Turning left" )
  15.  elseif msg == "right" then
  16.   turtle.turnRight()
  17.   print( "Turning right" )
  18.  end
  19. end