Turning on a turtle without touching it
#1
Posted 06 September 2012 - 12:58 AM
for example, if a turtle is created with a deployer, the console is blank and even if it has startup code it wont run unless you right click it to turn it on, my question is if there is a way to make it run startup code without having to touch it?
Thank you
#2
Posted 06 September 2012 - 01:14 AM
T = peripheral.wrap("back") -- assuming turtle is at back of unit turning it on
T.turnOn()
If you want I can also supply you with the code to make sure it is a turtle that is being turned on, as well as auto-detecting the side.Otherwise, rightclicking is the only way to turn your turtle on.
If you want this done because you don't want have to turn on every individual computer in your world when you enter it after closing it down, best thing to do is have a group of turtles that are pre-programmed to turn on every other turtle/computer after switching them on, thus reducing the amount of things you have to switch on.
#3
Posted 06 September 2012 - 10:34 AM
T = peripheral.wrap("back") -- assuming turtle is at back of unit turning it on
T.turnOn()
I get "test:2: attempt to index ? (a nil value)"
#4
Posted 06 September 2012 - 10:37 AM
peripheral.call(side, 'turnOn')where side is the side that the turtle is on
EDIT: And make sure the 'turnOn' has a capital 'O'
#5
Posted 11 September 2012 - 10:54 PM
#6
Posted 12 September 2012 - 11:48 AM
#7
Posted 01 April 2013 - 07:34 AM
The Deployer deploys turtles up and the computer has that line of code on it's startup, but then it gives me the stupid error
Do you know how I could fix this? I'm using CraftOS 1.5 and Feed The Beast Ultimate pack if that's any help. (GregTech disabled). Thank you for any help or suggestions.
#8
Posted 01 April 2013 - 07:37 AM
peripheral.call("back", "turnOn")
#9
Posted 01 April 2013 - 07:38 AM
#10
Posted 01 April 2013 - 07:48 AM
sjele, on 01 April 2013 - 07:37 AM, said:
peripheral.call("back", "turnOn")
Thank you. How do I make the deployed turtles run a program? Do I just put a disk drive next to where they are deployed with a startup program that tells them to do what I want them to? So would something like this for the disks startup work?
for i=1, 4, 1 do turtle.turnLeft() end turtle.forward()How come when I tell it to move it doesn't?
It still needs me to click it in order to run the program. Why?
#11
Posted 01 April 2013 - 07:53 AM
#13
Posted 01 April 2013 - 09:20 AM
If your running tekkit a wireless redstone receive receiver would do the job.
Here's the code (sorry it's not in a box I'm on my phone.
if rs.getInput("side.startup") then
end
Obviously change side to the input side.
#15
Posted 01 April 2013 - 09:24 AM
lewisholcombe, on 01 April 2013 - 09:20 AM, said:
If your running tekkit a wireless redstone receive receiver would do the job.
Here's the code (sorry it's not in a box I'm on my phone.
if rs.getInput("side.startup") then
end
Obviously change side to the input side.
I know I can turn it on with redstone but I'm trying to use a setup with very little physical inputs. like it's all code basically is what I want... But if I can't I will use wireless redstone. Also I use Feed The Beast Ultimate Pack... Not Tekkit.
sjele, on 01 April 2013 - 09:21 AM, said:
I tried but for some reason it's not loading the startup program. And I don't know why. It also won't move either.
Thank you everyone for your help, I greatly appreciate it.
#16
Posted 01 April 2013 - 10:06 AM
Ninjawolf0007, on 01 April 2013 - 09:24 AM, said:
lewisholcombe, on 01 April 2013 - 09:20 AM, said:
If your running tekkit a wireless redstone receive receiver would do the job.
Here's the code (sorry it's not in a box I'm on my phone.
if rs.getInput("side.startup") then
end
Obviously change side to the input side.
I know I can turn it on with redstone but I'm trying to use a setup with very little physical inputs. like it's all code basically is what I want... But if I can't I will use wireless redstone. Also I use Feed The Beast Ultimate Pack... Not Tekkit.
sjele, on 01 April 2013 - 09:21 AM, said:
I tried but for some reason it's not loading the startup program. And I don't know why. It also won't move either.
Thank you everyone for your help, I greatly appreciate it.
(Off topic)
Do you usually play on a feed the beast ultimate server?
#17
Posted 01 April 2013 - 10:22 AM
lewisholcombe, on 01 April 2013 - 10:06 AM, said:
(Off topic)
Do you usually play on a feed the beast ultimate server?
Do you know what might be going wrong?
Like why I still need to click on the turtles and why they won't move? << Nevermind I need fuel >.> I failed... Haha
If not, it's fine but I could really use the help... Once I get it I will pastebin the code and put the link here for poeple who are having issues.
How do I turn
peripheral.call("back", "turnOn") into an infinite loop? wether there is a turtle in back or not?
#18
Posted 01 April 2013 - 12:38 PM
computer > edit startup >
while true do
if peripheral.isPresent("back") == true then
peripheral.call("back","turnOn")
sleep(5)
end
if not peripheral.isPresent("back") == true then
sleep(5)
end
end
OR
while true do
event, par1 = os.pullEvent()
if event == "peripheral" and par1 == "back" then
peripheral.call("back","turnOn")
end
end
​Can someone test to make sure these actually work? Can you let us/me know the results by replying on this forum? Thank you.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











