58 posts
Posted 30 May 2013 - 05:20 PM
so ive got this program automating one of my machines but i only want it to activate on redstone in how would i do this?
while true do
turtle.attack()
sleep(0.01)
end
1190 posts
Location
RHIT
Posted 30 May 2013 - 06:19 PM
Look on the wiki for os.pullEvent and check out the redstone event (it's located under "event types", but you should read the whole page to become more familiar os.pullEvent). See if you can figure something out. If not, come back with what you've tried and I (or someone else) can help you out some more.
82 posts
Posted 30 May 2013 - 10:19 PM
local event = os.pullEvent()
if event == "redstone" and redstone.getInput(*side*, true) then
--code here
end