10 posts
Posted 06 January 2013 - 08:49 AM
Hi there.
I Programmed a turtle to chocp wood and plant new samplings.
But when i looked after about 2hours i couldnt find my turtle anymore.
Is there a way to get where it is?
1190 posts
Location
RHIT
Posted 06 January 2013 - 09:03 AM
Maybe… If it is still running, make a GPS server and then shut down minecraft. Write a startup program that will send the coordinates of the turtle to a computer of your choice and then put that program into your saves/saveFolder/computer/idOfTurtle/. Restart Minecraft and then you'll be able to get the location of your turtle.
Good luck :)/>
10 posts
Posted 06 January 2013 - 09:29 AM
Can i boost the distance for the Modems by editing the ComptuerCraft.cfg?
Lets try the GPS
1190 posts
Location
RHIT
Posted 06 January 2013 - 09:38 AM
Can i boost the distance for the Modems by editing the ComptuerCraft.cfg?
Lets try the GPS
Yeah you can. Just edit the line that says: "I:modem_range=64" to "I:modem_range=90000" or something like that.
10 posts
Posted 06 January 2013 - 10:18 AM
Another question. Now i can read the Position of a Computer i am in front of.
How to get the Values out of the Message to for example resend them on broadcast?
I only get back "true"
1190 posts
Location
RHIT
Posted 06 January 2013 - 10:24 AM
Another question. Now i can read the Position of a Computer i am in front of.
How to get the Values out of the Message to for example resend them on broadcast?
I only get back "true"
You're going to have to write a program that has something like the following in it:
rednet.open("right")
local id, message = rednet.receive() --Wait for a message to be sent to the turtle so you have time to set up the gps servers and such
local x,y,z = gps.locate()
rednet.send(id, "I am at: "..x..","..y..","..z)
For the computer, have a program that does this:
rednet.open("top")--Or whatever side your computer has the modem on
rednet.broadcast(" ")
local id, message = rednet.receive()
print(message)
I should mention that this will only work if the turtle you've lost is a wireless turtle. Otherwise I'm afraid you're screwed.
2005 posts
Posted 06 January 2013 - 10:32 AM
No you're not. Not.
Just program the turtle to digUp and move up until it hits the sky, then move a bit, come back down till it hits something, go back up a bit (say ten meters) and then save the calculated altitude resulting from that operation in a file.
Then you go about to where it might be and see if you can find it. It can only have gone so far before hitting an unloaded chunk and being forced to stop.
Of course, there are fuel concerns about that.
10 posts
Posted 06 January 2013 - 10:47 AM
For the turtle code i get: gps:69: attempt to compare nil with number …
Found the turtle about 120block ofroad.
Made the turtle send "still alive" every second and tracked the distance info on other computers.
Thanks a lot
The Turlte wasnt diging down at any time :)/>