L3ar 0 Posted December 29, 2018 Share Posted December 29, 2018 I'm trying to control 2 funky locomotion frame sliders to move a door using this program : local component = require("component") local sides = require("sides") local rs = component.redstone local doorOpen = false local delay = 15 while true do if rs.getOutput(sides.front) > 0 then if doorOpen then print("Closing door") rs.setOutput(sides.right, 15) os.sleep(delay) rs.setOuput(sides.right, 0) doorOpen = not doorOpen else print("Opening door") rs.setOutput(sides.left, 15) os.sleep(delay) rs.setOutput(sides.left, 0) doorOpen = not doorOpen end end end When I press the button the screen goes black, the door doesn't move and the screen show up only if I press tyhe button again. I'm a noob at lua so I can't really understand what's going on... Quote Link to post Share on other sites
0 Fingercomp 37 Posted December 30, 2018 Share Posted December 30, 2018 Pressing the button that is placed on the screen turns the screen on/off. Make sure the button is not adjacent to the screen. Also, you should use rs.getInput in yor problem. rs.getOutput returns the strength of the redstone signal emitted by the computer's redstone card. Quote Link to post Share on other sites
0 L3ar 0 Posted December 30, 2018 Author Share Posted December 30, 2018 Ooooh I didn't know that ! thanks ! I'll fix that and try again Quote Link to post Share on other sites
I'm trying to control 2 funky locomotion frame sliders to move a door using this program :
When I press the button the screen goes black, the door doesn't move and the screen show up only if I press tyhe button again.
I'm a noob at lua so I can't really understand what's going on...
Link to post
Share on other sites