Jump to content




Turtle timer


  • You cannot reply to this topic
3 replies to this topic

#1 commander0161

  • New Members
  • 1 posts

Posted 02 February 2013 - 02:48 PM

Im trying to make a timer so that my turtle will break a block in front of him after a few seconds. example, if i place a piece of gravel in front of it, there will be a few seconds for a delay, then it'll break it.

#2 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 02 February 2013 - 02:56 PM

That's relatively simple.

repeat until turtle.detect()
turtle.dig()


#3 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 03 February 2013 - 02:15 AM

add a sleep in between those for the delay

#4 ChunLing

  • Members
  • 2,027 posts

Posted 03 February 2013 - 09:18 PM

Between the repeat and the until, to be exact.
repeat sleep(3) until turtle.detect()
turtle.dig()





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users