Posted 23 December 2014 - 08:54 PM
Hi, I'm in need of help as I am a bit of a noob at this and there is no tutorial (that I am aware of) that can help me.
I have a computer with a password that when entered correctly, outputs redstone current from the back to extend pistons.
Currently I have one password for opening it, and another for closing it.
I am looking for a way of toggling the current so I can use one password.
This is my current code:
If there is any way of setting a toggle output then please let me know.
Any help would be greatly appreciated.
I have a computer with a password that when entered correctly, outputs redstone current from the back to extend pistons.
Currently I have one password for opening it, and another for closing it.
I am looking for a way of toggling the current so I can use one password.
This is my current code:
while true do
term.clear()
term.setCursorPos(1,1)
print ("Please enter password:")
input = read ("*")
if input == "passord1" then
redstone.setOutput("back", true)
end
if input == "password2" then
redstone.setOutput("back", false)
end
end
If there is any way of setting a toggle output then please let me know.
Any help would be greatly appreciated.