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

Turtle floating island program

Started by Mr_two_percent, 31 January 2018 - 03:33 PM
Mr_two_percent #1
Posted 31 January 2018 - 04:33 PM
I want a program that will build a floating island (just a upside down peramid ) can someone help me I have 0 knowledge on programming in computer craft
LoganDark2 #2
Posted 01 February 2018 - 02:25 AM
https://www.lua.org/pil/1.html
KingofGamesYami #3
Posted 01 February 2018 - 05:03 AM
I would start with building a simple square.

A square can be built using two for loops and a few turtle commands, for example:


local function buildSquare( nSide )
  --# repeat nSide times
  for x = 1, nSide do
    --# build a straight line nSide blocks long
    for y = 1, nSide do
      turtle.placeDown()
      turtle.forward()
    end
    --# turn around
    turtle.turnRight()
    turtle.forward()
    turtle.turnRight()
    turtle.forward()
  end
end

buildSquare( 5 ) --# build a 5 x 5 square