Posted 19 May 2013 - 06:11 PM
Hello! I am writing a program that will build your base to whatever scale you want. I really am not good with lua, but I know java and C++ so it will come fast. I was wondering if someone here could point me to a tutorial, or demonstrate a way to make a turtle return to where it started. I was thinking something like this:
I was wondering how I would make it switch to the zpos variable and not add to the xpos. I am sure there is an easier way, if there is please let me know! I really dont want to make a GPS system, id rather be able to code it into the turtle for if I want to use it w/o much resources.
Thank you for your time, CtrlAltElite
P.S. IF you are a trusted rank and want to help me in game, Ill start up a server and PM you the address.
--[SkidProof]--
xpos = 0
ypos = 0
zpos = 0
repeat
if turtle.turnsRight() then
xxxxxxxx
end
if turtle.goesup() then
ypos = ypos + 1
end
if turtle.goesForward() then
xpos = xpos + 1
end
until programEnds()
I was wondering how I would make it switch to the zpos variable and not add to the xpos. I am sure there is an easier way, if there is please let me know! I really dont want to make a GPS system, id rather be able to code it into the turtle for if I want to use it w/o much resources.
Thank you for your time, CtrlAltElite
P.S. IF you are a trusted rank and want to help me in game, Ill start up a server and PM you the address.