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

Help with making program sp and chunk unloading proof?

Started by lordofttude, 14 December 2015 - 11:55 PM
lordofttude #1
Posted 15 December 2015 - 12:55 AM
A cool guy called kaikaku:

https://www.youtube.com/channel/UCyoixsV9m9y_DETZczw760A

made this program here: http://pastebin.com/JgRgRK5q

for a tree farm.

I was wondering how would one make this not break when logging out in sp and also how to prevent it breaking when the chunk unloads. His solution for logging out in sp is to make the turtle wait if it is receiving a redstone signal at the end of a cycle. So basically if you know you are going to log out soon, activate the redstone signal. I am wondering if there is a better way to do this such as when the turtle reboots go to the starting coords of the farm and then run the program as usual.

Any help is appreciated and thanks in advance
Bomb Bloke #2
Posted 15 December 2015 - 01:10 AM
My solution for my chopper has been to set up a GPS at world height. When the turtle reboots, it hence knows exactly where it is, can go back to its "proper" starting position, and then resume as normal from there.
KingofGamesYami #3
Posted 15 December 2015 - 01:11 AM
I made (..or rather, updated) an API which tracks the movement of a turtle here, which you could use to know where the starting coords are, relative to where the turtle is now.
Edited on 15 December 2015 - 12:11 AM
lordofttude #4
Posted 15 December 2015 - 01:16 AM
I made (..or rather, updated) an API which tracks the movement of a turtle here, which you could use to know where the starting coords are, relative to where the turtle is now.
My solution for my chopper has been to set up a GPS at world height. When the turtle reboots, it hence knows exactly where it is, can go back to its "proper" starting position, and then resume as normal from there.

Thanks. Can this also be applied to the chunk being unloaded?
Edited on 15 December 2015 - 12:17 AM
KingofGamesYami #5
Posted 15 December 2015 - 01:37 AM
Yes, I have never successfully confused my API. Although, I'm not sure if it'll handle a server crash - never tested it.