So the one thing I have never really dipped into was ComputerCraft, but I figured I would need to do it sooner or later. I've been playing around with some code in the LUA interface on a crafty turtle to attempt to make a turtle autocraft oak wood into planks and then spit the planks into a separate chest. I have accomplished this somewhat, but there are two things I can't seem to get right.
#1. Is there a way to make the turtle.suckDown() function to only pull a specific amount from the inventory below it or am I stuck with it always pulling however many (up to a stack) that is in the next inventory spot of the chest. I tried using the turtle.dropDown() function to have it put back what I don't want it to use but since the wood it would be getting from the first chest is coming from a tree farm there is no way of knowing exactly how big the next stack it pulls is going to be if that makes sense. So I need to find a way to force the turtle to always grab 1 log at a time from the chest.
#2. Once I have all the code finished, how do I set this code to loop?
My current code is
turtle.suckDown() this currently grabs however many oak logs are in the next available inventory slot of the chest below it
turtle.dropDown(48) This only works if there is a full stack of logs, which is why I am having issue #1
turtle.craft() This turns them into the planks
turtle.dropUp() puts the planks into a chest above the turle
So how would I make that code^ loop over and over after starting it up.
Thanks in advance for any help you guys can provide, since I was unable to find any current help on this matter, I will be making a YouTube video later this week on how to do exactly this.
#1. Is there a way to make the turtle.suckDown() function to only pull a specific amount from the inventory below it or am I stuck with it always pulling however many (up to a stack) that is in the next inventory spot of the chest. I tried using the turtle.dropDown() function to have it put back what I don't want it to use but since the wood it would be getting from the first chest is coming from a tree farm there is no way of knowing exactly how big the next stack it pulls is going to be if that makes sense. So I need to find a way to force the turtle to always grab 1 log at a time from the chest.
#2. Once I have all the code finished, how do I set this code to loop?
My current code is
turtle.suckDown() this currently grabs however many oak logs are in the next available inventory slot of the chest below it
turtle.dropDown(48) This only works if there is a full stack of logs, which is why I am having issue #1
turtle.craft() This turns them into the planks
turtle.dropUp() puts the planks into a chest above the turle
So how would I make that code^ loop over and over after starting it up.
Thanks in advance for any help you guys can provide, since I was unable to find any current help on this matter, I will be making a YouTube video later this week on how to do exactly this.