Posted 26 February 2012 - 03:08 PM
I am kinda new to computercraft and have made a couple of scripts in it, but some scripts i question..
(please organize any answers to avoid confusion please)
Q:
1. How do I copy my script from either turtle or computer to a floppy disk? (number it step by step please)
2. How do I get my turtle to count the blocks so It can go only so many blocks forward?
3. Can I loop a script on my turtle? if so then how? (number step by step)
4. If I am able to copy my script from a turtle or computer how do I get it to read it?
5. How do I have a turtle or computer repeat a set of lines/strings or repeat all of the script?
6. Can someone make a script for me that fills in holes in the ground after an explosion? ex: "ohh no! Creeper!" or Can someone edit my code so it does so? (so far it fills the hole in but turns when a block in front of it is detected so i just make a barrier and square off the hole.)
Code for Question 6. : the script is called "fix" (without "" and all lowercase) if you guys need it for the code.
while turtle.forward() do
turtle.placeDown()
end
if turtle.detect() then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
end
while turtle.forward() do
turtle.placeDown()
end
Here are a few codes that I made (they are really simple to make) : [attachment=43:codes.txt]
(please organize any answers to avoid confusion please)
Q:
1. How do I copy my script from either turtle or computer to a floppy disk? (number it step by step please)
2. How do I get my turtle to count the blocks so It can go only so many blocks forward?
3. Can I loop a script on my turtle? if so then how? (number step by step)
4. If I am able to copy my script from a turtle or computer how do I get it to read it?
5. How do I have a turtle or computer repeat a set of lines/strings or repeat all of the script?
6. Can someone make a script for me that fills in holes in the ground after an explosion? ex: "ohh no! Creeper!" or Can someone edit my code so it does so? (so far it fills the hole in but turns when a block in front of it is detected so i just make a barrier and square off the hole.)
Code for Question 6. : the script is called "fix" (without "" and all lowercase) if you guys need it for the code.
while turtle.forward() do
turtle.placeDown()
end
if turtle.detect() then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
end
while turtle.forward() do
turtle.placeDown()
end
Here are a few codes that I made (they are really simple to make) : [attachment=43:codes.txt]