my first REAL attempt at anything lua/turtle related and this is what i came up with, or rather what one of my friends requested i try to figure out.
So, basically its a nice little program that tell the turtle how high to to drop the tnt or other bombs of your choosing, then how far to go, and how often to drop them, and of course to come back and await you next evil bombing orders.
it looks a little something like this : [media]http://www.youtube.com/watch?v=qXLf3Oc_RrA&feature=plcp[/media]
Here is what i had on the floppy disk as the startup program :
fs.copy("disk/bombs","bombs")
rednet.open("right")
print("Ready to Go ")
turtle.forward()
shell.run("bombs")
so nothing too bad or hard there right?
well here is the other program on the disk referred to as "bombs" :
turtle.forward()
turtle.turnRight()
x = 10 so this is the part in the video as im sure you can tell were the cute little turtles turn and go right forming their little line~
while x > 0 do
turtle.forward()
x = x-1
end
turtle.turnLeft() facing forwards once again, always an important step, getting ready for lift off
turtle.select(1)
rs.setOutput("bottom", true)
sleep(20) this is here to provide ample setup time for explosive insertion into the first inventory spot of the turtles
x = 25 change this number to change how many blocks high they go, thats really all it does, for bigger explosions, higher is better to keep them nice and safe
while x > 0 do
turtle.up()
x = x-1
end
x = 25 this part is how far forward they go before starting the bomb dropping, again change just this number to change that
while x > 0 do
turtle.forward()
x = x-1
end
x = 10 ok so this is the part were since i am new to this, i just had to do it the only way i could find that worked, so bascally, they will go 40 spaces
while x > 0 do
turtle.forward() 10 cycles of the 4 forwards, and a drop
turtle.forward()
turtle.forward()
turtle.forward()
turtle.placeDown()
x = x-1
end
turtle.turnRight() turning aroundddddd
turtle.turnRight()
x = 66 aaaaaaaaaaaaaand on their way back, i arrived at this number by counting the 40 spaces in the drop sequence, the 25 forward at the beginning(1at start)
while x > 0 do 40 +25+1 = 66 so they should come all the way back
turtle.forward()
x = x-1
end
turtle.turnLeft() turn back around facing outwards
turtle.turnLeft()
x = 25 and coming back down to the starting positions of them
while x > 0 do
turtle.down()
x = x-1
end
all done, nothing too bad i hope, suggestions and any great tutorial links would be awsome
also i thought that may a bit hard to read or copy so ill just make a file here with a text file with it all too~