Difference between revisions of "Turtle Stairbuilder (tutorial)"

From ComputerCraft Wiki
Jump to: navigation, search
(Uses)
(Undo revision 2184 by 94.23.1.28 (talk))
Line 29: Line 29:
 
And there's your code!
 
And there's your code!
  
Hi, I imagine this tirotual is getting a few more hits with Xmas and blizzards.Here is 1 solution to get the audio working. In short, as a citizen1. download the zipped package. 2. open the video in VLC    what still no audio?  Go to audio in VLC then pick  audio track 2  This should get you a cool tirotual with audio.Thanks,Tom
+
==Uses==
 +
 
 +
With a little modification this can be used in ravines to go up or down. Very useful in the nether if your stuck or are fighting off a ghast. Can be used in multiplayer RPG games and such.
 +
 
 +
[[Category:Tutorials]]

Revision as of 14:58, 17 July 2012

Introduction

Welcome to this tutorial about Turtle Stairbuilders.

Programming your Stairbuilder

In this code we will program a stairbuilder that simply goes up a flat surface, when the wall ends it will create a stairway coming off of the wall

First we want it to determine the top of the wall

while turtle.detect() do
 turtle.up()
end

next we want it to decend one block and create the staircase

while turtle.detect() do
 turtle.up()
end
turtle.down()
turtle.back()
turtle.place()
while not turtle.detectDown() do
 turtle.back()
 turtle.down()
 turtle.place()
end
print("Staircase Built")

And there's your code!

Uses

With a little modification this can be used in ravines to go up or down. Very useful in the nether if your stuck or are fighting off a ghast. Can be used in multiplayer RPG games and such.