Posted 16 July 2014 - 10:13 AM
So, for my first ever lua/computercraft program, I've tried making a turtle fence off a 128*128 area.
The program lloks like this:
http://pastebin.com/FWBUHfFh
It's working, but because of the many curious mobs that often feela need to place themselves in front of the turtle, the turtle.forward() command/line/whateveryoupeoplecallit sometimes fails.
With the current program, the turtle doesn't mind that it didn't move, and just continues running, which causes the fence to not be 128*128.
what I want to do is make the turtle keep trying turtle.forward() until it gets a succesful result.
So how does one go about doing that?
Thanks in advance
The program lloks like this:
http://pastebin.com/FWBUHfFh
It's working, but because of the many curious mobs that often feela need to place themselves in front of the turtle, the turtle.forward() command/line/whateveryoupeoplecallit sometimes fails.
With the current program, the turtle doesn't mind that it didn't move, and just continues running, which causes the fence to not be 128*128.
what I want to do is make the turtle keep trying turtle.forward() until it gets a succesful result.
So how does one go about doing that?
Thanks in advance