Posted 22 December 2012 - 11:09 PM
Hi another dumb question,
how do I make a bit of code to make the turtle check the current slot for items then if its empty move on to the next one? I have used the turtle.getItemCount to check the number of items and i've managed to get it to check the items then if empty go to slot two but how would i do it so if slot 2 is empty move on to the next slot etc without righting a load of code?
I want to do this because i'm trying to get the turtle to build up a simple house but made out of one material. I know that i can copy codes from the forum but i want to try and do it myself so hopefully i learn stuff for future references etc. I've got it to do what i want at last which is to build four wall four blocks high but i tested the program using a 5 x 5 size square where as the actual building i want to make (a cinema) is 16 x 16 so it runs out of blocks after a while so i need tell it to move on to the next slot if the current slot is empty. How do i do this?
how do I make a bit of code to make the turtle check the current slot for items then if its empty move on to the next one? I have used the turtle.getItemCount to check the number of items and i've managed to get it to check the items then if empty go to slot two but how would i do it so if slot 2 is empty move on to the next slot etc without righting a load of code?
I want to do this because i'm trying to get the turtle to build up a simple house but made out of one material. I know that i can copy codes from the forum but i want to try and do it myself so hopefully i learn stuff for future references etc. I've got it to do what i want at last which is to build four wall four blocks high but i tested the program using a 5 x 5 size square where as the actual building i want to make (a cinema) is 16 x 16 so it runs out of blocks after a while so i need tell it to move on to the next slot if the current slot is empty. How do i do this?