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

Advanced Computer and wireless Turtles

Started by Quebec0007, 08 January 2015 - 02:46 AM
Quebec0007 #1
Posted 08 January 2015 - 03:46 AM
Hi, I am trying to create a mini game tipe thing wich will use a lot of turtles. But I have encountered a problem with the wireless Turtles.

What I want to do is to use the Advanced Computer to send out a command to all of the turtles that I would be using in the minigame. I know I can do it by using the command "shell.run(<program name>)". But I saw that it doesn't work with programs I wrote myself. Now my actual question is: Is there a way to send a command to a turtle to run a program that I coded or not.

I could make it all one program where I send command and use if statements but It would be nice to be able to run a different program.

Hope you guys could help me out here.

Regards
Quebec0007
blipman17 #2
Posted 08 January 2015 - 07:37 AM
shell.run()
should work

http://computercraft.info/wiki/Shell.run
Bomb Bloke #3
Posted 08 January 2015 - 08:10 AM
Indeed, shell.run() should work just fine, though it does rely on the target script file being on a drive the turtle has access to - 99% of the time, that'll be their own internal storage and nothing else. Your personal scripts generally only exist on the drives of systems you specifically put them on.

You will need to manually put a script file on each turtle. You could rig that script to accept transmissions of other scripts from your main computer (which the turtles could also save to their drives and then run), but it'll still need to be there as a starting point before any of your turtles will do anything interesting.