This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
akeldama280's profile picture

[Request] Basic Building Programs

Started by akeldama280, 23 March 2013 - 10:24 AM
akeldama280 #1
Posted 23 March 2013 - 11:24 AM
Can anyone Show me some basic variable turtle building programs? Like building platforms, and square rooms?
Kingdaro #2
Posted 23 March 2013 - 11:39 AM
You could probably find one if you search a bit in the turtle programs section.

http://www.computercraft.info/forums2/index.php?/forum/21-turtle-programs/

As a quick example on the side, a basic program to build a 5x5 wall:


turtle.up()
for up=1, 5 do 					-- go up 5 times
	for forward=1, 5 do 			-- go forward 5 times
		turtle.placeDown()      	-- place down a block for this row
		if forward ~= 5 then
			turtle.forward() 	-- only go forward if we are not at the end of the wall
		end
	end
	
	turtle.turnRight()			-- turn around to start the next row
	turtle.turnRight()
	turtle.up()
end