Posted 11 January 2013 - 04:49 PM
Hi there, one more question. Is it possible to detect whether or not a variable is a multiple of a certain number. I want my turtle to place a torch every X blocks, and I can see no way to implement this using a loop (the program is too complex). Each time the turtle goes forward one block in the main shaft the variable D increments by one, so I'm wondering if I can do something like
if D is multiple of X then
for i = 1, 2, 1 do
turtle.turnLeft()
end
turtle.select(torch slot)
turtle.place()
for t = 1, 2, 1 do
turtle.turnLeft()
end
end
Thanks for any feedback.
if D is multiple of X then
for i = 1, 2, 1 do
turtle.turnLeft()
end
turtle.select(torch slot)
turtle.place()
for t = 1, 2, 1 do
turtle.turnLeft()
end
end
Thanks for any feedback.