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

[Question][Lua]Having one turtle send a command line to another turtle

Started by MrRelik, 06 December 2012 - 02:56 PM
MrRelik #1
Posted 06 December 2012 - 03:56 PM
Just to start off, I dont mean using rednet, I know about the while loop until it receives a message method.

I was looking for a way to have one turtle, or computer, push a command line statement to an adjacent turtle or computer.

For example, Lets say we have the "Main turtle" that has all of the custom programs we would need on it. And then lets say you have a program which causes it to place down a turtle from its inventory, give this new turtle some fuel, and then tell this new turtle to use the built-in program "excavate 4". the "main" turtle would then move a couple of blocks away and repeat, and ect. eventually collecting all of the placed down turtles.

I've looked around a bit and I can't find anyway to do this.

Thanks in advance
Dlcruz129 #2
Posted 06 December 2012 - 04:15 PM
You would have to use rednet. Computers and turtles CAN be wrapped as peripherals, but you can only turn them on, turn them off, reboot them, or get the ID. If you want them to only be able to do one thing, you could edit its startup script, and simply turn the computer on as a peripheral. Or just use rednet, that would be the easiest way.
MrRelik #3
Posted 06 December 2012 - 05:03 PM
Alright thank you
KaoS #4
Posted 07 December 2012 - 12:10 AM
you could use disk drives, that is my favorite way, place the turtle, move back, place disk drive and drop disk into it, program startup file on disk, use peripheral API to start up turtle next to disk drive, suck disk out and break disk drive