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

How to update turtles

Started by glowdemon1, 10 January 2013 - 10:02 AM
glowdemon1 #1
Posted 10 January 2013 - 11:02 AM
Hey so I got an army of 64 turtles and a special program I want to run, there's only one thing that's blocking me from using my turtles. I'm too lazy to do pastebin get xxxxxx at them all to put the program on them, is there any way to put the program or them just by one command on a computer, they're wireless turtles anyways, or are there easier alternatives, thank you for your assistance.
crazyguymgd #2
Posted 10 January 2013 - 11:11 AM
If you're in single player you can go to your save folder on your actual computer and put the program you want on each cc computer that way.
zekesonxx #3
Posted 10 January 2013 - 11:12 AM
You could use rednet to send the file to all the turtles.
crazyguymgd #4
Posted 10 January 2013 - 11:18 AM
You could use rednet to send the file to all the turtles.

Wouldn't you still have to go to every turtle and tell it to accept the rednet message and save the file?
bjaorndvinCoder #5
Posted 10 January 2013 - 11:29 AM
No. If you just program all turtles to wait for 1 message, then you could make,
for example, the turtles run pastebin get xxxx army
and then tell it to run the army.

:D/>
crazyguymgd #6
Posted 10 January 2013 - 11:32 AM
That still takes 65 commands. 1 per turtle saying rednet.receive() and then another on the host comp saying rednet.broadcast(pastbin blah blah).
remiX #7
Posted 10 January 2013 - 11:33 AM
If you're in single player you can go to your save folder on your actual computer and put the program you want on each cc computer that way.

Yeah that would be the best way possible

You could use rednet to send the file to all the turtles.

Wouldn't you still have to go to every turtle and tell it to accept the rednet message and save the file?

Lol, yeah.
zekesonxx #8
Posted 10 January 2013 - 11:36 AM
What you could do is use parallel.waitForAny() and wait for either a rednet.receive() to the turtle, and in the other parallel be running the program.
remiX #9
Posted 10 January 2013 - 11:38 AM
What you could do is use parallel.waitForAny() and wait for either a rednet.receive() to the turtle, and in the other parallel be running the program.

Yes but he would have to go to each turtle to add the code for rednet. Doing that he could just add the code he wants to add…
glowdemon1 #10
Posted 10 January 2013 - 11:51 AM
Well I'm a complete noob with CC, I know basic RS scripting, but I got a buddy with me who does computerscience so it's up to him, if you could be more specific I could try, I know some basic lua too, I'm in mutliplayer and pastebin is on, so I can connect to it. Thanks for the info already guys, but I'm searching for something I don't have to program ech turtle, I already told another friend to make a turtle programming factory, he's working on it, I'll post some scripts of it if I'm allowed to !
crazyguymgd #11
Posted 10 January 2013 - 12:00 PM
There is no way to send a file to all computers built in with no effort on your part. If you only need to do this once, stop being lazy and go around to every turtle and pastbin in the program. If you want to be able to update them all again, either go around to all 64 again or work on some of the suggested solutions above.
Short answer, stop being lazy :)/>
Lyqyd #12
Posted 10 January 2013 - 04:31 PM
If it's singleplayer, you can just drop it in the ROM.
ChunLing #13
Posted 10 January 2013 - 09:02 PM
If you want to do this once, and you are on multiplayer (and not the server owner), then you just need to go around to each turtle and use the pastebin program. This may seem like an obvious point, but in a multiplayer environment there is no way to determine the "owner" of a turtle or computer other than who has physical access to it. Anything that let you gain control of a computer/turtle without ever having physical access to it would be an unacceptable exploitable mechanic.

If you want to be able to do this repeatedly, then installing a program that runs on startup and makes your turtles open their modem and wait for a command from a designated controller ID is your best option. Such a program needn't be particularly complex, it could be just a few lines, really. I have such an option built into the remote control program I use, so I can run or install any new programs.