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

How to make a turtle boot on placement.

Started by DARKHAWX, 12 December 2012 - 11:21 PM
DARKHAWX #1
Posted 13 December 2012 - 12:21 AM
Hey guys, recently I made a turtle that would mine out a 3x3 tunnel. and now i wanted to use another turtle to place other turtle to stripmine along the sides. but i've run into a problem. See what i want is that when the turtle gets placed it automatically boots up and then runs a startup program. My problem is that i know how to make the startup script, but I have no idea how to boot a turtle without right clicking it. Is there a way or will i have to manually boot them? Any help would be appreciated. (I want to be able to control all of this from my computer in my home, because i'm lazy)
Bubba #2
Posted 13 December 2012 - 01:55 AM
Just use peripheral commands immediately after placement.


local turtle = peripheral.wrap("sideofturtle")
turtle.turnOn()
DARKHAWX #3
Posted 13 December 2012 - 02:26 AM
Thanks.
DARKHAWX #4
Posted 13 December 2012 - 01:29 PM
Ummm, i used your code but it wouldn't work. I had to change it from turtle to miner because within my code i was making the turtle move. The error i get is : attempt to index ? ( a nil value). Any help with that?
Lyqyd #5
Posted 13 December 2012 - 01:58 PM
If you place the turtle in front:


peripheral.call("front", "turnOn")

If you place it up:


peripheral.call("top", "turnOn")

If you place it down:


peripheral.call("bottom", "turnOn")

Pick which one you need, and use that line immediately after you place the turtle to turn it on.
DARKHAWX #6
Posted 13 December 2012 - 02:19 PM
Thanks, testing now.

Yep, it works. thanks for the help guys.