Jump to content




getting a turtle to activate on redstone


  • You cannot reply to this topic
2 replies to this topic

#1 makeme

  • Members
  • 60 posts

Posted 30 May 2013 - 04: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


#2 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 30 May 2013 - 05: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.

#3 popdog15

  • Members
  • 82 posts

Posted 30 May 2013 - 09:19 PM

local event = os.pullEvent()
if event == "redstone" and redstone.getInput(*side*, true) then
--code here
end






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users