This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
skycraft1811's profile picture

Logout -> Login, Programm stops

Started by skycraft1811, 15 October 2012 - 11:48 AM
skycraft1811 #1
Posted 15 October 2012 - 01:48 PM
Hey everyone, hope somebody can help me :D/>/>

Everytime I log out and later back in my turtle stops right were he was.
Is there a way, that the turtle can continue to mine for me?

I wrote a simple program which works fine, but it is bad, if I have to bring him back up and let him start again "mining air".

Is there a way to prevent that? If not, any other suggestions, on how to make him work correctly


Thanks :P/>/>
JoshhT #2
Posted 15 October 2012 - 01:50 PM
I hope you're not talking about single player right? Lol.
You mean you start your turtle then log out of the server yes?
remiX #3
Posted 15 October 2012 - 02:00 PM
Single player: no

Multiplayer: Yes, I hear world anchors will prevent this? I've heard that turtles need users around them for them to work. Not sure if I'm right.
PixelToast #4
Posted 15 October 2012 - 02:03 PM
Single player: no

Multiplayer: Yes, I hear world anchors will prevent this? I've heard that turtles need users around them for them to work. Not sure if I'm right.
yes, yes they do
confirmed in smp
remiX #5
Posted 15 October 2012 - 02:08 PM
Single player: no

Multiplayer: Yes, I hear world anchors will prevent this? I've heard that turtles need users around them for them to work. Not sure if I'm right.
yes, yes they do
confirmed in smp

My mistake, how does it work?
skycraft1811 #6
Posted 15 October 2012 - 02:11 PM
I hope you're not talking about single player right? Lol.
You mean you start your turtle then log out of the server yes?

xD No, I mean: I start my turtle, record some lps and then(!) log out after 1hour or so …

Ok, then I will program a strip mine turtle :D/>/>

thanks
PixelToast #7
Posted 15 October 2012 - 02:13 PM
My mistake, how does it work?
it loads the chunks in a 16 (i think) block radius allowing for things to run as if there is a player by it
I_IblackI_I #8
Posted 16 October 2012 - 02:11 PM
edit the startup of ur turtle and make it
shell.run("program")
this should run ur mining program again when u login
ChunLing #9
Posted 17 October 2012 - 01:42 AM
You can also use the fs API to make sure that your turtle remembers where it was in the task. This is harder to do with turtles than with computers, since they move about and change direction and all, but it is certainly possible. Though my suggestion is to have a computer remote control the turtles and do all the remembering, rather than having the turtles do it.
Sammich Lord #10
Posted 17 October 2012 - 04:04 AM
What you want to do is in the loop that mines have it save the status to a file. Then when you run the program it checks the file for the status, but if there is no status file it creates one and starts mining. That is the basics, check the wiki for more help.