This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
commander0161's profile picture

Turtle timer

Started by commander0161, 02 February 2013 - 01:48 PM
commander0161 #1
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.
Kingdaro #2
Posted 02 February 2013 - 02:56 PM
That's relatively simple.


repeat until turtle.detect()
turtle.dig()
KaoS #3
Posted 03 February 2013 - 02:15 AM
add a sleep in between those for the delay
ChunLing #4
Posted 03 February 2013 - 09:18 PM
Between the repeat and the until, to be exact.
repeat sleep(3) until turtle.detect()
turtle.dig()