how to repeat comand?
Started by CzerPL, Oct 26 2012 06:21 PM
17 replies to this topic
#1
Posted 26 October 2012 - 06:21 PM
HOw to repeat 2 comand in turtle?? :
i writed
while turtle.detect() do
dig...
forward....
end
while not detect do..
turnLeft..
end
what and where i must write to turtle repeat this??
i writed
while turtle.detect() do
dig...
forward....
end
while not detect do..
turnLeft..
end
what and where i must write to turtle repeat this??
#2
Posted 26 October 2012 - 06:24 PM
If you want a turtle to repeat something 'x' times
If you want the turtle to repeat forever
for i=1,x do <code> end
If you want the turtle to repeat forever
while true do <code> end
#3
Posted 26 October 2012 - 06:24 PM
while true do -- code here end
#4
Posted 26 October 2012 - 06:29 PM
?? where write "while true do" ???
i write when detect do
i write when detect do
#5
Posted 26 October 2012 - 06:31 PM
where i must write " while true do" ??
#6
Posted 26 October 2012 - 06:33 PM
this is my program, copy and write where i must write what
when turtle.detect() do
turte.dig()
turtle.forward()
end
when not turtle.detect() do
turtle.turnLeft()
end
when turtle.detect() do
turte.dig()
turtle.forward()
end
when not turtle.detect() do
turtle.turnLeft()
end
#7
Posted 26 October 2012 - 06:36 PM
while true do
while turtle.detect() do
turte.dig()
turtle.forward()
end
while not turtle.detect() do
turtle.turnLeft()
end
end
#8
Posted 26 October 2012 - 06:37 PM
thanks
#9
Posted 26 October 2012 - 06:38 PM
#10
Posted 26 October 2012 - 06:39 PM
how to stop turtle?
#11
Posted 26 October 2012 - 06:39 PM
Kill it
#12
Posted 26 October 2012 - 06:40 PM
no!!!!
xd
xd
#13
Posted 26 October 2012 - 06:46 PM
Seriously, just pick it up with a pickaxe. He'll be ok.
#14
Posted 26 October 2012 - 06:46 PM
Open him up again, and hold Ctrl and T
#16
Posted 26 October 2012 - 06:49 PM
Just open the console and hold down Ctrl+t (I think that you may need to use right control button).
Ninjas everywhere!
Ninjas everywhere!
Edited by ChunLing, 26 October 2012 - 06:49 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












