Posted 28 June 2013 - 08:48 AM
Title: Turtle facing south placing ladders problem
N00b question:
How do I get ladder placement to work no matter what direction the turtle is initially placed?
I've been working on my first piece of Lua/CC Turtle code (yes it is yet another tower builder at the moment) and I am stumpped by the eratic behavior of this piece of code. For the life of me I can't seem to figure out how to get the ladders to always line up when I place them. From what I can figure out the ladders only seem to place properly when I set the turtle down facing south. I have no idea why or how to properly place the ladders so they always end up where I want them. This is just a working code fragment from a future larger project. Suggestions on how to handle users not following directions, the ability to pick up where it left off after a restart, and general code cleanup are very welcome.
To run the code place at least 10 buildable blocks (no sand, gravel, and the like) in the first 12 slots, 4 or more ladders in slots 13-15 and enough fuel to move 4 steps up in slot 16.
I haven't fully vetted the refueling code yet as I have been placing fueled up turtles for testing.
Thanks for any help/suggestions you may have
http://pastebin.com/Ecn5uarB
stuff that may be relevant: FTB Ultimate 1.4.7 v 1.1.2
"name" : "ComputerCraft",
"version" : "1.5",
"url" : "http://www.computercraft.info",
"credits" : "Type 'help credits' on an in-game computer",
"authors": [
"dan200",
"Cloudy"
N00b question:
How do I get ladder placement to work no matter what direction the turtle is initially placed?
I've been working on my first piece of Lua/CC Turtle code (yes it is yet another tower builder at the moment) and I am stumpped by the eratic behavior of this piece of code. For the life of me I can't seem to figure out how to get the ladders to always line up when I place them. From what I can figure out the ladders only seem to place properly when I set the turtle down facing south. I have no idea why or how to properly place the ladders so they always end up where I want them. This is just a working code fragment from a future larger project. Suggestions on how to handle users not following directions, the ability to pick up where it left off after a restart, and general code cleanup are very welcome.
To run the code place at least 10 buildable blocks (no sand, gravel, and the like) in the first 12 slots, 4 or more ladders in slots 13-15 and enough fuel to move 4 steps up in slot 16.
I haven't fully vetted the refueling code yet as I have been placing fueled up turtles for testing.
Thanks for any help/suggestions you may have
http://pastebin.com/Ecn5uarB
stuff that may be relevant: FTB Ultimate 1.4.7 v 1.1.2
Spoiler
"modid" : "ComputerCraft","name" : "ComputerCraft",
"version" : "1.5",
"url" : "http://www.computercraft.info",
"credits" : "Type 'help credits' on an in-game computer",
"authors": [
"dan200",
"Cloudy"