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

(Question making a computer pickup redstone current)

Started by Uch1ha_Sasuke, 31 May 2012 - 10:59 AM
Uch1ha_Sasuke #1
Posted 31 May 2012 - 12:59 PM
I wan my computer to do something when it recieves a redstone current.
So i was thinking of using an if but i dont know how exaclty?
So I want my computer when i pulse it with redstone to do something please help me with this script
Sasuke.
Lolgast #2
Posted 31 May 2012 - 02:22 PM
Use
os.pullEvent("redstone")
Then your computer will stop there, until it gets a redstone current. This will respond to a change in redstone current, though. If you know which side the redstone is, you can use
redstone.getInput("side") -- change side to the side where the redstone is
This will output true when it gets a redstone signal, and false when it doesn't get a redstone signal.
Uch1ha_Sasuke #3
Posted 31 May 2012 - 04:07 PM
ooke thanx