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

Auto Start computers and turtles

Started by Eagle4Life69, 27 January 2013 - 09:16 AM
Eagle4Life69 #1
Posted 27 January 2013 - 10:16 AM
I have noticed an issue with 1.4 I have programs that I have set up to always be on (wireless redstone signal and such) when you walk away allowing the chunk to become unloaded (go to nether) when you come back you have to access the pc to get it to start this does not work for a jukebox located underground or for a turtle that is next to a tree that is surrounded in water.

Here is my startup program for my turtle
Spoiler

os.pullEvent()
event = "rednet_message"
p1 = senderID
p2 = message
term.clear()
term.setCursorPos(1,1)
print("Waiting for Instructions")
repeat
rednet.open("right")
local event,p1,p2 = os.pullEvent()
if event=="rednet_message" then
  if p2 == "treefarm" then
   shell.run("treefarm", p1)
  end
end
until event=="char" and p1=="x"
and here is the one for my Music Player which also plays the music
Spoiler

os.pullEvent()
event = "rednet_message"
p1 = senderID
p2 = message
term.clear()
term.setCursorPos(1,1)
print("Waiting for Instructions")
repeat
rednet.open("top")
local event,p1,p2 = os.pullEvent()
if event=="rednet_message" then
  if p1 == 5 then
   shell.run("dj", "play", p2)
  end
end
until event=="char" and p1=="x"

If my code is the issue then please let me know otherwise does anyone know why this is happening?
Willibilly19 #2
Posted 27 January 2013 - 11:06 AM
That's just how the computers work. I don't think there is a way around it in the code(I could be wrong)…but you could always get a chunk loader and keep the chunk loaded while away.
Engineer #3
Posted 27 January 2013 - 11:16 AM
You first need to open rednet?

rednet.open("side")

If this not helps you, you need to show you need to full code if that is not the case
Andale #4
Posted 28 January 2013 - 04:04 AM
I thought I had this issue but for some reason it went away when I started using my updater program, I think it must depend on what your computer is doing. We restart our server every 4 hours and I dropped a world anchor to test (so I could keep TPing to people for admin purposes) if it would keep my place while editing. It did of course, but then I noticed that it was also starting my programs after the reboots. I knocked out the anchor and found it still does it when I come back to the area now.