Jump to content




neeed help on this code

turtle computer command

97 replies to this topic

#41 Larry84

  • Members
  • 51 posts
  • LocationItaly

Posted 25 October 2016 - 08:35 PM

Well, the manager is set up so that it will say to just one turtle to go to quarry

Wait, is the manager not sending any turtle at all?

#42 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 25 October 2016 - 08:46 PM

No its not here is the pastebin link to it http://pastebin.com/TGsEffzC
Also it does send the turtle out on the job but I was asking if I have code where it gets gps and sends the turtle a area to mine and so forth

#43 Larry84

  • Members
  • 51 posts
  • LocationItaly

Posted 25 October 2016 - 08:52 PM

No, the gps is just for the turtle, you don't have to modify the manager.
Though, in the manager code you may want to redefine xStart, zStart, xEnd and zEnd according to your wishes, but these are values that you want to give - they are the coordinates the turtle will quarry.
For example, if you want it to quarry from x:476 z:329 to x:490 z:350 in the manager you have to change

xStart = 476
zStart = 329

xEnd = 490
zEnd = 350

Just as an example, of course

Edited by Larry84, 25 October 2016 - 08:55 PM.


#44 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 25 October 2016 - 09:07 PM

Ah so I still will have too enter the area in the manger still then

#45 Larry84

  • Members
  • 51 posts
  • LocationItaly

Posted 25 October 2016 - 09:24 PM

Yeah, simply because it's an area that you define.

You can set a large area and the manager will quarry it all for you if you want it to.

#46 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 25 October 2016 - 10:09 PM

thats what I was wanting to do with it also I am still trying to figure out a other code but I get it later or talk more about later

#47 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 26 October 2016 - 06:07 PM

View PostLupus590, on 25 October 2016 - 04:26 PM, said:

View Postjdanner95, on 25 October 2016 - 03:59 PM, said:

View PostLupus590, on 25 October 2016 - 02:20 PM, said:

View Postjdanner95, on 25 October 2016 - 12:45 PM, said:

I have a question to ask I have made this logging code to make the logging turtle to chop tress I was just wantting to know if there is a way to make it chop red forest trees because I have those in the mode pack I am useing and I am also trying to figure out if there is a way to get it to auto detect and after its done to smelt its own fuel and plant and put the wood back into the chest as it is right now it plants and it chops and it refuels it just don't do the other things
http://pastebin.com/LGnMfbdc
thanks for everything :)

can we have a screenshot of the tree in question?
I am not sure how to paste it into here but it is the redwood tree from the mod natura

upload image to a hosting service, copy a direct link. In post editor, click on image icon (under the smily face) and paste link:

Posted Image

as for a soloution to the problem.... err... you had to pick the ridiculously big one!

get the turtle to map out the base of the tree, then do each column in turn. This will get the truck and some of the leaves but not all of the branches or the roots, but it's a starting point.
so when you said to do a column you mean do {code} turtle.turnLeft {code} right if I anot mistaking and make a fuction to make it remember the base of the tree right? and I alreday have the grounds of a code for it I think but here it is just in case
http://pastebin.com/ZyfaKHYj
LumberJack v1.0

Edited by jdanner95, 26 October 2016 - 06:42 PM.


#48 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 29 October 2016 - 10:50 PM

You should be able to map out points as you dig the tree, I've made a start on this but needed to go to bed before I could finish.

Here's what I managed to get so far though: http://pastebin.com/LBdkTyZj

#49 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 30 October 2016 - 12:56 AM

View PostLupus590, on 29 October 2016 - 10:50 PM, said:

You should be able to map out points as you dig the tree, I've made a start on this but needed to go to bed before I could finish.

Here's what I managed to get so far though: http://pastebin.com/LBdkTyZj
ok I can finsh it later thank you very much for what you did I add to as I go along
also love the name you put for it lol

#50 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 12 November 2016 - 06:20 PM

I have a question I have updated the code to use gps and the gps is right for the x y and z when I do gps locate but when the turtle gets the job from the manger it digs down instead of traveling to the location of the area where it is ment to dig here is the paste bin link for the Quarry
http://pastebin.com/WhRtMccD
and I don't why it would be diging down instead of going the loaction

#51 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 19 November 2016 - 10:06 PM

my mining turtle is going diging down instead of going to the job site from the manger I have updated the code to use the gps api but it is diging down instead of going to the the area from the manger
here is the code for the quarry in pastebin link
http://pastebin.com/4k6nv6cu

and the manger paste bin link is

http://pastebin.com/MwzsDV3m

and the turtle is not giveing any errors so I don't what is going with it
thanks
jdanner95

#52 Dog

  • Members
  • 1,177 posts
  • LocationEarth orbit

Posted 19 November 2016 - 10:46 PM

In your quarry code, I notice that in several places you are sending the turtle to yTravel instead of yTarget, yQuarry, or yProgress - not sure if that's the issue, but are you sure that's what you intended? I'm seeing this at lines 140, 150, 187, and 193.

Edited by Dog, 19 November 2016 - 10:47 PM.


#53 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 19 November 2016 - 11:44 PM

I am new with the code but its not giving a error and I would like to fix it see I had a first not even put the gps code in to the quarry code but once I did that it now digs down instead of going to the loaction so if you know how to fix it I would be glad to change it I am just learning and new with the computer craft code

#54 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 20 November 2016 - 03:00 AM

Threads merged - please stick to the one for the one project.

#55 Dog

  • Members
  • 1,177 posts
  • LocationEarth orbit

Posted 20 November 2016 - 03:04 AM

I'm terrible with navigation so I won't be able to help you much there...but, as a first step, you might want to try the changes I suggested and see if that fixes your problem.

#56 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 20 November 2016 - 03:31 AM

View PostDog, on 20 November 2016 - 03:04 AM, said:

I'm terrible with navigation so I won't be able to help you much there...but, as a first step, you might want to try the changes I suggested and see if that fixes your problem.
what changes did ya mean cause I saw what ya wrote first but I am not sure with what lines you mean to change in those lines

View PostBomb Bloke, on 20 November 2016 - 03:00 AM, said:

Threads merged - please stick to the one for the one project.
ok ty and sorry for that

#57 Dog

  • Members
  • 1,177 posts
  • LocationEarth orbit

Posted 20 November 2016 - 03:38 AM

I have to admit, that on second blush, the changes I recommend aren't needed. Is yTravel your up/down coordinate or is yTravel a forward/back/left/right coordinate?

#58 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 20 November 2016 - 12:22 PM

View PostDog, on 20 November 2016 - 03:38 AM, said:

I have to admit, that on second blush, the changes I recommend aren't needed. Is yTravel your up/down coordinate or is yTravel a forward/back/left/right coordinate?
yTravel is so the truttle don't hit anything and its so it don't dig through the bass until it gets to its area to dig then it moves down

#59 Dog

  • Members
  • 1,177 posts
  • LocationEarth orbit

Posted 20 November 2016 - 03:20 PM

What is your ground level? Is it higher or lower than 79?

#60 jdanner95

  • Members
  • 57 posts
  • LocationUS

Posted 20 November 2016 - 05:08 PM

View PostDog, on 20 November 2016 - 03:20 PM, said:

What is your ground level? Is it higher or lower than 79?
is lower 79 is when its in the air flying to the area and it its sosped to go down once it reaches the area to qurry but it just stays in the starting point and digs down and don't go the loaction so I am guesing it could be causeing my problem if I am not misting?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users