Jump to content




looking for a excavate with a depth option

turtle utility

3 replies to this topic

#1 phephe

  • New Members
  • 1 posts

Posted 02 September 2016 - 07:36 AM

i was wonder if there any one here that knows of a simple command or program where you have to type

area 10 -10

and it will dig a area that's 10x10x-10

so 10 forward 10 right then 10 down or up depending on the depth number being negative or positive

i don't know how to code and all the programs i have found dont work the way i need them to or on return dosnt deposit the items

#2 CCJJSax

  • Members
  • 262 posts

Posted 02 September 2016 - 06:33 PM

I don't know of a program like that off the top of my head, but to make a very basic one is rather simple. it's about a series of for loops. where the distance per loopdeloop gets smaller as the turtle gets to the center, then having it go back to it's original position, then go down. and keep repeating that until the depth is fulfilled. give it a shot and if you have some trouble comment on here again what your current code is.

#3 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 02 September 2016 - 06:50 PM

it may be worth editing the existing excavate program, also have you tried googleing it?

#4 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 02 September 2016 - 08:30 PM

If you want to modify the existing program, copy it into a new file and edit these lines:

	end

	depth = depth + 1
	if math.fmod( depth, 10 ) == 0 then
		print( "Descended "..depth.." metres." )
	end

	return true

To look something like this:

	end

	depth = depth + 1
	if math.fmod( depth, 10 ) == 0 then
		print( "Descended "..depth.." metres." )
	end

	return depth < maxdepth






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users