Posted 05 May 2013 - 03:55 AM
Ok, so i'm making a slide door, that opens and closes with a computer. Easy! Done that (this is done in tekkit) then i came inside and had no idea how to get out… Sooo! I connected a button to the PC in another input, and tried to make it open from the inside aswell!
I don't know what the problem is. No errors, just that it wont open with the button…
term.clear()
term.setCursorPos(1,1)
os.pullEvent = os.pullEventRaw
password = "1234"
editpassword = "4321"
print("Robskin's security door")
write "Please type Password: "
local input = read("X")
if input == (password) then
print("Correct!")
rs.setOutput("back", true)
sleep(0.5)
rs.setOutput("back", false)
sleep(0.5)
rs.setOutput("back", true)
sleep(0.5)
rs.setOutput("back", false)
sleep(4.0)
rs.setOutput("bottom", true)
sleep(0.5)
rs.setOutput("bottom", false)
sleep(0.5)
rs.setOutput("bottom", true)
sleep(0.5)
rs.setOutput("bottom", false)
sleep(4.0)
shell.run("startup")
elseif input == (editpassword) then
print("Welcome Robskin, unlocking terminal!")
sleep(2.0)
print("Feel free to edit me :D/>")
else
print("Wrong password, please try again")
sleep(3)
shell.run("startup")
end
--This is where I added the button part!
if rs.outPut("top", true) then
rs.setOutput("top", true)
sleep(0.5)
rs.setOutput("top", false)
sleep(0.5)
rs.setOutput("top", true)
sleep(0.5)
rs.setOutput("top", false)
sleep(4.0)
rs.setOutput("bottom", true)
sleep(0.5)
rs.setOutput("bottom", false)
sleep(0.5)
rs.setOutput("bottom", true)
sleep(0.5)
rs.setOutput("bottom", false)
sleep(4.0)
shell.run("startup")
end
I don't know what the problem is. No errors, just that it wont open with the button…
Edited by