Redstone (event)

From ComputerCraft Wiki
Revision as of 05:46, 9 January 2013 by Keeree (Talk | contribs) (Adding Example code)

Jump to: navigation, search
This page needs some serious TLC, stat!
Please help us by cleaning it, fixing it up, or sparing it some love.
(Reason: A demonstration on the use and handling of this event would be beneficial. AfterLifeLochie 16:13, 30 November 2012 (MSK))



Grid Modem.png  Event redstone
Fired when any Redstone inputs change on any of the sides of the computer.
Returned Object 1 Nothing


Grid paper.png  Example
Alerts via console output when a redstone input changes.
Code
while true do
  event = os.pullEvent("redstone")
  print("Redstone input changed.")
end
Output This will tell one when the redstone event is triggered. Note this doesn't tell you the side of the event.