Posted 14 April 2013 - 01:34 AM
Hi. I just installed computer craft, and messed around with turtles. I was able to make a program that will get Flint for me.
http://pastebin.com/5TvXRhQV
That's the code. It's VERY simple, I am really a beginner with ComputerCraft so I made the code with what I know.
Currently it only has one issue. When it changes to slot 3, it keeps going back and forth from slot 3 to slot 2.
I know why this happens, but I must ask you if it is possible to assign a function to a "while" loop, so when the turtle changes to slot 3 it keeps placing and digging the gravel.
Question 2: How do I make it so when the turtle detects that the current slot has no gravel, and then moves on to the next one?
Question 3: And how do I make it so when the turtle uses up all gravel in all slots, it goes get gravel at a chest?
I'm sorry for so many questions, but I would really appreciate it if you could tell me how to make them possible. Thank you!
http://pastebin.com/5TvXRhQV
That's the code. It's VERY simple, I am really a beginner with ComputerCraft so I made the code with what I know.
Currently it only has one issue. When it changes to slot 3, it keeps going back and forth from slot 3 to slot 2.
I know why this happens, but I must ask you if it is possible to assign a function to a "while" loop, so when the turtle changes to slot 3 it keeps placing and digging the gravel.
Question 2: How do I make it so when the turtle detects that the current slot has no gravel, and then moves on to the next one?
Question 3: And how do I make it so when the turtle uses up all gravel in all slots, it goes get gravel at a chest?
I'm sorry for so many questions, but I would really appreciate it if you could tell me how to make them possible. Thank you!