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

redstone activation

Started by chowder64, 29 May 2012 - 06:12 PM
chowder64 #1
Posted 29 May 2012 - 08:12 PM
i am trying to make a tree farmer using a turtle and i want it to be so it works on redstone being activated at the front then follow the rest of the program

code so far:


if event == "redstone" then
break
end
end

any help would be thanked
MysticT #2
Posted 29 May 2012 - 08:52 PM
If it's for any side, simply use:

os.pullEvent("redstone")
-- Your code
If you want it too check an specific side then:

while true do
  os.pullEvent("redstone")
  if rs.getInput("<side>") then -- replace <side> with the side to check
    break
  end
end
-- Your code
chowder64 #3
Posted 29 May 2012 - 09:03 PM
Thanks for helping me big help
your awesome just like every other helper