How do you keep Turtles running their programs?

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

TheZecharon

New Member
Jul 29, 2019
9
0
0
The setup: I have two turtles transporting two redstone energy cells back and forth. These cells are being used to power a quarry and so there's an infinite loop to have them keep transporting the cells back and forth. I use

use os.queueEvent("randomEvent")
os.pullEvent()

to keep it from essentially timing out from lack of input/output. I also added the chunk loader modules to both of these turtles. They will randomly and for no discernible reason just stop running their programs and I'll have to go and start the programs on them again. Any ideas on how I can have them continue running until I make them stop? Thanks!
 

Democretes

New Member
Jul 29, 2019
1,134
0
1
If at any time the server your running shuts down (single player or multiplayer server) your programs will stop running their programs. Otherwise they should continuously run the programs.
 

NTaylor

New Member
Jul 29, 2019
221
0
0
If the turtles are staying still it is actually relatively simple to have them keep doing what you want after the server restarts simply rename your program you run to startup

or write a new program called startup and put the only line as

shell.run("Your program name here")

and that will run the program this way if the turtle stops for some reason when it starts again it will simply startup and run your program

If the turtles move however it is quite a bit harder to do and while I know what to do the actual code is beyond what little I know about CC and what you would have to do is edit your program to include GPS so that it locates where it is and starts at that part of the program accordingly.
 

TheZecharon

New Member
Jul 29, 2019
9
0
0
Well, the server does restart every night and comes right back up. Thanks for the advice. I'll try it out and let you know how it goes.
 

merrybike

New Member
Jul 29, 2019
10
0
0
You're screwed. you either start from the top or go down a few layers, but without GPS excavate will never resume if its a startup.